I am trying to get a rough estimate of a position of a hand through using backprojection on frames retrieved from a camera. I do not need perfect detection on the hand, but I can't really afford to get many false blobs. At night, my histogram works fine but at day I get a large amount of false blobs. The patch of skin I calculate the hist from is sufficient enough to provide enough information for the hist to work properly. I am using the YCrCb colourspace but have omitted the third plane to help improve detection in varying lighting conditions. I am using 30 bins for Y and 32 bins for Cr. I am also using a range of 0 - 255 for both. I have tried using several morphological operations, but the false blobs are too large to go away.

Does anyone have any suggestions on how I can remove false blobs? I can compromise on the detail of the positive detections (it can be a little blobby) but I need to remove most of the negative detections for my program to work. If this is not possible, does anyone have any suggestions other than backprojection on how to get a rough estimate of the position of the hand? (Haar or any other machine learning techniques are not possible). I cannot post code or a sample image. I am using the C++ API in OpenCV so please only suggest solutions that can be implemented in this API.

  • 1
    $\begingroup$ We need more information on what exactly you're doing, what sorts of images you are using. You describe your process with very little detail. Do you use the word "backprojection" in the context of Radon transform? You need to clarify a lot of things and perhaps show some images. $\endgroup$ – Phonon Dec 22 '11 at 22:41
  • $\begingroup$ 1)By backprojection I mean retrieval of a mask from an image based on the probability of a pixel being described by the histogram. The standard backprojection called by calcBackProject () 2)I am using images retrieved directly from the camera. I will be retrieving an image from the camera, and then using a histogram of palms (interior of hand) to get an approximate position of the hands in the image. 3) Sorry, but I am unable to post images at this time. $\endgroup$ – user650 Dec 29 '11 at 21:32
  • 1
    $\begingroup$ If you require the fingers to be opened and spread, you can use the curvature of the resulting blob to determine the likelihood of the blob being a hand (where a hand would have a high curvature) $\endgroup$ – Geerten Jan 23 '12 at 12:29
  • $\begingroup$ The Y plane in the YCbCr color space is the intensity plane, the Cb and Cr planes are the planes that contain the color information. You can also try other color spaces to see which works best (HSV for example). $\endgroup$ – Geerten Feb 23 '12 at 10:36

I cannot say much about how can we increase the accuracy of your blob detection by your current method till i exactly understand method and implementation; However, i feel it is quite certain that color (alone) quite often vulnerable to false detection due to the fact that many things in the world corresponds to closer to skin color.

The best best, i believe is to use more information - hopefully an independent feature. For example, you can use shape - and apply the classifier who can detect hand/no-hand based on most possible counter shapes. some times the hand shape may have a round blob - but most often the fingers etc would bring the uniqueness necessary for classification. you can run across many possible scenarios to create a good model.

Think about it, if you would have given this task to a human being - how would they have guessed it?

  • $\begingroup$ Color is not my only threshold - its just the first threshold in a long process. I cannot use machine learning(ie. shape classifiers) due to it requiring several positive matches for learning, and it will not be suitable for my program as a whole. $\endgroup$ – user650 Dec 29 '11 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy