Jim_King_2000
October 13th, 2004, 10:14 AM
Can anyone help me about how to implement this curve?To adjust what?Many thanks.
|
Click to See Complete Forum and Search --> : Digital Image Processing Jim_King_2000 October 13th, 2004, 10:14 AM Can anyone help me about how to implement this curve?To adjust what?Many thanks. dolomighty October 13th, 2004, 11:15 AM seems like a gamma adjusting tool... when you edit that curve, you are defining a transfer function y=f(x) this function operates essentially on luminance values of pixels: for example, luma input 0.5 will be translated to luma output around 0.25 (by looking the jpg you post) to implementi it, you simply iterate thru all image pixels and pass values thru the transfer function. since there are many steps, what do you need ? - iterate thru pixels - create the transfer function - get/set pixel luma/chroma Jim_King_2000 October 13th, 2004, 09:23 PM Thank you,dolomighty. So it adjusts brightness. However, an other question is what the curve itself is? Arc ? Bezier? What is it's funcion? dolomighty October 14th, 2004, 04:09 AM similar to a bezier spline: at a glance it seems a heremite spline, the one wich pass through all the specified knots... if my mind is good at recalling things (wich is not :) it should be the heremite flavor. honestly, i don't recall the math behind, but you can find it in any good CG book... CG principles (van damm et al), Alan Watt book (don't remember the name now, see amazon) to only name a few. the only code i have is for a spline wich knots are equidistant on the x axis: float cerp( float a, float b, float c, float d, float x ) { float p=(d-c)-(a-b); float q=(a-b)-p; float r=c-a; return x*(x*(x*p+q)+r)+b; } x should have [0,1) range. cerp stands for cubic interpolation (as lerp stands for linear): if you plug in the 4 y values into abcd, it will give you a cubic curve segment wich pass through (0,b) and (1,c) it is not like the function you need (where knots can be placed anywhere) but it can be a starting point. Jim_King_2000 October 14th, 2004, 04:42 AM Thank you very much. Jim_King_2000 October 19th, 2004, 10:24 AM Dear Mr.dolomighty: My spline is as following.The cubic spline is just like this.What is the gamma curve on earth?And where can I find some reference?Thank you. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |