The OHTA colorspace, however, is a approximation of PCA (Karhunen-Loeve transformation) for 3 channel images. see
http://en.wikipedia.org/wiki/HSV_color_space footnote 33 and 34. Besides RGB, PCA or KLT is another orthogonal image representation (colorspace for 3 channels). PCA on an RGB image computes 3 channels that are orthogonal with the channels ordered by the most information as approximated by the length of the axes of a gaussian distributed ellipsoid variances from the covariance matrix. see
http://dsp.vscht.cz/konference_matlab/m ... udrova.pdf
http://www.cs.otago.ac.nz/cosc453/stude ... onents.pdf
http://abadpour.com/files//pdf/ethesisl.pdf
Some other common uses for PCA are face recognition, super resolution images and noise reduction.
Here is an approximation of your color transformation by converting to OHTA doing the fuzzy replacement and converting back to RGB. It however uses a fuzzy cube in OHTA color space rather than a fuzzy ellipsoid as in your article referenced earlier.
Original:
OHTA color replace:
convert -size 1x1 xc:"#c03030" -colorspace ohta -format "%[pixel: u.p{0,0}]" info:
ohta(37.6471%,78.2361%,35.8831%)
convert -size 1x1 xc:"#601848" -colorspace ohta -format "%[pixel: u.p{0,0}]" info:
ohta(25.098%,54.7066%,38.2361%)
convert pepper_large.png -colorspace ohta -fuzz 11% -fill "rgb(25.1%,54.7%,38.2%)" -opaque "rgb(37.6%,78.2%,35.9%)" -set colorspace ohta -colorspace rgb pepper_large_ohta_f11.png
(Looks like -set colorspace ohta is not needed and can be removed from the above as it works without it, though does not seem to hurt to have it there)
You can try to adjust the fuzz value a percent or two either way to get a better result.