Question

I am working on the app where suppose I capture the picture of the tool like hammer or anything and later I again capture it then here I need to compare whether the tool is same so it is similar like to whether both picture are similar.

I have got one idea to do this to check the RGB pixels value of the both captured image and take the average then compare them. If both are probably near then it means both are same but that would take much time.

Any other better solution to do this in Android ?

Was it helpful?

Solution

looking for a hammer (or any other object) in a picture is not the same as a straight pixel comparison between images.

you'll need far more refined techniques to achieve this, prepare for hard work.

look at feature detection or cascade-classifiers for object-detection.

OTHER TIPS

you can specify several regions on your image and check the RGB pixels value of the both captured image.

like :

enter image description here

It's better than comparison all the pixels. see : http://www.lac.inpe.br/JIPCookbook/6050-howto-compareimages.jsp

Image comparison is a rather complicated task. As a start, I'd check out the OpenCV library, which has been ported to Android (and other platforms).

In one my projects I was gathering face images from camera. But I needed to somehow figure out if faces that are found are similar. I have no recognition model at the beginning, so this means I can't tell opencv to recognize them. No data no classification.

Since I was gathering faces for training some preprocessing to determine labels would be really helpful. So I used relative L1 and sometimes L2 distance to calculate similarity of found faces. Check what relative difference is here

So if you are not talking about object recognition like finding all kind of hammers in the scene which really requires great effort, you can use this norm approach. By using this you can check if your new image close to hammer,ball or etc. Size will be a problem, this could be overcome by using a pyramid approach.

Note that this is even worst than a mid level object recognition approach. But it can be used for simple problems like my preclassification of face images from the camera.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top