Function getColorName is just used to get the color names from the dataset. The cv2.imread returns the image coordinate matrix. It just gives the matrix of pixels in the image. That way we know where our mouse pointer clicked to get the coordinates. The draw_function is called upon a mouse click using cv2.setMouseCallback() method. It provides the draw_function with proper event and coordinates of mouse pointer. The values of R,G,B are taken from the matrix generated from imread. Then they are just displayed in a box of that color. putText is used to insert a text inside an image.
ROHAN337/Colour-Detection-project
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|