3

I'm working on a program in PYTHON which is able to do the following:

A webcam is watching a movement, where an object is moving on a path. The object to be tracked is marked with a big yellow spot. I have to find this yellow spot, then calculate the center-point of this spot, and then make some calculations with it. It would be awesome, if the centerpoint would draw on the picture, and it remains there the whole time.

How would you make it happen? I1ve already looked at PIL, pygame and OpenCV but i can't find any working solution, only half-solutions. In what steps would you do it?

Thanks for your help, D

1
  • 1
    I think OpenCV will be the best for this. You may find motion with motion detection algorithm. If you will use gaussian filter on motion velocity vectors and will try to detect motion object shape (shape that were moved) you may see good results. Check this book cse.iitk.ac.in/users/vision/dipakmj/papers/… chapter 10. Also prefiltering of image may help a lot. Play with Morphology open/close operations or gaussian filter. With filtering you may remove artifacts and noise. Commented Aug 31, 2011 at 13:26

1 Answer 1

2

Here's a nice demo (using Python and OpenCV) that seems to be what you're looking for: video, code

Whether this will work for you without modification depends on the details of your spot. The example uses cvHoughCircles to identify the circle, and if your object isn't a circle, you'll need to replace this.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.