In my application I want to capture two images using camera and then I want to compare those images.
So, how can I compare two images?
EDIT:
Compare First image is exact as second image pixel to pixel.
Thank You.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. Check that the height matches, if not return false. Then, check if the width matches, and if not, return false. Then check each pixel until you find one that doesn’t match. When you do, return false. If every pixel matches, return true.
Pseudocode:
in reality, you probably want to treat the image as a two dimensional array if you can, and just compare bytes. I don’t know the Android image API, but getPixel might be slow.
2. maybe you convert the images in to byte64 Strings and then compare them.
3.**OpenCV lib for Android :
have to functions for images compression
**a.
Core.absdiff()b.Core.compare()for more details see comparing two images