简体   繁体   中英

OpenCV detect hand and comparison images

Purpose of my application is to take a photo hand (gesture) and comparing it with a picture that is in the database. The first option I was use is background subtraction on images:

http://docs.opencv.org/trunk/doc/tutorials/video/background_subtraction/background_subtraction.html .

The solution works, but sometimes, depending on the first picture is not properly cut hand.

The second option is to detect skin color: http://bytefish.de/blog/opencv/skin_color_thresholding/

Or is it better to use a hand detection based on xml files? To compare the images I wanted to use this method: http://docs.opencv.org/doc/tutorials/imgproc/histograms/histogram_comparison/histogram_comparison.html

Let me remind you that I'm talking about comparing the images to which they are gestures. I also read about the possibility of making the histogram is not the entire image only on the subject of the photo and then the data is more reliable, but do not know how to do it.

I want to compare the gesture as a single image, I do not mean here with the sequences. 1 picture for comparison with the baseline. Gesture detection is to enable someone eg. Will ring, and now I will have for example. 5 seconds to take pictures and compare them with the base because I'm not certain if appeared in the lens of the hand or not. Unless there is another solution.

Ultimately, it is to be a comparison of two images in which there will be some hand gestures.

If your goal is to perform gesture recognition, you should take into account that gestures are sequence of images. Thus, if you want to compare gesture you'll have to find a "smart" way to compare the whole sequences, and not single images, because one frame can belong to different gestures.

State of the art approaches for gesture recognition involves the extraction of the Optical Flow between two consecutive frames and then compute the histogram of optical flow (HOF). Having computed the histograms for all the frame pair in the video sequence, you can use different strategies to compare gestures:

  • You can concatenate all the HOF in the sequence and then perform histogram intersection to compare the two sequences
  • You can use the Bag of Word paradigm to create a representation of the HOF

Here there are some pointers to this strateies:

  • Optical Flow
  • You can check this article for extracting HOF: "Histograms of Oriented Optical Flow and Binet-Cauchy Kernels on Nonlinear Dynamical Systems for the Recognition of Human Actions"[Bag of words]
  • Bag of Words

However, if your application requires just the comparison between two images, I would suggest to extract the Histogram of Gradient (HOG) for each image and then compare them with the histogram intersection measure or, again, use the Bag of words paradigm (it is better if you're looking for higher level representations of the images). The HOG are provided within the OpenCv libraries link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM