Jump to content

  • Log In with Google      Sign In   
  • Create Account

Gamma Midpoint/Offset ?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Endemoniada   Members   -  Reputation: 312

Like
0Likes
Like

Posted 10 May 2013 - 03:24 PM

Hi guys,

 

I'm trying to implement a Levels algorithm like Photoshop. I think I have it all figured out except for one thing.

 

If the black and white points are 0.0 and 1.0 the midpoint is 0.5 and the gamma at that point in 1.0. The problem I'm having is if the midpoint is at (say) 0.375, how do I make it so that midpoint has a gamma of 1.0 ?

 

I'm doing it like this:

 

v=pixelValue // (0...1)
if(v < a)
 v=a;
else if(v > b)
 v=b;
else
 v=gamma(v); // the midpoint between a and b has a gamma of 1.0

 

Thank you.

 

 



Sponsor:

#2 Steve_Segreto   Crossbones+   -  Reputation: 1530

Like
0Likes
Like

Posted 12 May 2013 - 11:50 PM

http://www.generation5.org/content/2004/histogramEqualization.asp






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS