I'm currently working on a project including color detection. I'm using opencv on python to do so, I can detect the color I want, i.e. blue, but I cannot manage to make the software know that this color has been detected. Here is the code I have.
` hsv_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) boundaries = [([94, 90, 45], [145, 255, 255])]
# loop over the boundaries
for (lower, upper) in boundaries:
# create NumPy arrays from the boundaries
lower = np.array(lower, dtype="uint8")
upper = np.array(upper, dtype="uint8")
# find the colors within the specified boundaries and apply
# the mask
mask = cv2.inRange(hsv_frame, lower, upper)
output = cv2.bitwise_and(frame, frame, mask=mask)
imageOut = np.hstack([frame, output])`
It isolates the color blue properly like this output of my code.
My problem is that from there I don't know how I can have my software to know that the color blue has been detected and isolated.