6

I'm doing a project for the university and I'm working with OpenCV (that is really awesome).

Now my problem is:
I have a video (.avi) and I have detected all the information I want to know about the blobs that suddenly appear in the RGB range between red and yellow. After I have realized a matrix that saves all the information about the pixel values, finally I create an image in the scale of red that represents the median pixel values.

The real problem is that the video is not static and the camera moves (not too much but it moves).
Can I calculate the x and y coordinates of the camera motion so I could shift the value of the matrix?

rsp
  • 23,135
  • 6
  • 55
  • 69
Lorenzo
  • 673
  • 1
  • 11
  • 25

1 Answers1

4

Who cares about your English? Till we understand your problem :) What you could really do is to give a shot at KLT motion detection that is implemented in OpenCV. Here is a link to KLT also known as optical flow If you can filter down the motion vectors limited to the blobs you can certainly get hold of the object you want to track. Even better to give KLT the objects initial coordinates/area to track. Have you checked OpenCV blobs library to get hold of the blobs? Here is the link

  • thank you! yes i know the cvblob and it is implemented in my project, i calculate the area of the blob and the coord of the centroid and it assign a label for each blob, as i read before the best solution is the optical flow, i hope it will work! the camera motion is really slow and if i can detect the coord with the optical flow i've finished this project! :) thank you! – Lorenzo Oct 20 '12 at 07:49
  • Welcome, let me know if you did it! –  Oct 20 '12 at 07:56
  • Yeah i did it! i've done it with lucas kanade, i calculate the difference between a series of point in each frame and the result is quite good! Thank you! – Lorenzo Nov 08 '12 at 09:37
  • 1
    Very nice! Its one of the few things in many that REALLY works in computer vision –  Nov 08 '12 at 14:10