trevlac
13th April 2004, 15:18
Hi,
I added some functionality to Tweak.
http://trevlac.us/colorCorrection/TweakColor.zip
Basically, I added the ability to target specific hue and saturation ranges for hue and saturation adjustments. For example, you can target highly saturated reds (> 75% saturated) and reduce just them, leaving things like skin tones alone.
You can also do tricky things like changing the color of specific objects. For example, you could change the sky from blue to magenta, by targeting the specific hue/saturation range for the sky and then change the hue. This would require that other objects are not the same sky color, or they'd change too. :)
I also added some simple linear interpolation (smooth parm) for saturation changes, to help reduce contours.
-------- code (non)speed notes -----
I had to bypass the asm optimizations in Tweak because I don't know asm. Also, I made a lookup for the hue degree checking, to avoid atan() calcs, but the table is big. I'm not sure what people consider reasonable memory limits. The saturation range checking could also be done in a pre calc'd lookup, but I did not add that.
source and a test/usage script are included in the zip ..... :)
I added some functionality to Tweak.
http://trevlac.us/colorCorrection/TweakColor.zip
Basically, I added the ability to target specific hue and saturation ranges for hue and saturation adjustments. For example, you can target highly saturated reds (> 75% saturated) and reduce just them, leaving things like skin tones alone.
You can also do tricky things like changing the color of specific objects. For example, you could change the sky from blue to magenta, by targeting the specific hue/saturation range for the sky and then change the hue. This would require that other objects are not the same sky color, or they'd change too. :)
I also added some simple linear interpolation (smooth parm) for saturation changes, to help reduce contours.
-------- code (non)speed notes -----
I had to bypass the asm optimizations in Tweak because I don't know asm. Also, I made a lookup for the hue degree checking, to avoid atan() calcs, but the table is big. I'm not sure what people consider reasonable memory limits. The saturation range checking could also be done in a pre calc'd lookup, but I did not add that.
source and a test/usage script are included in the zip ..... :)