Log in

View Full Version : HSIAdjust()


ARDA
6th July 2002, 23:52
Will anybody please give us a small example of how to use:

HSIAdjust() // H, S, min, gamma, max

My apologizes I'm too lazy today to look in the source
and understand the parameters.

Thanks ARDA

poptones
7th July 2002, 01:43
It works completely off the "raw" numbers. If you get too extreme with hue it bugs out.

clip.hsiadjust(h,s,min,gamma,max)

Hue rotation can be positive or negative. Large values will produce unexpected results. Min and Max are in the range 0-255, the rest are floats. The problem is there's presently no bounds checking and no clipping. I had forgotten about it and when I sent richard my sources it was in there, so it "snuck" into the release like that.

Anyway, it has lots of potential. Try this, for example:

clip.HSIAdjust(0,3,0,.10,255)

It'll produce a "dirty poster" effect. Min and Max have the effect of clipping values below or above those luminance values specified from the input and stretching the rest into the range 8-240. Using zero for any floats is almost guaranteed not to work.

ARDA
7th July 2002, 07:29
Thanks a lot I'll make some tests

Arda

poptones
7th July 2002, 10:19
You're probably better of making use of tweak. It's faster even if you do conversions to get to the gamma adjustment - and unlike HSI, it actually works that way.

clip.tweak(0,3,1,1).ConvertToRGB32().Levels(50,3,255,0,255)

This is as fast, if not faster - and the results are more predictable.

ARDA
8th July 2002, 00:58
@poptones
Thanks again for your answer.I've been playing with Tweak for long
time,since Donald released the first version.I've just wanted
to see how was the behaviour of gamma correction in YUY2.

Arda