RetouchPRO

Go Back   RetouchPRO > Tools > Software

Notices

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

Reply
 
LinkBack Thread Tools
  #31  
Old 02-21-2006, 09:25 PM
Stroker's Avatar
Senior Member
 
Join Date: Jan 2005
Posts: 313
Let's play Connect the Dots.

Sobel
Canny Edge Detection
Gradient
Flow Up and Down
Diplacement Sharpening

Can you see the bigger picture?

Last edited by Stroker; 02-21-2006 at 09:34 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #32  
Old 02-21-2006, 11:52 PM
Stroker's Avatar
Senior Member
 
Join Date: Jan 2005
Posts: 313
I'm about to jump out of my skin. How about a quick-n-sleazy tutorial? I call this High Pass Masking, but it might be known by other names.

- Start with some photograph
- Copy it and High Pass to taste
- Add an Adjustment Layer > Gradient Map
-- for the G-Map, use Black <> White <> Black
-- start with the white stopper at 50% and tweak from there

What did we just do? We used High Pass for edge detection. The good thing is that it has radius. The bad thing is that it fails in the delta change department. High Pass + delta change = bad! Well, bad for current purposes.

To fill in the holes, all you have to do is complement with regular ol' find edges.

Oh! Did I just say that?

Last edited by Stroker; 02-22-2006 at 12:12 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #33  
Old 02-22-2006, 04:33 AM
byRo's Avatar
Moderator
 
Join Date: May 2004
Location: Goiânia, Brazil
Posts: 1,549
Quote:
Originally Posted by Cameraken
OK, You guys up to mind reading again?

Yes I have read that - and about 50 others in the last couple of days.
The book he quotes, "Numerical recipes in C", is very interesting. I'm getting comfortable with the basic FFT routine, but the 2-dimensional version (which we need here) still scares me a bit.

Actually, I was quite surprised at how (relatively) simple it is. What complicates matters is when you try to get it running faster and faster.

However, our need for bigger and bigger images is just about satisfied. It pretty hard to justify anything bigger than 3000 pixels on each side.
Processing power and memory capacities continue to rise exponentially.
When theses guys started with these techniques they were using "fast" 100MHz computers, but now 1GHz is pretty slow.
Which means that instead of talking of reducing execution times from 5s to 2s, we have something that may take 500ms and reduce to 200ms. Which, for a one-off process, nobody is even going to notice.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #34  
Old 02-22-2006, 07:43 PM
Cameraken's Avatar
Senior Member
 
Join Date: Feb 2005
Location: Lancashire (UK)
Posts: 1,112
Wooha

Hue, Sat and Lum all working fine. Thanks Stroker.


Ken
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #35  
Old 02-23-2006, 01:39 AM
Stroker's Avatar
Senior Member
 
Join Date: Jan 2005
Posts: 313
Kudos, Ken.

Now, my way is a bit long-winded. Ralph of Simpel Filter has provided his snippet for HsY > RGB.

Code:
--------------snip-------

              //HsY to RGB - Y hier mit v bezeichnet
      //Scale to float
      hf=6*r/255.0; sf=g/255.0; vf=b/255.0;

      // H is given on [0, 6] or UNDEFINED. S and V are given on [0, 1].
      // RGB are each returned on [0, 1].

      if (sf == 0.0) {rf = vf;  gf = vf;  bf = vf;}
      else {
      i = floor(hf);
      switch (i) {
          case 6:
          case 0: hf = hf;    bf = vf - sf*(0.299 + 0.587*hf); gf = bf
+ sf*hf; rf = bf + sf; break;
          case 1: hf = 2.0 - hf;     bf = vf - sf*(0.587 + 0.299*hf);
rf = bf + sf*hf; gf = bf + sf; break;
          case 2: hf = hf - 2.0;     rf = vf - sf*(0.587 + 0.114*hf);
bf = rf + sf*hf; gf = rf + sf; break;
          case 3: hf = 4.0 - hf;     rf = vf - sf*(0.114 + 0.587*hf);
gf = rf + sf*hf; bf = rf + sf; break;
          case 4: hf = hf - 4.0;     gf = vf - sf*(0.114 + 0.299*hf);
rf = gf + sf*hf; bf = gf + sf; break;
          case 5: hf = 6.0 - hf;     gf = vf - sf*(0.299 + 0.114*hf);
bf = gf + sf*hf; rf = gf + sf;
          }
      }

      //Scale to int
      k1=rf*255;
      k2=gf*255;
      k3=bf*255;
------------------
It's a bit more elegant and is a bit more accurate.

For the most part, I'm going to bow out for now. But I will watch for questions and things that tickle my fancy.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #36  
Old 02-23-2006, 08:05 AM
Stroker's Avatar
Senior Member
 
Join Date: Jan 2005
Posts: 313
Grrr...!

Basic Lab manipulation using FM's built-in polar functions.

Code:
%ffp

supportedmodes: labmode

ctl(0):"Theta",range=(-512,512),val=0,track
ctl(1):"Rho",range=(0,300),val=100,track

ForEveryTile:{
int aa,bb;
int theta,rho;

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

// grab and normalize to 0
aa=src(x,y,1)-128;
bb=src(x,y,2)-128;

// convert to polar
theta=c2d(aa,bb);
rho=c2m(aa,bb);

// modify polar
theta=theta+ctl(0);
rho=rho*ctl(1)/100;

// back to Cartesian
aa=r2x(theta,rho);
bb=r2y(theta,rho);

// output normalized to 128
pset(x,y,1,aa+128);
pset(x,y,2,bb+128);

}} // y x

return true;
} // for every tile
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #37  
Old 02-24-2006, 08:26 AM
Stroker's Avatar
Senior Member
 
Join Date: Jan 2005
Posts: 313
Emboss a bit heavy on precision. If you do it integer style, it's much faster.

Code:
%ffp

ctl(0):"Angle",range=(-180,180),val=0,track
ctl(1):"Height",range=(0,40),val=5,track
ctl(2):"Amount",range=(0,300),val=100,track

supportedmodes: rgbmode

OnFilterStart:{
setZoom(1);
set_edge_mode (3);
return false;
}

ForEveryTile:{
int x,y,z;
int v1,v2,final;
float angle,gx,gy;
float pi = 3.14159;

for (z=0;z<3;z++){
for (y=y_start; y<y_end; y++){
//if(updateProgress(y,y_end)) abort();
for (x=x_start; x<x_end; x++){

angle=pi*ctl(0)/180.00;
gx=fcos(angle)*ctl(1)/5.0;
gy=fsin(angle)*ctl(1)/5.0;

v1=iget(x+gx,y+gy,z,0,3);
v2=iget(x-gx,y-gy,z,0,3);

final=(v1+(255-v2))/2;
final=128+(128-final)*ctl(2)/100;
pset(x,y,z,final);

}}} // x y z

return true;
} // for every pixel

Last edited by Stroker; 02-24-2006 at 08:41 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #38  
Old 02-27-2006, 04:53 PM
Stroker's Avatar
Senior Member
 
Join Date: Jan 2005
Posts: 313
I adore the subject of desaturating. What I don't like is Channel Mixer for desaturating. IMHO, CM is poor for desaturating because it's so one directional.

Here is a variation of Channel Mixer specifically for desaturating.
- not in the code, but I call it Mono Mixer
- Subtract is inverted and works like Multiply
- Substrate is like Constant in CM

Use it wisely.

Code:
%ffp

ctl(0):standard,"Substrate",range=(-226,256),val=0,pos=(280,5),track

ctl(1):standard,"R",range=(-200,200),val=33,pos=(260,25),track
ctl(2):combobox(vscroll,extendedui),"Add\nSubtract\nLinear Light",val=0,pos=(390,23),size=(55,80),action=preview

ctl(3):standard,"G",range=(-200,200),val=33,pos=(260,55),track
ctl(4):combobox(vscroll,extendedui),"Add\nSubtract\nLinear Light",val=0,pos=(390,53),size=(55,80),action=preview

ctl(5):standard,"B",range=(-200,200),val=33,pos=(260,85),track
ctl(6):combobox(vscroll,extendedui),"Add\nSubtract\nLinear Light",val=0,pos=(390,83),size=(55,83),action=preview

supportedmodes: rgbmode

ForEveryTile:{
int x,y;
int r,g,b;
float addr,addg,addb;
int final;

for (y=y_start; y<y_end; y++){
//if(updateProgress(y,y_end)) abort();
for (x=x_start; x<x_end; x++){

r=src(x,y,0);
g=src(x,y,1);
b=src(x,y,2);

addr = addg = addb = 0;

switch(ctl(2)){ // R
case 0: // add
addr=(float)r*(float)ctl(1)/100.00;
break;
case 1: // subtract
addr=(255.00-(float)r)*(float)ctl(1)/-100.00;
break;
case 2: // linear light
addr=((float)r-128.00)*(float)ctl(1)/200.00;
break;
} // R switch

switch(ctl(4)){ // G
case 0: // add
addg=(float)g*(float)ctl(3)/100.00;
break;
case 1: // subtract
addg=(255.00-(float)g)*(float)ctl(3)/-100.00;
break;
case 2: // linear light
addg=((float)g-128.00)*(float)ctl(3)/200.00;
break;
} // G switch

switch(ctl(6)){ // B
case 0: // add
addb=(float)b*(float)ctl(5)/100.00;
break;
case 1: // subtract
addb=(255.00-(float)b)*(float)ctl(5)/-100.00;
break;
case 2: // linear light
addb=((float)b-128.00)*(float)ctl(5)/200.00;
break;
} // Bswitch


final=ctl(0) + addr + addg + addb;

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

}} // x y

return true;
} // for every pixel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #39  
Old 02-28-2006, 05:58 AM
Cameraken's Avatar
Senior Member
 
Join Date: Feb 2005
Location: Lancashire (UK)
Posts: 1,112
I like the last one Stroker.

Converting from colour to Black and White can be controversial. I read your “Fighting the Status Quo”
With many pictures it doesn’t seem to matter which method is used but with others it can make a big difference.
I particularly like one method (which I think was yours)

* create a new blank Layer on top of your Background
* Fill the new Layer with 50% Grey
* Change the new Layer Blending to Color (or Saturation)

This code gives a lot more control. It's going to need some practice.
Linear Light = Add/Subtract using 128 as the mid-point

Mono Mixer is definitely going in my toolbox.

Thanks Again.

Ken.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #40  
Old 02-28-2006, 06:33 AM
Stroker's Avatar
Senior Member
 
Join Date: Jan 2005
Posts: 313
Ken, you tickle me. Fighting the Status Quo is one of my favorites. I've gotten into some heated arguements over that one. Oh, the irony.

Maybe one of these days I'll wage war again. Show you guys and gals a few uber tricks, and maybe have a chat about contrast while we're at it.

Contrast: to set in opposition in order to show or emphasize differences.

Something to think about - and very relevant when it comes to desaturating.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #41  
Old 02-28-2006, 08:51 AM
Stroker's Avatar
Senior Member
 
Join Date: Jan 2005
Posts: 313
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 09:02 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #42  
Old 02-28-2006, 06:57 PM
Cameraken's Avatar
Senior Member
 
Join Date: Feb 2005
Location: Lancashire (UK)
Posts: 1,112
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #43  
Old 02-28-2006, 09:28 PM
byRo's Avatar
Moderator
 
Join Date: May 2004
Location: Goiânia, Brazil
Posts: 1,549
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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #44  
Old 02-28-2006, 11:36 PM
Stroker's Avatar
Senior Member
 
Join Date: Jan 2005
Posts: 313
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #45  
Old 03-08-2006, 06:58 PM
Cameraken's Avatar
Senior Member
 
Join Date: Feb 2005
Location: Lancashire (UK)
Posts: 1,112
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, 9 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
Reply

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 On
Refbacks are Off

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


All times are GMT -6. The time now is 10:24 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 2008 Doug Nelson. All Rights Reserved