Binary image matching
Anthony from Australia  [3 posts]
7 years
Hi guys, I am trying to create a program for detecting how far an object has been displaced. So far I have managed to use filters to extract 6 white dots that are on the object I am looking for, but cannot seam to find a way to use this to identify the position and rotation of the object. I have tried using the object recognition, but it did not find any matches, even when the training image was cut straight out of the test image, and also the shape matching, but that does not work either, I am guessing because it only looks at individual blobs.

Can someone please recommend how they would find the 6 dots (sometimes 8, can ignore the two small ones) in the sample image? There is normally only a small amount of noise, but occasionally one dot will be missing!

(I realize this can be cropped and a few other filters can be applied like size to make this easier, but sometimes the noise is in the rectangle of dots!)


Anthony from Australia  [3 posts] 7 years
Here is the first image again as it did not work!

Steven Gentner from United States  [1423 posts] 6 years

Can you mention what kind of change you'd expect the dot pattern to do? I.e.

1. Movement - I assume it may move up or down as seen in the image?
2. Scale - does it change in size (relative distance between dots)
3. Z Rotation - does it change in orientation (twist). Can it appear upside down?
4. X,Y Rotation - does it rotate in the X and Y planes? I.e. would you ever spin the pattern such that the height would stay the same but the width may decrease as the pattern's plane rotates?

The reason for the questions is that the more things can change the harder and slower it is to recognize. Scale is not too bad but out of plane rotation requires dealing with perspective distortion which really complicates the solution. Knowing your context can help provide a simpler answer.

Anthony from Australia  [3 posts] 6 years
Thanks Steven,

The size should not change, Although it would be nice if it could handle 10% change or so. (Dots are fixed distance apart.)

It may move up/down and left/right by only as much as about 1cm.

There is no Z rotation. it is sitting on a flat surface.

There is xy rotation, up to sav 30 deg.

What would you suggest is there best method would be? Id does not have to run in real time. I can take an image every minute or so and only analyse that single image.


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index