While using imagemagick for some JPEG2000 to TIFF conversions, I noticed a problem with the resulting file. I was also using a professional DCinema encoder to create the JPEG2000 image, could compare resulting TIFF image that was converted using imagemagick (from the JP2K file that was encoded using the professional app), to the original source TIFF file.
The conversion was not quite right, and the image was slightly brighter. After a lot of searching and reading, I found out that in the imagemagick command line, there was no function to fix the Normalization Factor for White Point in DCinema, using the Luminance level 48 cd/m2 for a Peak of 52.37 cd/m2.
So, for the command line in the Open-source-tools-for-a-digital-cinema-pipeline Wiki to be correct, the following change would need to be applied:
for f in *tiff; do echo $f; convert $f -alpha off -depth 12 -gamma 0.454545 -resize 1998x1080 -recolor "0.4124564 0.3575761 0.1804375 0.2126729 0.7151522 0.0721750 0.0193339 0.1191920 0.9503041" -evaluate multiply 0.9166 -gamma 2.6 xyz-2.6-$f; done
The "0.9166" is the constant from the calculation of 48/52.37 that should be applied to all pixel values after the matrix color change and prior to gamma adjustment.
While using imagemagick for some JPEG2000 to TIFF conversions, I noticed a problem with the resulting file. I was also using a professional DCinema encoder to create the JPEG2000 image, could compare resulting TIFF image that was converted using imagemagick (from the JP2K file that was encoded using the professional app), to the original source TIFF file.
The conversion was not quite right, and the image was slightly brighter. After a lot of searching and reading, I found out that in the imagemagick command line, there was no function to fix the Normalization Factor for White Point in DCinema, using the Luminance level 48 cd/m2 for a Peak of 52.37 cd/m2.
So, for the command line in the Open-source-tools-for-a-digital-cinema-pipeline Wiki to be correct, the following change would need to be applied:
for f in *tiff; do echo $f; convert $f -alpha off -depth 12 -gamma 0.454545 -resize 1998x1080 -recolor "0.4124564 0.3575761 0.1804375 0.2126729 0.7151522 0.0721750 0.0193339 0.1191920 0.9503041" -evaluate multiply 0.9166 -gamma 2.6 xyz-2.6-$f; done
The "0.9166" is the constant from the calculation of 48/52.37 that should be applied to all pixel values after the matrix color change and prior to gamma adjustment.