Fitness.com
Advertisement

Go Back   Sports Forum > Community > Graphics > General Photoshop Board

General Photoshop Board

Topics cover anything to do with Photoshop outside of those forums below.


» Site Navigation
 > Shop
» Current Poll
Best 5 club teams in history of Football:
Liverpool 1977-1978 - 100.00%
1 Vote
Real Madrid 1956-1960 - 0%
0 Votes
Juventus 1985 - 0%
0 Votes
Milan 1989-1990 - 100.00%
1 Vote
Ajax 1971-1973 - 0%
0 Votes
Santos 1962-1963 - 0%
0 Votes
Torinho 1940's - 100.00%
1 Vote
Ajax 1995 - 0%
0 Votes
Flamengo 1981 - 100.00%
1 Vote
Benfica 1961-1962 - 100.00%
1 Vote
Total Votes: 1
You may not vote on this poll.
» Stats
Members: 104,296
Threads: 85,048
Posts: 1,031,331
Top Poster: Karky (9,549)
Welcome to our newest member, airjordan4sale
» Fitness Shop
If you register for free, you will be able to post threads, vote on polls and lots more. If you have problems with the registration or logging in, please contact the administrator.

Reply
 
LinkBack Thread Tools Display Modes
Old 06-15-2005, 09:37 PM   levels, gamma, and midtone slider Post #1
Guest
 
Posts: n/a
Default levels, gamma, and midtone slider

I've just joined and have started using VB for scripting photoshop CS2. I find its guide somewhat lacking and at times wrong. Is there better documentation anywhere without using the object browser?

At the momemt, I also have a need to use levels in my automation and am trying to figure out how photoshop computes gamma from its midtone slider in the levels dialog. I've assumed that gamma relates the output level (y) to the input level (x) in a power function, or y= x^(1/gamma). Assumming that you adjust the black (b) and white (w) points and scale to this new level range (w-b) then I get the following:

gamma = log((x-b)/(w-b)) / log(.5)

That seems to be pretty close to what photoshop does but thought I'd check whether I am missing something?
  Reply With Quote
Old 06-15-2005, 11:49 PM   levels, gamma, and midtone slider Post #2
Joe Blow
 
Join Date: Mar 2004
Posts: 4
Rep Power: 0
RLDWV2003 is an unknown quantity at this point
Default levels, gamma, and midtone slider

i like to look at pretty pictures.


oh ya and umm no idea. but if someone knows they will prob be found here. welcome to the board
RLDWV2003 is offline   Reply With Quote
Old 06-16-2005, 02:58 AM   levels, gamma, and midtone slider Post #3
Guest
 
Posts: n/a
Default levels, gamma, and midtone slider

Gamma is a power function:
output = input^(1/gamma)

That's why the slider is 0 to 1 on one side and 1 to 10 on the other.
Also, the input has to be normalized to the 0 to 1 range before inputting, then output scaled back up.

Oh... I see you have the gamma formula down.

What I recommend is scaling for b and w, then doing gamma.
You know, keep them as seperate operations instead of bunching them together.
This methodology has worked very well for me.

Wait . . . I think I'm thinking backwards to what you are asking.
Colour me confused.

And, from what poking around I've done, the object browser is the only decent way to go.
Everything else I've seen is sometimes unreliable and a messy jumble of poorly organized information.
  Reply With Quote
Old 06-16-2005, 07:55 PM   levels, gamma, and midtone slider Post #4
Guest
 
Posts: n/a
Default levels, gamma, and midtone slider

Thanks for the confirmation. Now my next step is an attempt to programmatically analyze the histogram and set the gamma. Do you know of any tricks to do this. Many of my 1000s of images I'll be processing are significantly underexposed (but not all and I really don't want to presort things by inspection). I assume you can get a handle on exposure from the median level of the image. My underexposed images also have a sparse (even empty) highlight tail, so its pretty easy to set the white point clipping to .02 to bright things up. But my problem is guessing what the gamma level should be without visual inspection. It seems like the 90th percentile is good starting guess for underexposed images but if you have suggestions for setting gramma knowing the histo array I'd be greatful. Thanks again.
  Reply With Quote
Old 06-16-2005, 09:34 PM   levels, gamma, and midtone slider Post #5
Guest
 
Posts: n/a
Default levels, gamma, and midtone slider

One way to auto gamma might be to 'half the histogram by count'.

If your image is 20x20, then the total count will be 400.
Start at the high end, move down, and add up the counts.
When you hit 400 / 2 = 200, that is your gamma point.

Make sense?

Or you might be able to use derivatives.
You know, calculus for peaks, delta change, and sigma stuff.
  Reply With Quote
Old 06-16-2005, 09:59 PM   levels, gamma, and midtone slider Post #6
Joe Blow
 
Join Date: Sep 2003
Posts: 4
Rep Power: 0
ladyfinger007 is an unknown quantity at this point
Default levels, gamma, and midtone slider

Ron, Welcome to PsG 8))

Here are some links that might help you get more info than in the scripting documentation: the official adobe forum, where you can maybe point out the problems of the documentation, if some engineers hang out there...

http://www.adobeforums.com/cgi-bin/webx?13@@.ef7f2cb

Another forum, well organized and specialized for Photoshop scripting can be found there: http://www.ps-scripts.com/

There is also a book: http://tinyurl.com/8mroj I don't know if it should be updated for CS2.

One adobe engineer has a site on the topic: http://www.tranberry.com/photoshop/photoshop_scripting/
ladyfinger007 is offline   Reply With Quote
Reply

Go Back   Sports Forum > Community > Graphics > General Photoshop Board

Bookmarks

Thread Tools
Display Modes


Similar threads to levels, gamma, and midtone slider
Thread Thread Starter Forum Replies Last Post
Slider control(how much and for who)
Slider control(how much and for who): Hi all, I have been reading heaths approach to...
teejay73 Tactics & Training Tips 11 02-10-2008 12:05 AM
My findings, re mentality slider.
My findings, re mentality slider.: I am playing with it set low and using forward...
hyperion666 Tactics & Training Tips 1 12-31-2007 05:45 AM
midtone
midtone: hi, I want to use gradient map .Knowing that...
rads General Photoshop Board 9 08-30-2004 12:02 PM
Gamma on PC and MAC Monitors
Gamma on PC and MAC Monitors: CORRECTED VERSION: Thanks a lot to Deke...
Erik General Photoshop Board 8 02-12-2004 09:33 AM
New Monitor and now Gamma problems!
New Monitor and now Gamma problems!: Ahoy! I so I just got a brand new monitor...
DJ3J General Photoshop Board 4 01-23-2003 05:44 AM

More threads of ron_osborn
Thread Date Forum Replies Last Post
adjust levels layer
adjust levels layer: I've spent the better part of a day and have not...
06-21-2005 General Photoshop Board 0 06-21-2005 01:49 AM
levels, gamma, and midtone slider
levels, gamma, and midtone slider: I've just joined and have started using VB for...
06-15-2005 General Photoshop Board 5 06-16-2005 09:59 PM

Other threads in forum General Photoshop Board
Thread Date Thread Starter Replies Last Post
Disappearing brush size cursor
Disappearing brush size cursor: Hi , can anyone help with a really irritating...
09-22-2007 olioli 1 09-24-2007 07:25 AM
help please
help please: hope this is the right place to post this, when i...
06-23-2007 Parco 2 06-23-2007 07:24 PM
I would appreciate your help
I would appreciate your help: I am done with my sig in photoshop but I cant...
03-22-2007 Kroo 2 03-22-2007 02:52 PM
Trinidad ans Tobago National Team
Trinidad ans Tobago National Team: Carlos Edwards ...
06-11-2006 pauleta.48 1 06-11-2006 07:11 AM
Garrincha, The Wizard
Garrincha, The Wizard: http://www.youtube.com/watch?v=P9yd6r-1EDo :)
05-30-2006 Leon 1 05-31-2006 10:41 AM

» Online Users: 22
0 members and 22 guests
No Members online
Most users ever online was 2,128, 07-21-2008 at 08:27 PM.

All times are GMT +1. The time now is 12:27 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Fitness.com | Weight Loss | Training & Fitness | BodyBuilding | Chinese | Spanish | French | Germany | Italian | Friend Codes |
You are viewing levels, gamma, and midtone slider.