Friday 15 February 2013

c++ - How to stablize the circle from video stream using opencv? -


I have started using OpenCV a few days ago, my purpose is to find a circle and its center, I Skin is used, consequently, I am using a webcam of 640x480 resolution, it is working, but the circle keeps changing its position, to better understand it, I grab a screen on YouTube Figured / given the code here, yes i know a little bit Mr. disturbances.
First full video is shown, when the camera is stationary I press ESC, then the processing ROI starts at 250x250.
I have added some trackbars to change the parameters of the Hoo Transformation, staining, does not solve the problem - how to freeze the circle? Apart from this, the camera will not be transferred so that no tracking is required. Or should I adopt a whole new method of doing this? According to my understanding, I have to implement certain types of filters. There are many circular shapes of the object, but all have the same center, so any contour of the circular was detected properly.

PS: I am not an image processing specialist, I have prepared code from various sites and books

How changes are known to be error prone.

For your case, you can find outline in your image and filter them by your measurement.

1- Grayscale

2- The following near filter (Gaussian blur)

3- Detect edge

4- Find shapes And make a list of your localities.

5- Drag the moving circles into your contour.

6- Select contour which has the lowest circle area near the contour area.

Find the center of contour using the 7 F3 type "Mass Centers"

No comments:

Post a Comment