Ask Your Question

Vladimir Cernega's profile - activity

2013-09-26 01:35:39 -0600 commented question Possible solutions for OpenCv Assertion Error problem

This assertion error somehow indicates that size of your matrix is corrupted. Also, you did not post the whole code snippet for cropping, right? Using Mat frame_copy = frame; can be sometimes a little tricky simply because you create a new frame_copy header that points to the same image as frame header. So if you make changes on frame_copy that means that frame will be affected too. So if your aim is to copy the data you need to use frame.copyTo(frame_copy).

2013-08-26 04:32:14 -0600 received badge  Editor (source)
2013-08-26 04:31:14 -0600 answered a question How can i detect the hand gloves ?

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.