Ask Your Question

Revision history [back]

Actually, I would say that your current glove has a variety of colors similar to skin. That would be not a solution at all. Try to look for a glove of a single unique color. For example, A YELLOW one.

You can obtain HSV values experimentally:

  1. Download ColorPic tool
  2. Grab a picture of your hand/skin/glove/whatever with simple OpenCV code snippet
  3. Run ColorPic and use it by slowly navigating a mouse cursor over the hand/skin/glove picture and check for values in boxes Hue|Sat|Val

ColorPic

  1. Move over the whole area of your region of interest and try to find Min and Max values.
  2. Use these values for OpenCV cvInRanges or cvInRange function to filter out those colors.

NOTE: OpenCV uses 0-179 value for Hue and 0-255 for Sat and Val. Colorpic uses 0-359 value for Hue and 0-255 for Sat and Val. So you must Min and Max values found for Hue divide by 2 before using them with OpenCV.

Actually, I would say that your current glove has a variety of colors similar to skin. That would be not a solution at all. Try to look for a glove of a single unique color. For example, A YELLOW one.

You can obtain HSV values experimentally:

  1. Download ColorPic tool
  2. Grab a picture of your hand/skin/glove/whatever with simple OpenCV code snippet
  3. Run ColorPic and use it by slowly navigating a mouse cursor over the hand/skin/glove picture and check for values in boxes Hue|Sat|Val

ColorPic

  1. Move over the whole area of your region of interest and try to find Min and Max values.
  2. Use these values for OpenCV cvInRanges or cvInRange function to filter out those colors.

NOTE: OpenCV uses 0-179 value for Hue and 0-255 for Sat and Val. Colorpic uses 0-359 value for Hue and 0-255 for Sat and Val. So you must Min and Max values found for Hue divide by 2 before using them with OpenCV.

Actually, I would say that your current glove has a variety of colors similar to skin. That would be not a solution at all. Try to look for a glove of a single unique color. For example, A YELLOW one.

You can obtain HSV values experimentally:

  1. Download ColorPic tool
  2. Grab a picture of your hand/skin/glove/whatever with simple OpenCV code snippet
  3. Run ColorPic and use it by slowly navigating a mouse cursor over the hand/skin/glove picture and check for values in boxes Hue|Sat|Val

ColorPic

  1. Move over the whole area of your region of interest and try to find Min and Max values.
  2. Use these values for OpenCV cvInRanges or cvInRange function to filter out those colors.

NOTE: OpenCV uses 0-179 value for Hue and 0-255 for Sat and Val. Colorpic uses 0-359 value for Hue and 0-255 for Sat and Val. So you must Min and Max values found for Hue divide by 2 before using them with OpenCV.