Hi Fred,
Standard CDL does not seem to support slope values less than 0 (though I suppose it could be made so, i.e. -1 to 1). See
http://en.wikipedia.org/wiki/ASC_CDL "s is slope (any number 0 or greater, nominal value is 1.0)"
you are right, will try to find out if Wikipedia is correct here...
...<Slope> -1.0 -1.0 -1.0 </Slope><Offset> 0.0 0.0 0.0 </Offset>...
And just got a black image as if -1 was clipped at 0.
this seems to make sense to me: with a gain of -1 (Slope) you will crush everything to zero unless you offset it to +1.
probably using "logo" is a bit easier to see:
Code: Select all
convert -cdl cdl.xml logo: result.png
this one results in a "color negative", fair enough.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2">
<ColorCorrection id="cc06668">
<SOPNode>
<Slope> -1.0 -1.0 -1.0 </Slope>
<Offset> 1.0 1.0 1.0 </Offset>
<Power> 1.0 1.0 1.0 </Power>
</SOPNode>
<SATNode>
<Saturation> 1.0 </Saturation>
</SATNode>
</ColorCorrection>
</ColorCorrectionCollection>
this one gives a b&w image only, slope and offset seem to be ignored, just saturation is processed
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2">
<ColorCorrection id="cc06668">
<SOPNode>
<Slope> -1.0 -1.0 -1.0 </Slope>
<Offset> 1.0 1.0 1.0 </Offset>
<Power> 1.0 1.0 1.0 </Power>
</SOPNode>
<SATNode>
<Saturation> 0.0 </Saturation>
</SATNode>
</ColorCorrection>
</ColorCorrectionCollection>
finally if I use this one on the "color negative" image from above I get a b&w result from the already inverted image. But only with an intermediate step...
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2">
<ColorCorrection id="cc06668">
<SOPNode>
<Slope> 1.0 1.0 1.0 </Slope>
<Offset> 0.0 0.0 0.0 </Offset>
<Power> 1.0 1.0 1.0 </Power>
</SOPNode>
<SATNode>
<Saturation> 0.0 </Saturation>
</SATNode>
</ColorCorrection>
</ColorCorrectionCollection>
For now, thanks a lot for your response.
Best, Andreas