First time here? Check out the FAQ!

Ask Your Question
0

Probability of two images matching?

asked Nov 15 '16

Phteven gravatar image

Hello everyone.

I have tons of binary images and want to sort them according to their similarities of a template. So i load a template and one of the test images. then i want to compare both of them (they are all of same size) and as result have a value in percentage that the image is matching the template. Once i get this percentage value, i am already able to sort the test images, i just need a way to calculate the similarities. the opencv matching method (http://docs.opencv.org/2.4/doc/tutori...) doesnt seem to do the trick as far as i can see.

anyone suggestions?

Preview: (hide)

2 answers

Sort by » oldest newest most voted
0

answered Nov 18 '16

Phteven gravatar image

updated Nov 18 '16

HU moments look promising but seem a bit "too much" for my cause.

I am using maximum boundary deviation (MBD, Hausdorff distance) which seems to be used in gesture detection systems and getting excellent results. It was easy and fast to implement and is independet of other steps (threading!) Note: if there are outliers, use the 2. last MBD value instead of the last. or the 3. last or ...

Source: Formula 15 of http://waset.org/publications/13743/t... Trajectory Guided Recognition of Hand Gestures having only Global Motions M.K. Bhuyan, P.K. Bora, and D. Ghosh

Preview: (hide)
1

answered Nov 15 '16

Tetragramm gravatar image

How exact a match? If they all have the same alignment, just do absdiff() then sum().

If you have to worry about mis-alignment errors and don't have too the same image with a different alignment, you can use the HU moments. They're translation, rotation and scale invariant, so that's what you have to look out for as far as similarities.

Preview: (hide)

Comments

all templates show symmetrical (both axes) figures. the only way they differ from the test images is in line thickness and exact shape. i take a look into the hu moments they look promising. thank you

Phteven gravatar imagePhteven (Nov 15 '16)edit

If they're symmetrical you should cut along the axes and just use one quarter. Much smaller data size and it'll likely work better.

Tetragramm gravatar imageTetragramm (Nov 15 '16)edit

Question Tools

1 follower

Stats

Asked: Nov 15 '16

Seen: 744 times

Last updated: Nov 18 '16