Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





Pages (2): [1] 2 »   Last Thread  Next Thread
Author
Thread Post New Thread   

slope-limitation equation ?
 

Fabrice




quote this post edit post

IP Loged report this post

Old Post  12-15-05 - 11:17 PM  
Hello,

Is the function for the "slope-limiting" feature of the Curves windows
available somewhere ? From what I have found on Google, it seems that there
is three part in the function : a power function, a linear function and a
small spline between the two. But I don't know where each starts...

Thank you in advance for your help !
Fabrice.




Post Follow-Up to this message ]
Re: slope-limitation equation ?
 

Mike Russell




quote this post edit post

IP Loged report this post

Old Post  12-16-05 - 11:14 AM  
"Fabrice"wrote:
> Is the function for the "slope-limiting" feature of the Curves windows
> available somewhere ? From what I have found on Google, it seems that
> there is three part in the function : a power function, a linear function
> and a small spline between the two. But I don't know where each starts...

Hi Fabrice,

If I understand your question correctly, the curve window uses bicubic
splines to generate its curve points from the specified control points.
There are any number of references to the mathematical details, including
Numerical Recipes in C.

I could not find the words "slope limiting" in Photoshop's help file.
Curvemeister has a feature that supports user controlled limits for the min
and max slope of its curves.  If I misunderstood your question, try again.
--
Mike Russell
www.curvemeister.com




Post Follow-Up to this message ]
Re: slope-limitation equation ?
 

Fabrice




quote this post edit post

IP Loged report this post

Old Post  12-16-05 - 11:14 AM  
>
> I could not find the words "slope limiting" in Photoshop's help file.
> Curvemeister has a feature that supports user controlled limits for the
> min and max slope of its curves.  If I misunderstood your question, try
> again.

Hello Mike,
I'm sorry, I mistranslated the name of the window ... It is the "Levels"
window, and not the "Curves" one. I'm talking about the "gamma" function,
that is not a simple x^gamma, but something more complicated with a slope
limitation for the dark tones. I'm looking for the equation of this
function. This questions stirred a lot of controversy seven years ago (!)
(see for example http://tinyurl.com/azb24 ), but I didn't find the formula
anywhere.

Sorry again for not being clear, and thank you anyway for answering.
Fabrice.




Post Follow-Up to this message ]
Re: slope-limitation equation ?
 

Mike Russell




quote this post edit post

IP Loged report this post

Old Post  12-16-05 - 11:14 AM  
"Fabrice" <fabrice_martin2@nospamyahoo.fr> wrote in message
news:43a27671$0$21221$626a54ce@news.free.fr... 
>
> Hello Mike,
> I'm sorry, I mistranslated the name of the window ... It is the "Levels"
> window, and not the "Curves" one. I'm talking about the "gamma" function,
> that is not a simple x^gamma, but something more complicated with a slope
> limitation for the dark tones. I'm looking for the equation of this
> function. This questions stirred a lot of controversy seven years ago (!)
> (see for example http://tinyurl.com/azb24 ), but I didn't find the formula
> anywhere.

Ah - I remember that thread. I have no idea what they were talking about
then or today.

Evidently, though, levels and curves are based on slightly different
parametric curves, with the term "slope limiting" applied to the difference.
You may find Stephen Marsh's collection of utilities of interest.
http://members.ozemail.com.au/~bina...ndownloads.html

Stephen includes a link to a levels2curve function that converts a Photoshop
levels file to the corresponding curves file.
--

Mike Russell
www.curvemeister.com




Post Follow-Up to this message ]
Re: slope-limitation equation ?
 

hoffmann@fho-emden.de




quote this post edit post

IP Loged report this post

Old Post  12-16-05 - 11:14 AM  
Fabrice,

I remember the discussions as well.

Given  y(x)=x^(1/G)  , e.g. with G=2.2

Linear slope for small x, transition at x1:
y(x1)=x1^(1/G)

Slope:
s=y1/x1

Algo:
If x<x1 Then y(x)=s*x Else y(x)=x^(1/G)

x,y are normalized for [0,1].

I don't know the transition value x1. Can be found
in T.Autiokari's graphics (at that time different for
8 bit per channel and 16 bpc).

Best regards --Gernot Hoffmann



Post Follow-Up to this message ]
Re: slope-limitation equation ?
 

Fabrice




quote this post edit post

IP Loged report this post

Old Post  12-16-05 - 11:15 PM  

> I don't know the transition value x1. Can be found
> in T.Autiokari's graphics (at that time different for
> 8 bit per channel and 16 bpc).

Ok, thank you for the math, but it seems things are a little more
complicated, according to this message from Chris Cox:
http://tinyurl.com/couya

"The gamma adjustment in Levels is a predefined power function with a linear
slope, plus a small spline segment to smooth the meeting of the two
functions."


In addition, I believed the transition value x1 would depend on the value of
gamma. Do you know if it is the case or not ? If not, it is indeed easy to
find its value from Timo's example. I'm going to look at it.

Thanks,
Fabrice.




Post Follow-Up to this message ]
Re: slope-limitation equation ?
 

Fabrice




quote this post edit post

IP Loged report this post

Old Post  12-16-05 - 11:15 PM  
> Evidently, though, levels and curves are based on slightly different
> parametric curves, with the term "slope limiting" applied to the
> difference. You may find Stephen Marsh's collection of utilities of
> interest.
> http://members.ozemail.com.au/~bina...ndownloads.html
>
> Stephen includes a link to a levels2curve function that converts a
> Photoshop levels file to the corresponding curves file.

Thank you for the idea, but i'd prefer to find out the equation, as it would
be required in a home-made program...

Fabrice.




Post Follow-Up to this message ]
Re: slope-limitation equation ?
 

hoffmann@fho-emden.de




quote this post edit post

IP Loged report this post

Old Post  12-16-05 - 11:15 PM  
Fabrice,

the answer is simple: Adobe doesn't ever publish algorithms.

Replacing the vertical slope by a finite slope is probably not
bad. I forgot the 'small spline' between the two segments.

All this is up to any image processing programmer,  as long
as PhS is not concerned.

E.g. you may have a look at improved Curves for special purposes
here (p.9 ... p.16) :
http://www.fho-emden.de/~hoffmann/hlscone03052001.pdf

No isolated linear part but continuous functions.

By the way: this HLS color space is good replacement for Lab,
if accurate Lab is not required, but a decomposition of RGB into
Hue, Saturation and Lightness (without discontinuities in the
vicinity of the vertices).

Best regards --Gernot Hoffmann



Post Follow-Up to this message ]
Re: slope-limitation equation ?
 

Fabrice




quote this post edit post

IP Loged report this post

Old Post  12-19-05 - 11:14 PM  
> thanks for the feedback.

Hello,
some more feedback: I have spent a few more hours on trying to reverse
engineer the equation, but to no success. I don't see any pattern emerging
when testing several gamma values.
For example the linear slope varies with gamma, and the value where the two
curves begin to differ varies also a lot, but I did not find a satisfying
relationship between those quantities:

G=1.5 ; slope=2.7 ; value=30
G=2.2 ; slope=4.5 ; value=28
G=3.0 ; slope=7.5 ; value=23
G=4.5 ; slope=22 ; value= 9
G=6.0 ; slope~60 ; value= 3

The problem is the "same" with your equation: the exponent is required to
vary with G in order to mimic Photoshop's behavior. The value 0.028 is
satisfying for G around 2.2-3.0 .

>
> By the way: could you solve your ICC-related problems,
> as mentioned about one year ago in the Google forum
> Color Engineering ?

Yes, I have found very similar ICC profiles by doing the maths from the
theoretical curves given by Kodak, and by using Timo's program. In fact,
I've been quite impressed that his program should give so good results. I
have tested other (commercial or not) programs, and their results were quite
poor, compared to Timo's ones...

Fabrice.




Post Follow-Up to this message ]
Re: slope-limitation equation ?
 

Andrew Morton




quote this post edit post

IP Loged report this post

Old Post  12-20-05 - 11:14 PM  
hoffmann@fho-emden.de wrote:
> the answer is simple: Adobe doesn't ever publish algorithms.

They do in patents. Although that doesn't necessarily make them easy to
find.

Andrew




Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 02:22 PM. Post New Thread   
Pages (2): [1] 2 »   Previous Last Thread   Next Thread next
Computer Graphics with Photoshop archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top