Hi,
I am using the ImageMagick C++ API.
I try to differentiate the Color/Black & White image as the description in this link:
http://www.imagemagick.org/Usage/compare/#type_general
So, in Code:
Magick::Image source( "color.jpg" );
Magick::Image image = source;
image.type( GrayscaleType );
source.compare( image );
source.meanErrorPerPixel();
source.normalizedMaxError();
source.normalizedMeanError();
However, all meanErrorPerPixel, normalizedMaxError, and normalizedMeanError return zero.
The comparison seems working if replacing the line "image.type( GrayscaleType );" with "image.solarize();"
So, what happened? and how to make it work?
Thanks!
Image comparison in C++
Re: Image comparison in C++
The problem is that the colorspaces differ (RGB vs. Grayscale), however for this special case it should compute the error. We will add a patch to ImageMagick-6.3.5-7 Beta by tommorrow.
Re: Image comparison in C++
Hi,
I downloaded and compiled the latest ImageMagick-6.3.5-7 Beta code.
I am getting the same result. I wonder if the problem hasn't been fixed?
Thanks!
I downloaded and compiled the latest ImageMagick-6.3.5-7 Beta code.
I am getting the same result. I wonder if the problem hasn't been fixed?
Thanks!