From 3cc486a4b31cb5eddff023271a239cb28871d4bf Mon Sep 17 00:00:00 2001 From: Gurvinder Kaur <77490072+gurvinder08@users.noreply.github.com> Date: Tue, 14 Dec 2021 19:36:48 +0530 Subject: [PATCH] Update color_detection.py --- color_detection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/color_detection.py b/color_detection.py index 0d79585..2ab1258 100644 --- a/color_detection.py +++ b/color_detection.py @@ -52,7 +52,7 @@ def recognize_color(R,G,B): # cv2.rectangle(image, startpoint, endpoint, color, thickness)-1 fills entire rectangle cv2.rectangle(img, (20, 20), (750, 60), (b, g, r), -1) #creating textstring to display (color name and RGB values) - text = recognize_color(r,g,b) + 'R=' + str(r) + 'G=' + str(g) + 'B=' + str(b) + text = recognize_color(r,g,b) + ' R=' + str(r) + ' G=' + str(g) + ' B=' + str(b) # cv2.putText(img,text,start,font(0-7),fontScale,color,thickness,lineType ) cv2.putText(img,text,(50,50),2,0.8,(255,255,255),2,cv2.LINE_AA) # for light colors @@ -64,4 +64,4 @@ def recognize_color(R,G,B): if cv2.waitKey(20) & 0xFF==27: break -cv2.destroyAllWindows() \ No newline at end of file +cv2.destroyAllWindows()