Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how can a detect and get co-ordinates for a circle with changing size

From what i have seen, a combination of colour thresholding with background subtraction should give a high quality binary image with not much noise. Though i am concerned that i will not be left with a perfect circle when the ball is far away. My biggest obsticle at the moment is tracking the ball because it is not left as a perfect circle.
I just need to view the playing area and have co-ordinates of the ball
Message Edited by CTFC on 08-19-2008 08:40 AM
0 Kudos
Message 11 of 18
(2,116 Views)

 


I just need to view the playing area and have co-ordinates of the ball

 

 

That you can do.I see the lens selection as being the critical thing in your project. 

Message 12 of 18
(2,109 Views)

Im sorry i hadnt seen that as part of the project. Could you give me any advice on how to choose a lens?

Also could you recommend which way for me to recognise the ball from the player in my binary image. eg: by size or shape.

 

Thanks

Message Edited by CTFC on 08-19-2008 09:31 AM
0 Kudos
Message 13 of 18
(2,100 Views)

Here to begin with.There are various lens providers like navitar.Once you have got yourself familiar with the basic terminology log on to the lens providers website to select a suitable lens.

 

 

Message 14 of 18
(2,091 Views)

A few thoughts I have:

 

I would think taking an image of the field without anybody on it would work pretty well to represent the background.  Subtracting the background from each image using absolute subtraction would leave the player and ball as pretty bright objects.  If this is indoors the lighting will be more constant.  Outdoors the brightness could vary significantly, especially on a partly cloudy day.

 

You might want to consider marking the player and the ball.  For example, get a bright red ball and have the player wear red armbands and leg bands.  Put a red filter on your camera and you will see the red items pretty clearly.  You would still have to subtract the background, but it would probably be easier.  Matching the colors of red could be difficult, though.  If you are using a color camera (without color filter), you could look at the hue and color threshold the reds.  You could also do two different colors for the player and the ball and search for them separately.  This would eliminate the need for subtracting the background.

 

If you can, use a grayscale camera.  Color cameras are a trade-off:  You lose resolution and detail, but gain color information.

 

A wide angle lens will have a pretty big depth of field, so focusing on the ball shouldn't be too difficult unless the ball gets very close to the camera.  If your budget is tight, you could probably prototype this with a webcam.  They tend to have fairly wide angle lenses.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 16 of 18
(2,072 Views)

Thank you Bruce,

That clears up a few things for me. I think I will be using a webcam to prototype the project. I didn't know about greyscale cameras having better detail so i will consider that. The area is indoor so hopefully the light will be consistant.

Thanks for your thoughts

0 Kudos
Message 17 of 18
(2,066 Views)

 


The area is indoor so hopefully the light will be consistant.

 

Just a caution. Obtaining consistency in illumination even indoor is a nice challenge dont consider it to be very easy. 

0 Kudos
Message 18 of 18
(2,039 Views)