Ask Your Question
0

Image detection

asked 2014-09-09 05:30:13 -0500

xpete gravatar image

updated 2014-09-09 06:23:43 -0500

thdrksdfthmn gravatar image

Good morning. We’re working in a computer vision Project, running on mobile devices with android operating systems; the goal of the application is to detect (through the device’s camera) if a specific image is exactly the same as the reference image. We are using the OpenCV library and following the tips on this book. we’ve already made several experiences using “STAR”, “FREAK” and “BRUTE FORCE HAMMING” and we are still stumbling on a huge obstacle: the application recognizes/ accepts the correct image, but also a similar image (with little variations). We need that the application recognizes ONLY the exact image. Do you have any suggestions?

edit retag flag offensive close merge delete

Comments

Pattern match, or pixel by pixel comparison

thdrksdfthmn gravatar imagethdrksdfthmn ( 2014-09-09 06:22:34 -0500 )edit
1

Please give examples of near identical images. If only several pixels differ, then the camera lighting conditions will ruin your application. On the other hand if you compare an image with a dog and the dog is only 10% of the image but the other 90% is identical, then it is normal that the previous named techniques show it identical. If you want to avoid that, you would need a very controlled environment, to make sure a single image generates the same feature points in every single situation. That sire, doesn't exist for the moment as a ready to plug and play solution in OpenCV.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-09-09 07:56:08 -0500 )edit
1

This one is very similar.

thdrksdfthmn gravatar imagethdrksdfthmn ( 2014-09-09 09:04:01 -0500 )edit

thanks for the replies. pixel by pixel comparison is too slow.

xpete gravatar imagexpete ( 2014-09-21 14:07:04 -0500 )edit
1

Then PLEASE supply information ... do not expect to gain much help with such reactions...

StevenPuttemans gravatar imageStevenPuttemans ( 2014-09-22 05:50:16 -0500 )edit

I have an image that is 90% equal but 10% or more can change like you said. Image you have an image with 4 quadrants and 2 are switched from the original but it still recognizes if it was the original image.

xpete gravatar imagexpete ( 2014-09-22 11:27:33 -0500 )edit
2

Add images ...

StevenPuttemans gravatar imageStevenPuttemans ( 2014-09-23 03:48:18 -0500 )edit

1 answer

Sort by » oldest newest most voted
2

answered 2014-10-30 08:35:40 -0500

Doombot gravatar image

Well, you must first take into account the comments made below your question. I would just like to add a remark that could be an answer for your problem, or for other viewers.

Actually, you must know what you really want to do. You say that you want to tell whether a query image is identical to a model image or not. As some pointed, "identical" can take a lot of meanings when you you think about it. Identical could mean that every single pixel on the image has the same intensity or colour value. Then only a pixel by pixel comparison can give you a 100% match; when you think about it, the only way is to verify every one of them.

This said, maybe "identical" bears another meaning. Maybe you mean that everything is the image is identical but the global illumination might vary.

Then, maybe an image is "identical" but actually there is a random small noise added that changes the value of some pixels. So you really got to know precisely what is the criterion of a match. Maybe it was pretty clear in your mind when you asked the question but it can be confusing for another person.

So, now a comment about keypoint-descriptors. By themselves, they have no knowledge of their global positioning on the image, I mean that the first keypoint do not take into account that there is a second keypoint a couple of pixel away when you do the matching. So as you may have realized, by matching the keypoint with a simple score metric, you are actually counting how much of the keypoint have a correct match, not if the matched keypoint is correctly positioned in relation to the others. This mean that if you have the same image but it is rotated, a correct match will arise (which is generally the behaviour you want with these detectors). So, as you have realized they are not the best choice for your situation.

Now, you said that a pixel by pixel comparison is too long. But what about looking only at every 2, or 3 pixels? What is the chance that, using a regular "grid" comparison pattern, that the image will only vary in the pixels that are not looked at? Again, it depends on what is your "identical" requirement; if a single pixel variation between the two images is a "no go", you must check everyone of them.

It makes me think that, depending of the meaning of your "identical", you could still use a keypoint detector. Think about it: you compute the keypoints (not the descriptors) of both the model and the query images. You will have the knowledge of the location of every keypoint detected. So you might simply compare the x-y coordinates of the keypoints, and if like 99% (or whatever percentage fits your needs) of the match, then you may affirm that it is the same image.

The bottom line : There seems to be a couple ... (more)

edit flag offensive delete link more

Comments

1

Nice addition!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-30 08:58:09 -0500 )edit

Thanks! :)

Doombot gravatar imageDoombot ( 2014-10-30 09:02:20 -0500 )edit
2

I would complete to subtract the images and then to use countNonZero() function to see if there is a perfect matching or not (instead of comparing each pixel pair).

thdrksdfthmn gravatar imagethdrksdfthmn ( 2014-10-30 11:32:15 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-09-09 05:30:13 -0500

Seen: 364 times

Last updated: Oct 30 '14