Open cuilantao opened 4 years ago
I tried to compare the sample png file with the ppm file using openCV library, but it doesn't seem to work
I'm personally using imagemagick.
Here's an example of the compare command:
compare -verbose -metric MAE images/rgb.png build/rgb.ppm null: 2>&1
Here, I use the MAE (mean absolute error) to measure the difference between the source image and my output image.
You'll see a pairwise comparison (pixel by pixel) of distortion per channel. If it's zero for each channel, you're probably good. If it's some non-zero value, there's some amount of discrepancy, possibly significant. There are lots other metrics you can use to compare image similarity besides MAE.
I don't know any other way. Maybe construct some simpler test images will help?