llSourcell / Object_Detection_demo_LIVE

This is the code for the "How to do Object Detection with OpenCV" live session by Siraj Raval on Youtube
103 stars 80 forks source link

RGB values for params of inRange #3

Open sid2364 opened 7 years ago

sid2364 commented 7 years ago

I don't really understand what's going into inRange from this:-

# Filter by colour
# 0-10 hue
#minimum red amount, max red amount
min_red = np.array([0, 30, 30])
max_red = np.array([10, 100, 100])
#layer
mask1 = cv2.inRange(image_blur_hsv, min_red, max_red)

#birghtness of a color is hue
# 170-180 hue
min_red2 = np.array([170, 30, 30])
max_red2 = np.array([180, 100, 100])
mask2 = cv2.inRange(image_blur_hsv, min_red2, max_red2)

I couldn't really understand from the docs.

What exactly is going in?

kumarijyotsna commented 7 years ago

@sid2364 I think this link will clear your doubts: [http://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_colorspaces/py_colorspaces.html]