# Discussion Board

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

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

3. 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. 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. 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. 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

7. 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. 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. 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