Ask Your Question
0

Calculate the location of object on solid background..

asked 2014-06-17 15:38:47 -0600

Teck gravatar image

If I have an image like this: http://i.imgur.com/3jbQNWg.jpg

What would be the best way to calculate the location of the dot on the image? Currently I'm learning to do this with solid images, but plan to end up doing this with a web cam. Essentially I'm using image subtraction because my background will never change.

Any tips would be appreciated.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-06-17 17:39:31 -0600

unxnut gravatar image

You should be able to find the location of dot using minMaxLoc. Look for the max location point for the white dot. As long as you have a single dot, this should give you the correct answer.

edit flag offensive delete link more

Comments

Will that still work if there are small variations in background noise or the size of the dot, or the color of the dot?... Because the dot is not a solid white..

Teck gravatar imageTeck ( 2014-06-17 18:32:12 -0600 )edit

You should be able to process the image to remove the background noise. And yes, it will work as long as the dot is brighter than the background.

unxnut gravatar imageunxnut ( 2014-06-17 18:38:41 -0600 )edit

Question Tools

Stats

Asked: 2014-06-17 15:38:47 -0600

Seen: 224 times

Last updated: Jun 17 '14