RetouchPRO

Go Back   RetouchPRO > Tools > Software
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read


Software Photoshop, Lightroom, Paintshop Pro, Painter, etc., and all their various plugins. Of course, you can also discuss all other programs, as well.

FilterMeister - Color Theory and Conversions

Reply
 
Thread Tools
  #41  
Old 02-28-2006, 09:51 AM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
Lab mixer for desaturating much like Mono Mixer.

Code:
%ffp

supportedmodes: labmode

ctl(0):"a center",range=(-100,100),val=0,track,pos=(280,5)
ctl(1):"a weight",range=(-200,200),val=50,track,pos=(280,15)

ctl(2):"b center",range=(-100,100),val=0,track,pos=(280,40)
ctl(3):"b weight",range=(-200,200),val=50,track,pos=(280,50)

ForEveryTile:{
int ll,aa,bb,x,y,final;

for(x=x_start;x<x_end;x++){
for(y=y_start;y<y_end;y++){

ll=src(x,y,0);
aa=src(x,y,1)-128+ctl(0);
bb=src(x,y,2)-128+ctl(2);

final = ll + aa*ctl(1)/100 + bb*ctl(3)/100;

pset(x,y,0,final);
pset(x,y,1,128);
pset(x,y,2,128);

}} // y x

return true;
} // for every tile
There are several things hidden in the code. Ramble coming soon.

Dichotomy: division into two usually contradictory parts.

Last edited by Stroker; 02-28-2006 at 10:02 AM.
Reply With Quote top
  #42  
Old 02-28-2006, 07:57 PM
Cameraken's Avatar
Cameraken Cameraken is offline
Senior Member
 
Join Date: Feb 2005
Location: Lancashire (UK)
Posts: 1,158
Oh no! Not contrast. I’ve seen debates about that as well (Where is Flora).
Did you ever write the Shadow/Highlight Filter. (Us Poor PS7 Users).
I tried writing that one myself. I got something working but it does not seem to do exactly the same thing. I remember reading that you had figured out what it was doing.

“Contrast: to set in opposition in order to show or emphasize differences.”
That definition sounds good but a contrast reduction can bring out more detail. Especially in some of the older restoration projects. But I think this depends on global contrast (low frequency) or local contrast (high frequency)

Shadow/Highlight - Now that would be a good project.

http://www.photoshoptechniques.com/f...ad.php?t=14755
http://tech-slop.serveit.org/wiki/in...title=Contrast
http://tech-slop.serveit.org/wiki/in...um_Frequencies

I’ve just downloaded TS_Lum FrequenciesV? I noticed the picture on your webpage was different to my version, Version Numbers would be good. It’s changed a lot. Looks like I need to learn this one all over again.

And talking of contrast.
Ro.
Wow, great stuff, you are flying with this.
http://www.retouchpro.com/forums/software/12957-free-equalization-plugins-byro.html


Ken.
Reply With Quote top
  #43  
Old 02-28-2006, 10:28 PM
byRo's Avatar
byRo byRo is offline
Senior Member
 
Join Date: May 2004
Location: Goianésia, Brazil
Posts: 1,609
WARNING! If you are experimenting the source codes in the codelibrary beware of the filter named "FilterWithoutDialog.ffp".
I ran that one, just to see what happened, and then spent half an hour trying to get FM to appear again - it just blinked and disappeared every time I tried to call it up.
Not exactly sure what I did to get it back - I think it was when I pressed the Shift (or maybe Ctrl) key while trying to open the program.

Reply With Quote top
  #44  
Old 03-01-2006, 12:36 AM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
Heh. My wiki is behind the times on a few things. I ran into a version problem with L* Frequencies and taking care of the LF nodes ground to a halt. I finally got the version problem taken of, so I should update the wiki nodes, eh? Maybe in a few days or so.

When dinking with str0 in FM, be wary when saving files.

One of these days I'll talk about Shadow/Highlight. Rather, show some of the tricks involved. I'll do it on the sly at my wiki for various reasons.

Roland, same thing happened to me with FilterWithoutDialog. All I did was restart Photoshop because that's the only sure fire way I know of to break the vicious cycle.

I'll do my best to field any questions, Ro.
Reply With Quote top
  #45  
Old 03-08-2006, 07:58 PM
Cameraken's Avatar
Cameraken Cameraken is offline
Senior Member
 
Join Date: Feb 2005
Location: Lancashire (UK)
Posts: 1,158
Stuck Again.

I have been trying to use stock tools to split Highlights, Midtones and Shadows.
Using Select > Colour Range I am getting gaps.
Even selecting just the Highlights (claw) and Shadows I still get a gap.

I decided to use FM.
I wrote this code to split Highlights, Midtones and Shadows onto the channels however I am back to a similar problem

Using a Black to White gradient as a test picture and the code below I don’t get gaps anymore But the midtones are not an equal third of the picture.

Now I thought this was because I used
lum=r*0.30 + g*0.59 + b*0.11
So I replaced it with
lum=(r+g+b)/3

but my test picture is still the same. The midtones don’t cover 1/3 of the picture like I would expect.

Questions
Have I done something wrong?
If Not. Then why do the midtones not cover 1/3 of the picture?


Code:
%ffp

ForEveryPixel:{
int low,mid,high,lum;

//lum= r*0.30 + g*0.59 + b*0.11;
lum=(r+g+b)/3;

low=(lum<85)? lum:0;
mid=(lum>86) & (lum<170)? lum:0;
high=(lum>171)? lum:0;

R=low;
G=mid;
B=high;

}
Ken
Attached Images
File Type: jpg Ken_mid-selection.jpg (99.3 KB, 10 views)
Reply With Quote top
  #46  
Old 03-08-2006, 09:46 PM
byRo's Avatar
byRo byRo is offline
Senior Member
 
Join Date: May 2004
Location: Goianésia, Brazil
Posts: 1,609
Ken,

The good news: You are not going crazy. Your code is correct.
The bad news: Photoshop gradients are not linear

Put an eyedropper at the transition lines, then go back and see what the readings are at these points in the original gradient.
The channel values will fit in fine. However, they are not at 1/3 intervals.

Maybe stroker can explain to us why that happens.

Meanwhile, if you want to generate a perfectly linear gradient, then do it with FM!!

Reply With Quote top
  #47  
Old 03-08-2006, 10:41 PM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
When you lay the gradient, make sure Smoothness is set to 0%.

Smoothness 0% = linear interpolation
Smoothness 100% = b-spline interpolation

This tid-bit took me a long time to figure out. Chris Cox of Adobe confirmed, and you can see this for yourself with a little help from Histogram. Since then, whenever I lay a gradient, I *always* double-check Smoothness.

Gonna hide under my rock again for a bit.

edit:

Roland, how good are you with geo/trig?
Basic 3D Math
Yeah, I got something brewing, but ran into a funky anomoly.

Last edited by Stroker; 03-08-2006 at 11:30 PM.
Reply With Quote top
  #48  
Old 03-09-2006, 06:08 AM
byRo's Avatar
byRo byRo is offline
Senior Member
 
Join Date: May 2004
Location: Goianésia, Brazil
Posts: 1,609
Thanks, stroker.

I knew you'd have something interesting to add.
Problem is, I can't see how that works out.

The smoothness setting is in the Gradient Map editor. Setting this to "0" really does explain a whole bunch of quirky things that I'd seen on the past.

The Gradient Map, however, does not generate the gradient, just translates it.
So the question stands, how can I generate a black-to-white linear (as in "x" vs. R,G,B) gradient? (in PS, without resorting to FM?)

.....or, maybe I missed something.

(Trigonometry and 3D math never were my favourites - but I can usually muddle my way through. - What's up?)

Reply With Quote top
  #49  
Old 03-09-2006, 01:32 PM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
Gradient tool has Smoothness as well. When you lay down the initial gradient with the tool, make sure it is Smoothness 0 right from the begining.

Yes?

Meh. Don't worry about the geo/trig thing. Gonna put it on the back burner for a few.
Reply With Quote top
  #50  
Old 03-09-2006, 08:27 PM
Cameraken's Avatar
Cameraken Cameraken is offline
Senior Member
 
Join Date: Feb 2005
Location: Lancashire (UK)
Posts: 1,158
Thanks.

The Gradient Was the problem. I set the Smoothness to Zero and my code works fine.

(Smoothness is in the same place as when using Gradient Map – Click on the Gradient)

This does explain a lot. I have been setting Smoothness to Zero when putting Sat back without realising the reason why.

Ken
Reply With Quote top
Reply

  RetouchPRO > Tools > Software


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Color Space conversions Reimar Photoshop Elements Help 4 01-16-2004 06:58 AM
Batch Raw conversions in PS CS okplayer Software 0 12-19-2003 01:03 PM


All times are GMT -6. The time now is 12:40 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2016 Doug Nelson. All Rights Reserved