Page 1 of 1

-intensity documentation

Posted: 2017-11-30T09:18:32-07:00
by snibgo
The page http://www.imagemagick.org/script/comma ... #intensity says:
Typically the linear Rec709Luminance formula is used, which is the same formula used when converting images to -colorspace gray.
This is wrong, as "-colorspace gray" uses the Rec709Luma formula. It always has. This can be shown:

Code: Select all

f:\web\im>%IMG7%magick ( toes.png -colorspace Gray ) ( toes.png -grayscale Rec709Luma ) -metric RMSE -format %[distortion] -compare info:
0

f:\web\im>%IMG7%magick ( toes.png -colorspace Gray ) ( toes.png -grayscale Rec709Luminance ) -metric RMSE -format %[distortion] -compare info:
0.261518

Re: -intensity documentation

Posted: 2017-11-30T10:38:12-07:00
by fmw42
You are correct. It must be a typo or a remnant from when grayscale was linear.

Also I would have expected these formulae to be using non-liner, R', G' and B' values rather than the linear R, G, B

Average (R + G + B) / 3.0
MS (R^2 + G^2 + B^2) / 3.0
RMS sqrt( (R^2 + G^2 + B^2) / 3.0 )

Was it intended to use linear combinations here or is this also a remnant form the days when single channels were linear?