find Centre of ball/3D model of picture
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
i want to find the centre of ball (almost solved thanks every one for helping)
Now i want to create the 3D model of this picture which includes (Pitch ,wickets,and grass) how I can do this kindly help
THANKS
3 Kommentare
Walter Roberson
am 9 Feb. 2012
A matter is either urgent or it isn't.
I have removed the "urgent" indicator from the title.
Antworten (5)
awais rehman
am 9 Feb. 2012
4 Kommentare
Anton Semechko
am 9 Feb. 2012
So do you still insist that you want to detect the ball automatically? Or are you willing to click on the image a couple of times to help locate the ball?
Image Analyst
am 9 Feb. 2012
Look for dark regions, not white. I'd take one of the color channels and then threshold for dark stuff. Then do some size filtering and shape filtering. See my BlobsDemo for an example of how to do segmentation. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
0 Kommentare
Pramod Bhat
am 9 Feb. 2012
k. first crop out the unwanted portion of the image - that is background. Now only the ball remains in the image. now consider the middle row and middle column of the matrix. find the indices of the first and last non-zero element of both the mentioned column and row. find the length of them. the intersecting point is the center of the ball.
5 Kommentare
Matt Tearle
am 9 Feb. 2012
Are you doing this on a sequence (ie tracking frames of a video), or do you know anything else about the setup that could help you (like the camera position & zoom is fixed)? For example, in a video sequence, you expect the ball to appear at the bottom center of the frame as it leaves the bowler's hand. For most of it's flight, you expect it to be against a background of the pitch. And, in a video sequence, you expect the position to change in small increments from frame to frame. This could help you eliminate the false findings.
Also, you might be able to use the fact that the ball color is probably unique.
Image Analyst
am 9 Feb. 2012
Yes, there are other dark regions there so you will have to do something to determine which is the ball, like compare video frames before and after and look for the regions that didn't change position much, or check for the shape (perimeter^2/(4*pi*area)), or something like that.
awais rehman
am 13 Feb. 2012
4 Kommentare
Image Analyst
am 13 Feb. 2012
Sorry I'm too busy with my real job to take on unpaid consulting jobs. To make a robust system is going to take more than a couple of minutes. Most of the code I paste here in Answers is just pulled from and adapted from existing demos I have done, so I don't really spend that much time on them even though it may look like a lot of code.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!