Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
#! /bin/bash
# Apply DSLR channel multipliers, obtained from
# https://www.dxomark.com/Cameras/Canon/EOS-450D---Measurements
# ImageMagick -color-matrix
# To run script from command line in Windows OS replace \ with ^ AFAIK...
# Canon 450D
# R sRGB G sRGB B sRGB
# R raw 1.91 -1 0.09
# G raw -0.19 1.65 -0.46
# B raw 0.07 -0.7 1.64
# Color matrix as defined in ISO standard 17321
# Play around with multipliers for Ha modded cameras
convert in.jpg -depth 16 -color-matrix \
"1.81 -0.8 0.07 0.0, 0.0, 0.0 \
-0.16 1.51 -0.4 0.0, 0.0, 0.0 \
0.05 -0.5 1.5 0.0, 0.0, 0.0 \
0.0 0.0 0.0 0.0, 0.0, 0.0 \
0.0 0.0 0.0 0.0, 0.0, 0.0 \
0.0 0.0 0.0 0.0, 0.0, 0.0" -alpha off out.jpg
animate -delay 100 -loop 0 -resize 800x600 -page 800x600 in.jpg out.jpg
exit
The data behind the matrix may assume pixels values are linear, not sRGB (or AdobeRGB or whatever). If so, put "-colorspace RGB" before the matrix and "-colorspace sRGB" after it.
snibgo wrote: ↑2017-07-22T19:50:23-07:00
The data behind the matrix may assume pixels values are linear, not sRGB (or AdobeRGB or whatever). If so, put "-colorspace RGB" before the matrix and "-colorspace sRGB" after it.
That fits in with the workflow. Plan is to apply this to linear images.
The 4th and 5th column seem redundant and likely unnecessary in that case.