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?".
As the previously seen RGB->LAB and LAB->RGB is known to be working as is the RGB->sRGB and sRGB->RGB, then by a a process of ellimination then, it is the sRGB->LAB conversion that is failing!
The matrix (MATCIE) made from CIE RGB-XYZ weights is actually performing quite well when compared with "LCh chroma (see CIELAB) increased by 50% in Photoshop", marginally better than that from Rec.709 weights.
Hmmm following that wikipedia link I see they have a reference to a much more linear 'hue' colorspace...
LCh (Lightness, Chroma, Hue(ab) )
Where Lab is converted to LCh so that
C=sqrt(a^2+b^2)
h=arctan(b/a)
It seems that saturation (chroma) changes or hue rotations in this colorspace would be much more useful!
As such it may make a good colorspace to use for -modulate.
Of course making a modulate type operator that did properly handle an image colorspace, and does hue rotations in terms of changes to hue angle in degrees, would be a nice.
anthony wrote:Hmmm following that wikipedia link I see they have a reference to a much more linear 'hue' colorspace...
LCh (Lightness, Chroma, Hue(ab) )
Where Lab is converted to LCh so that
C=sqrt(a^2+b^2)
h=arctan(b/a)
It seems that saturation (chroma) changes or hue rotations in this colorspace would be much more useful!
As such it may make a good colorspace to use for -modulate.
Interesting article!
I was always taught that, functionally, saturation was the lack of white mixed with a pure color. This seems to be what this reference calls colorfulness.
"Colorfulness is the degree of difference between a color and gray."
But in HSL and HSB, that is what saturation is measuring -- the relative distance from the axis of the (hex) cones. The axis being shades of gray from black to white.
Actually in HSL and HSB you would typically multiply saturation by luminance/brilance (appropriteally)
The result is a 'bi-cone' or 'cone' representation.
anthony wrote:Actually in HSL and HSB you would typically multiply saturation by luminance/brilance (appropriteally)
The result is a 'bi-cone' or 'cone' representation.
HSL and HSB are already double (hex) cone and single (hex) cone representations.
I don't know why/where you are trying to multiply the saturation by the luminance or brilliance? What reason do you have for that? Then it is not saturation from HSL or HSB, but some other representation, which may be more in line with the definitions in that reference above?
anthony wrote:Actually in HSL and HSB you would typically multiply saturation by luminance/brilance (appropriteally)
The result is a 'bi-cone' or 'cone' representation.
HSL and HSB are already double (hex) cone and single (hex) cone representations.
I don't know why/where you are trying to multiply the saturation by the luminance or brilliance? What reason do you have for that? Then it is not saturation from HSL or HSB, but some other representation, which may be more in line with the definitions in that reference above?
Strictly they are not. The dimentions really lay out a cylinder. Just most people think or represent them as cones.
I thought they were cones too, until I tried to create the image shown in named colors!
anthony wrote:
The dimentions really lay out a cylinder. Just most people think or represent them as cones.
I thought they were cones too, until I tried to create the image shown in named colors!
Sorry to disagree, the equations define a hex-cone. That is the sides are a hexagon that taper to one or two points.
http://en.wikipedia.org/wiki/Hexcone says it warps a hexagon into a circle. But if you look at the code, you see they are done in segments of a hexagon for hue. That is a point on a side is mapped to a hue angle. So perhaps that is what they mean by warping a hexagon to a circle. Perhaps this is just semantics, but since the code uses a hexagon, most people call the shape a hex-cone. The hex cone is the basis as it is closer to the shape of a cube turned on a point than is a cylindrical cone.
I have used these same ideas to increase or decrease the chroma channel in the low range. It is a form of vibrance (adjust only the low values). You can see that in http://jqmagick.imagemagick.org in the color category saturation filter.