Image comparison - How to read an image so you can compare pixels?
I am writing a program in C that compares two images taken by a camera to see if they are different. I have an idea of how to do this, by putting the images into 2 dimensional arrays and comparing the RGB value at corresponding array positions, however I cannot figure out how to get the image into an array.
I've found a ton of example of how to do this in C#, but that's not so helpful. The only bit of C code I've been able to find uses fread() to read the images but that doesn't seem to work.
I've also heard some suggestions that converting the images to greyscale is helpful in comparing the pixels. Agree? Disagree?
Thanks in advance.