Ask Your Question
2

point tracking

asked 2013-03-09 06:48:51 -0600

iamx4nd3r gravatar image

updated 2013-03-19 11:39:31 -0600

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:alt text

edit retag flag offensive close merge delete

Comments

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?

Mathieu Barnachon gravatar imageMathieu Barnachon ( 2013-03-12 03:50:45 -0600 )edit

3 answers

Sort by ยป oldest newest most voted
5

answered 2013-03-19 08:45:49 -0600

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!

edit flag offensive delete link more
0

answered 2013-04-06 09:44:25 -0600

iamx4nd3r gravatar image

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):alt text

image(2 eyes detected):alt text

edit flag offensive delete link more

Comments

Basically, one single think about eyes versus dots, is that the points of the eyes are not in every single frame. What you could do is check if in two following frames, the dots are still in the neighbourhood (euclidean distance thresholding) OR you could define what an eye blob is, which is basically a blob that has a larger distance to the closest other points than all the others. Also this can be done by thresholding or looking for an amount of blackpixels around it :)

StevenPuttemans gravatar imageStevenPuttemans ( 2013-04-06 10:55:35 -0600 )edit
0

answered 2013-03-19 13:48:35 -0600

iamx4nd3r gravatar image

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:alt text

edit flag offensive delete link more

Comments

Nice result already. To continue this way I will answer your question again.

  • 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 :)

StevenPuttemans gravatar imageStevenPuttemans ( 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.

iamx4nd3r gravatar imageiamx4nd3r ( 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.

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

Question Tools

Stats

Asked: 2013-03-09 06:48:51 -0600

Seen: 2,065 times

Last updated: Apr 06 '13