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 - Degrunge Filter

Reply
 
Thread Tools
  #1  
Old 02-16-2006, 04:44 AM
byRo's Avatar
byRo byRo is offline
Senior Member
 
Join Date: May 2004
Location: Goianésia, Brazil
Posts: 1,609
Quote:
Originally Posted by Stroker
Ah, the frequency thing. Fun, isn't it? I used Tom's code because it is wicked fast:

sourcecode\codelibrary\recursiveGauss4b-clean.ffp
I've been picking that code apart to understand it before using it. Yes, it is very neat.

I'm thinking of making a band-stop filter, which would be a filter equivalent of the quick degrunge trick.
I have read that with a "normal" convolution (not recursive) you can create a difference-of-Gaussians just by using the difference of the convolution factors. What I don't know is if there is a way to adapt the recursive code.

Any ideas?

Another question...
Codes for Gaussian blur seem to always use integer numbers. How do PS (and others) treat sub-pixel divisions?

Reply With Quote top
  #2  
Old 02-16-2006, 06:37 AM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
The de-grunging thing is a frequency trick. Basically getting rid of medium frequencies where the grunge lies, but keeping high frequency detail and low frequency shadow/light. That's what it looks like to me (passing glance).

Greg Apodaca has a *very* nice variation of this. Instead of Gauss for low, try Median. See TBone's tutorial on Greg's variation: More skin smoothing (warning - lots of images)

You can adapt the recursive Gauss code to do High Pass.
High Pass = Gauss - original + 128

That should get you going in the right direction. At least, I think it will...? Am I way off the mark?

Quote:
How do PS (and others) treat sub-pixel divisions?
Sub-pixel is all about interpolation. For the most part, it seems that Photoshop uses whatever interpolation you set in the preferences. FM can do sub-pixel with iget(). Or, in FM, you can use any interpolation that you feel like coding. I recently coded bi-linear and it was more than adequate. You will have to get into type casting, like doubles and floats.

edit:

I did try to get recursive Gauss to use fractional values for q. It kind of worked, but was mostly not good.

Last edited by Stroker; 02-16-2006 at 06:53 AM.
Reply With Quote top
  #3  
Old 02-16-2006, 08:03 AM
byRo's Avatar
byRo byRo is offline
Senior Member
 
Join Date: May 2004
Location: Goianésia, Brazil
Posts: 1,609
Quote:
Originally Posted by Stroker
The de-grunging thing is a frequency trick. Basically getting rid of medium frequencies where the grunge lies, but keeping high frequency detail and low frequency shadow/light. That's what it looks like to me (passing glance).
Exactly!
Quote:
Originally Posted by Stroker
Greg Apodaca has a *very* nice variation of this. Instead of Gauss for low, try Median. See TBone's tutorial on Greg's variation: More skin smoothing (warning - lots of images)
Median is great for blurring ner the edges. On the surfaces (not edges) is can often leave a hard edged bump and make things worse than before.
The de-gringe trick, however, falls apart at the edges , so maybe I'll find a way to include the median there.
Quote:
Originally Posted by Stroker
You can adapt the recursive Gauss code to do High Pass.
High Pass = Gauss - original + 128

That should get you going in the right direction. At least, I think it will...? Am I way off the mark?
That's about it. Just don't know if it can be done in one pass, or have to save an intermediate copy of the image between applying one and the other.
Quote:
Originally Posted by Stroker
Sub-pixel is all about interpolation. For the most part, it seems that Photoshop uses whatever interpolation you set in the preferences.
I had rather suspected that. Shame, I thought maybe it would be something cool

Thanks,

Reply With Quote top
  #4  
Old 02-16-2006, 08:03 AM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
Did a quick look for 'band-stop' because I wasn't sure. Now I've got a better grip on what you are after. Turns out Lum Frequencies does what you are looking for. But LF is a bit much. Besides, one of the major points of FM is doing things your own way instead of somebody elses. Right?

Some really quick-n-sleazy notes on using recursive Gauss code.

Code:
int radius = min(ctl(1),xw/2,yw/2)/scaleFactor;

float q = (float)(radius);
float b0 = 1.57825 + 2.44413*q + 1.4281*q*q + 0.422205*q*q*q;
float b1 = 2.44413*q + 2.85619*q*q + 1.26661*q*q*q;
float b2 = -(1.4281*q*q + 1.26661*q*q*q );
float b3 = 0.422205*q*q*q;
In that code, I divided radius by scaleFactor. The reason for /scaleFactor gets into the preview's zoom factor. This can get funky if you are not comfortable with absolute vs. relative.

Now, the variables following q are dependant on q. If you reassign radius for another pass, then you reassign q. If you reassign q, then you need to reassign the variables dependant on q. This little thing really threw me for a loop.

Also, if you are doing more than one pass, you will have to pay attention to what you are blurring and where you are putting it. Could be tile buffers or arrays.

Give HsY a break and go in frequency direction for a bit?
Reply With Quote top
  #5  
Old 02-16-2006, 08:13 AM
Cameraken's Avatar
Cameraken Cameraken is offline
Senior Member
 
Join Date: Feb 2005
Location: Lancashire (UK)
Posts: 1,158
Quote:
Give HsY a break and go in frequency direction for a bit?
Thats fine by me Stroker. As long as we can get back to it later


Ken
Reply With Quote top
  #6  
Old 02-16-2006, 08:16 AM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
Ah, Ro, you snuck me.

I've actually looked into Median and what I found actually scared me.
Median in a nutshell:
- grab all values and put into an array
- sort them either ascending or descending
- take the value in the middle of the array

If you use Bubble Sort, you are looking at a lot of cycles being chewed up for larger radii. If you use Quick Sort, you are looking at some monster code. Egads!

I'm actually kind of torn on Median vs. Gauss. Maybe talk about this another day. Besides, we have access to recursive Gauss and that gives *tremendous* bias right about now.

edit:
Ah! Snuck by Ken.
Yeah, Ken, we'll do that.
But you might have to remind me because I'm ADD like that.

edit2:

Freckles be gone!
Attached Images
File Type: jpg frecklesbegone.jpg (26.3 KB, 92 views)

Last edited by Stroker; 02-16-2006 at 08:22 AM.
Reply With Quote top
  #7  
Old 02-16-2006, 08:24 AM
byRo's Avatar
byRo byRo is offline
Senior Member
 
Join Date: May 2004
Location: Goianésia, Brazil
Posts: 1,609
Quote:
Originally Posted by Stroker
Give HsY a break and go in frequency direction for a bit?
I think it is an area that has a lot of very useful applications, and is quite underdeveloped.
I still dream of implementing a 7-band graphic equalizer. It would be possible with a lot of repetitive code and / or a lot of memory, but that wouldn't be fun, would it?

Reply With Quote top
  #8  
Old 02-16-2006, 09:19 AM
dkcoats dkcoats is offline
Senior Member
 
Join Date: Dec 2004
Location: The frozen North
Posts: 519
Reading this thread makes me feel like I've wandered into a party where everybody's speaking Klingon.



dc
Reply With Quote top
  #9  
Old 02-16-2006, 02:32 PM
Cameraken's Avatar
Cameraken Cameraken is offline
Senior Member
 
Join Date: Feb 2005
Location: Lancashire (UK)
Posts: 1,158
Well it sounds like fun to me Rô.
It will give me something to do while I get my head round Lum-Sat.

This was exactly what I was thinking about when I asked about splitting frequencies.
So we have a start
- read Lum into an array
- use recursive Gauss for high blur
- High Pass the high bur
- another pass for low blur
- calculate the medium frequencies
- tweak, put back together, and output


I think the thing that may be a problem is the FilterMeister display window as it will only give a 100% view.

I found this site
http://www.mehdiplugins.com/english/...ualization.htm
It’s not much use to us but they have been written with Filtermeister or FF


Ken
Reply With Quote top
  #10  
Old 02-16-2006, 06:40 PM
byRo's Avatar
byRo byRo is offline
Senior Member
 
Join Date: May 2004
Location: Goianésia, Brazil
Posts: 1,609
Quote:
Originally Posted by Stroker
I've actually looked into Median and what I found actually scared me.
Median in a nutshell:
- grab all values and put into an array
- sort them either ascending or descending
- take the value in the middle of the array

If you use Bubble Sort, you are looking at a lot of cycles being chewed up for larger radii. If you use Quick Sort, you are looking at some monster code. Egads!
Not sure if you can do the median separately in the x,y directions like the Gaussian blur.
IF you could - then as you sweep through the image in the x direction you only need to add one new element to your already sorted median group and take one out. Doing it right that must be quicker than re-sorting at every pixel.
Quote:
Originally Posted by dkcoats
Reading this thread makes me feel like I've wandered into a party where everybody's speaking Klingon.
Please, don't get Stroker started - wanna bet he speaks Klingon too .
I did look it up once (Wiki). It is a very wierd language. (and I've already had enough trouble learning Portuguese)

Cameraken, actually I did use that plug-in before finding the adaptive equalization at Reindeer Graphics (which has more sliders to play with).

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
Filter Forge Doug Nelson Software 77 07-06-2006 03:05 PM
FilterMeister - Gray Map Filter Craig Walters Software 13 04-05-2006 06:26 PM
Sharpening T Paul Scratch Pad 34 08-16-2004 11:02 AM
Tutorial: Texturizer Filter tricks DannyRaphael Photo-Based Art 6 07-13-2002 03:13 PM
Colored Pencil filter: Stroke direction options DannyRaphael Photo-Based Art 14 06-11-2002 06:27 PM


All times are GMT -6. The time now is 06:23 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