point tracking

Hello! I have avi videos where persons are talking about something with about 30 blue-marked point on their faces. How can i put the coordinates of this points into files? image:

edit retag close merge delete

Please post an image of the video. The initialization process has to be automatic or it could be manual? The camera is moving or only the people faces?

( 2013-03-12 03:50:45 -0600 )edit

Sort by ยป oldest newest most voted

If you have blue marked points that are clearly (means that they are not a half pixel wide) visible, then you could actually do the following

• Take the blue channel from your RGB image
• Normalize the blue colour channel for the other colours
• Look for local maxima (using some threshold region) in that image, it will be points with high blue components
• Create a binary mask for those maxima found
• Assign contours to those regions
• Calculate center points for those regions
• Save the center points to a txt file or something else that is desired.

Cheerz!

more

i have converted image to HSV and thresholded it. Now i have binary image where these blue points are white. Everything else is black. Now i have some problems: 1. What can i do with persons clothes(which could be the same colour as the points)? ROI? 2. May i assign contours to 64 points, calculate their centers and save into file in a real time?

image:

more

• For clothes, you could define a region of interest, only focussing on the upper points, since you actually know where the persons head will be. This can be done by the following command : Mat face = image( Rect( xUpperLeft, yUpperLeft, width, heigth) )

• Yes assign contours to 64 points, the processing should be pretty fast. The calculating of centers and saving to file, will take barely some milliseconds.

Go ahead! You will solve the problem :)

( 2013-03-19 14:09:42 -0600 )edit

Good evening! I have assigned contours of points on the face using cvFindContours(i have only points on the face, i used ROI to delete clothes). And now i have 2 questions. Does the order of the contour points save from frame to frame? How to move from contour to contour? Then i am going to use Moments to calculate center points.

( 2013-03-25 14:46:09 -0600 )edit

What you have to do is store the points for each frame manually in an object if you want to be absolutely sure that you have the same order. You could do it by storing them based on the x or y location and in raising order for example. If not, it is not guaranteed that indexes will always point at the same point, since it is recalculated for each frame.

( 2013-03-25 15:21:05 -0600 )edit

I have done function that calculates center points of contours using moments. But now i have 2 last troubles. 1. What should i do with persons eyes? Sometimes they detects with my program as blue-marked points. I've tried changing range values of HSV but it doesn't give a result. 2. The only one of blue-marked points disappears on some frames. How can i correct this?

image(1 eye detected):

image(2 eyes detected):

more