What are the steps involved in tracking an object.

1 回表示 (過去 30 日間)
siddharth
siddharth 2012 年 12 月 24 日
Hello Jurgen, I am working on a ball tracking project...I am a novice...can you please instruct me on what all steps are involved in tracking a ball,as i move it in front of my camera..

回答 (2 件)

Joseph Areeda
Joseph Areeda 2012 年 12 月 24 日
編集済み: Joseph Areeda 2012 年 12 月 24 日
I'm not Jurgen but hopefully you'll take comments from the peanut gallery.
I would break down the problem into these pieces:
  1. Identify the ball
  2. Determine its position
  3. Record the position
  4. plot or analyze
Identification is the hard part. It is greatly simplified if you have high contrast such as a bright ball against a dark background especially if the ball is a constant size that is not moving toward or away from the camera.
For something like that a simple thresholding technique works pretty well. Some simple algorithm to remove extraneous points might be needed.
Then the position could just be the center of gravity of the points identified as the ball.
What you end up with is the (x,y) position of the ball in the frame. Assuming a constant time per frame you can just store it in 2 vectors and use Matlab plot function to display it.
Joe
  1 件のコメント
siddharth
siddharth 2012 年 12 月 24 日
Hello Joe!! Thanks for taking the pain mate!!! Actually i have written a code which can track a orange colored ball on a completely black background. What my actual problem is that i am not able to track the ball when the background contains lots of noises...if you could help me with that :-)

サインインしてコメントする。


Image Analyst
Image Analyst 2012 年 12 月 24 日
編集済み: Image Analyst 2012 年 12 月 24 日
I'm not Jurgen either. Apparently he made quite a positive impression on you but perhaps I might also have something worthwhile to say.....
There is so much code on tracking in the File Exchange and in the documentation for the Computer Vision toolbox. Have you considered searching MATLAB Central?
In addition, I have several color segmentation demos in my File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
If you need help with noise, then run some noise reduction filters on your frames. Otherwise post the binary image of the object and we can suggest methods to clean up the noise, like imclose(), or bwareaopen() or something like that. http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers

カテゴリ

Help Center および File ExchangeComputer Vision with Simulink についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by