I want to have a
color detection for a
particular region in a video.
Afterwards, I want to check whether the
brown color within the box is greater than threshold. If yes, the program print "detected".
How can I only detect the color within a specified region?
What I have tried:
For example, my program will detect people and bound him with a rectangular box.
image = cv2.imread(imagePath)
(rects, weights) = hog.detectMultiScale(image, winStride=(4, 4),
padding=(8, 8), scale=1.05)
# draw the original bounding boxes
for (x, y, w, h) in rects:
cv2.rectangle(orig, (x, y), (x + w, y + h), (0, 0, 255), 2)
Afterwards, I want to check whether the
brown color within the box is greater than threshold. If yes, the program print "detected".
How can I only detect the color within a specified region?