Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7675145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:53:44+00:00 2026-05-31T16:53:44+00:00

In my application I want to capture two images using camera and then I

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T16:53:45+00:00Added an answer on May 31, 2026 at 4:53 pm

    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:

    bool imagesAreEqual(Image i1, Image i2)
    {
        if (i1.getHeight() != i2.getHeight()) return false;
        if (i1.getWidth() != i2.getWidth()) return false;
    
        for (int y = 0; y < i1.getHeight(); ++y)
           for (int x = 0; x < i1.getWidth(); ++x)
                if (i1.getPixel(x, y) != i2.getPixel(x, y)) return false;
    
        return true;
    }
    

    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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my android application I use camera to capture photo. I want to print
I am using C# to develop, I want to use a camera to capture
I have an Application in that I want to capture video using Surfaceview and
In my application I want to capture image and save it to sdcard. I
This is a Windows application using C#. I want to capture a screen shot
My requirement is that i want to capture images when my application is running
win32 windows application and want to capture full screen and remove the border of
I am developing a Qt application on Red Hat Linux. I want to capture
I want to develop an application with a custom camera with one button over
I want to capture the print event from my asp.net web application and also

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.