# Thread: compare 2 images

1. ## compare 2 images

Hello,
I want to compare two jpeg images (C + +).
pixel by pixel? how??

2. ## Re: compare 2 images

See this thread opened some days ago:
http://discussion.forum.nokia.com/fo...d.php?t=162539

3. ## Re: compare 2 images

Thank you for the answer
What I understood from this link that the comparison pixel by pixel is not the right solution? no alternative

4. ## Re: compare 2 images

Have you considered a Google search for "image comparison algorithm". The problem is not at all mobile or Symbian specific, you just have to find the best technical solution and then make it work on the mobile environment.

5. ## Re: compare 2 images

ARGH.

WHAT do you want to achieve by the comparison? Do you just want to see if they are coming from the same file, or do you want to perform more advanced comparisons?

6. ## Re: compare 2 images

Thank you ,
I want to compare the contents of two images to detect movement
example :I have a reference image and I want to compare each time with another captured by the cam

sorry for my bad English

7. ## Re: compare 2 images

Have you done your research, as already recommended above? Here's another link for you: http://en.wikipedia.org/wiki/Motion_detection See the reference links at the bottom of the article.

Also, see http://discussion.forum.nokia.com/fo...d.php?t=114449

8. ## Re: compare 2 images

Planar offset of one image relatively to another generally computed by Fourier phase correlation
http://en.wikipedia.org/wiki/Phase_correlation
You have to write or port FFT library to your application (Nokia CV library have no FFT) or if you have access to DSP you can use it instead)
http://en.wikipedia.org/wiki/Fast_fourier_transform
You can also write simple Fourier Transform implementation if performance not an issue.
And after that use it to calculate phase correlation (some libraries already have it built in).
There is a huge number of open sourced FFT libraries on the net.

There is another, more complex and less robust method - extract feature points from image, fit corresponding points on both images and calculate movement.
http://en.wikipedia.org/wiki/Blob_detection
IIRC Nokia CV library have some feature points and motion flow algorithm, but they are not robust.

9. ## Re: compare 2 images

Originally Posted by abdelbakiguesmi
Thank you ,
I want to compare the contents of two images to detect movement
example :I have a reference image and I want to compare each time with another captured by the cam

sorry for my bad English
Have you tried this http://research.nokia.com/research/projects/nokiacv/. But i prefer to write my own motion detection algorithm.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•