Page 1 of 1
Possible bug: -intensity has no effect on -white-threshold?.
Posted: 2013-10-31T13:33:17-07:00
by Dabrosny
The -intensity setting appears to have no effect on the result of applying some of the operators they are said to affect, for example the -white-threshold operator:
Code: Select all
imh convert rose: -intensity rec709luminance -white-threshold 32768 -format "%[colorspace] %[fx:mean]\n" -write info: roseIntLumINANCE.png
sRGB 0.469752
imh convert rose: -intensity rec709luma -white-threshold 32768 -format "%[colorspace] %[fx:mean]\n" -write info: roseIntLumA.png
sRGB 0.469752
The resulting images appear to be the same (not just their means) but I was expecting them to be different because one uses -intensity rec709lumINANCE while the other uses nonlinear rec709lumA.
Is this a bug?
ImageMagick 6.8.7-0 2013-09-30 Q16 DPC HDRI Cygwin under Win7 64bit
Re: Possible bug: -intensity has no effect on -white-thresho
Posted: 2013-10-31T14:58:22-07:00
by fmw42
I get the same results as you. I am using 6.8.7.5 beta Q16
Code: Select all
imb convert rose: -depth 16 -intensity rec709luminance -white-threshold 32768 -format "%[fx:mean] %[colorspace] %[type] %[gamma]\n" -write info: roseIntLumINANCE.png
0.469752 sRGB TrueColor 0.454545
Code: Select all
imb convert rose: -depth 16 -intensity rec709luma -white-threshold 32768 -format "%[fx:mean] %[colorspace] %[type] %[gamma]\n" -write info: roseIntLumA.png
0.469752 sRGB TrueColor 0.454545
It would appear that -intensity rec709luminance -white-threshold is not sensing the linearity for luminance
Same for -black-threshold
Code: Select all
imb convert rose: -depth 16 -intensity rec709luminance -black-threshold 32768 -format "%[fx:mean] %[colorspace] %[type] %[gamma]\n" -write info: roseIntLumINANCE.png
0.216191 sRGB TrueColor 0.454545
Code: Select all
imb convert rose: -depth 16 -intensity rec709luma -black-threshold 32768 -format "%[fx:mean] %[colorspace] %[type] %[gamma]\n" -write info: roseIntLumA.png
0.216191 sRGB TrueColor 0.454545
Though it partially works for -threshold as in my independent bug report
Re: Possible bug: -intensity has no effect on -white-thresho
Posted: 2013-10-31T20:58:05-07:00
by fmw42
I believe that currently the way that -intensity rec709luminance works with function other than -colorspace gray, is that it needs to be preceded by -colorspace RGB. The conversion to gamma=1 is not automatic as it is with -intensity rec709luminance -colorspace gray.
Testing in IM 6.8.7.5 beta, I get the following
-black-threshold:
Code: Select all
imb convert rose: -depth 16 -colorspace RGB -intensity rec709luminance -black-threshold 32768 -format "%[fx:mean] %[colorspace] %[type] %[gamma]\n" -write info: roseIntLumINANCE.png
0.136732 RGB TrueColor 1
imb convert rose: -depth 16 -intensity rec709luma -black-threshold 32768 -format "%[fx:mean] %[colorspace] %[type] %[gamma]\n" -write info: roseIntLumA.png
0.216191 sRGB TrueColor 0.454545
-white-threshold
Code: Select all
imb convert rose: -depth 16 -colorspace RGB -intensity rec709luminance -white-threshold 32768 -format "%[fx:mean] %[colorspace] %[type] %[gamma]\n" -write info: roseIntLumINANCE.png
0.253591 RGB TrueColor 1
imb convert rose: -depth 16 -intensity rec709luma -white-threshold 32768 -format "%[fx:mean] %[colorspace] %[type] %[gamma]\n" -write info: roseIntLumA.png
0.469752 sRGB TrueColor 0.454545