Suhas .
asked on
comparing two images
please can anyone provide the code for comparing two images of any type(ppm,pgm,pbm,jpg etc..) and the output will be the number of pixel difference.
Thanks in advance.
Thanks in advance.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
Try to serialize the data as a bit stream.
Then you perform an XOR operation and you got the results. Only different bit pairs are resulted.
Try to serialize the data as a bit stream.
Then you perform an XOR operation and you got the results. Only different bit pairs are resulted.
ASKER
Yes,
using fopen we can get the data of two files and comparing byte by byte we get the no. of difference in bytes.
can you please send the code to comare two images of any type?
using fopen we can get the data of two files and comparing byte by byte we get the no. of difference in bytes.
can you please send the code to comare two images of any type?
That's a bit too much work for us to do it for you ... instead read the suggestion made by cup again, and try to work it out yourself. If you have specific questions and or problems about that, feel free to ask them in this thread, and we'll be glad to help you out with them.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi srinims,
can you just give me one example of how to use gdiplus?
also how to convert rgb to hsb and hsb1~hsb2 -> rgb
Thanks,
suhas
can you just give me one example of how to use gdiplus?
also how to convert rgb to hsb and hsb1~hsb2 -> rgb
Thanks,
suhas
The reason this is a better approach, is because all images are represented differently, and not all of them store the data pixel by pixel. Some are extrapolated, others use vectors. There's also compression to take into account. In the end it's easier to convert to eg. PNG or GIF like cup suggested.