RetouchPRO

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


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

Free Plug-In Filters: Custom Filter & Adaptive Equalization

Reply
 
Thread Tools
  #1  
Old 10-06-2002, 05:37 AM
Stephen M Stephen M is offline
Senior Member
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 439
Free Plug-In Filters: Custom Filter & Adaptive Equalization

While looking for info on 'Fovea Pro' (which may be too deep for me) I stumbled over these three plugs - which may be of interest (the third less so for most users):

Custom Filter: Just as unintuitive as the Adobe one, but with more options (KPT Convolver seems to be the king of convolutions).

Adaptive Equalization: implements a technique for increasing the local contrast of images by reducing overall dynamic range. It is particularly useful for making small surface marks visible, or revealing detail in shadow areas, while preserving color information.

http://www.reindeergraphics.com/free.shtml

Regards,

Stephen Marsh.
Reply With Quote
  #2  
Old 10-06-2002, 08:32 PM
Stephen M Stephen M is offline
Senior Member
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 439
I have had some small time to play with these two filters since posting...

The Custom Convolution Filter is like Photoshop's filter/other/custom with floating point precision (as if convolution needs to be made harder with more precision than simple integer math) and a few other options including high bit edit ability. The supplied matrix txt files are loaded into the plug to give you a start on using this very unintuitive 'filter maker'.

The Adaptive Equalization filter is similar in result in some ways to my 'EnhanceDetail' action:

http://www.retouchpro.com/forums/att...=&postid=20574

You REALLY do NOT want to use this on skintones (unless going for the reptile look) - but for shadow detail, natural rough detail in rocks, old metal and other 'rough' objects this can add some much needed detail and local contrast, using a duped filtered layer blended at 2-5% (yes, really low) opacity in different blend modes may help (luminosity, multiply, hard light, overlay, experiment!). Shadow detail may use some higher opacity, such as 10% or perhaps higher for the right image/blends, but highlight detail only seems to need a very minor opacity blend (you can use blend if sliders or masks to reduce the effect more so in the highlights than the shadows etc).

In addition to contrast masking, 'coming out of the shadows' and other shadow lifting tricks, this filter can help bring out shadow detail - but it can also bring out posterized shadows, JPEG artifacts, noise and other junk. Due the local contrast boost, some dark halo USM type effect is also a side benefit of this filter.

Before using this filter, it might be wise to use methods similar to ones described in a small article of mine (Photoshop 5 action included to help demonstrate the methods in the article):

http://members.ozemail.com.au/~binar...ctremoval.html

With further exploration this filter may prove useful for retouching and perhaps extraction, when combined with other methods...

Take care with this filter, poor application may ruin things just as quick as helping.

Stephen Marsh.
Reply With Quote
  #3  
Old 10-06-2002, 09:25 PM
DJ Dubovsky's Avatar
DJ Dubovsky DJ Dubovsky is offline
Senior Member
 
Join Date: Aug 2001
Location: Upper Penninsula of Michigan
Posts: 1,659
Stephen,
I downloaded them all and extracted them. I haven't moved the filters to the PS plugin file yet. In one of them there are several folders with text files of numbers in them. Where did you put them? In the plugins folder as well? I skimmed over the PDF file but saw nothing to explain where to put them. Just curious.
DJ
Reply With Quote
  #4  
Old 10-06-2002, 09:57 PM
Stephen M Stephen M is offline
Senior Member
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 439
Hi DJ, these are the Custom Convolution filter settings, which are manually loaded from within the third party Custom filter in question (to save you typing in all those numbers).

I personally store the plug in a folder called Custom Convolution and the folders in question live there (but they could be anywhere on your drive/s).

It is then a simple matter to navigate to the plug folder to find the files to load. I do the same for Actions, Adobe custom filter kernels, brushes etc...all live in a Goodies folder within the apps folder for easy access.

I am just about to try to find a demo version of KPT Convolver as I am getting sick of doing maths just to get a result I finally find that I don't like. <g>

Stephen Marsh.
Reply With Quote
  #5  
Old 10-06-2002, 10:13 PM
DJ Dubovsky's Avatar
DJ Dubovsky DJ Dubovsky is offline
Senior Member
 
Join Date: Aug 2001
Location: Upper Penninsula of Michigan
Posts: 1,659
Oh thank God. I was thinking I would have to type in all those numbers myself. Thanks
DJ
Reply With Quote
  #6  
Old 10-17-2002, 10:53 AM
jcr6's Avatar
jcr6 jcr6 is offline
Member
 
Join Date: Oct 2002
Location: Asheville, NC
Posts: 72
Custom (Both Adobe's and Reindeer's versions)

Do you want me to give you a tutorial on the kinds of things that you can do with a convolution kernel and what they're good for?

The reason we provide that kind of plug-in is because it is the basis for image processing. You can do bluring, sharpening, edge-detection, pattern matching and a host of other things with kernels, so it seemed natural to provide (albeit unintuitive) this kind of tool.

-Chris Russ
Reply With Quote
  #7  
Old 10-18-2002, 01:30 AM
Stephen M Stephen M is offline
Senior Member
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 439
Chris - firstly, welcome and thank you for posting - it is nice to have the plugs creators willing to lend a hand, when it is not really a problem with the plug itself.

Thanks for the kind offer of a tutorial - yes that would be VERY welcome.

I understand that convolving is a complex topic and is based in maths and pixel brightness levels, but the simpler the better would be my vote...I have read many tutorials from software makers and math geeks - but for an average GUI based user, this is all very foreign...add in floating point precision - and things just get harder for the newbies like me! <g>

Stephen Marsh.
Reply With Quote
  #8  
Old 10-18-2002, 11:12 AM
jcr6's Avatar
jcr6 jcr6 is offline
Member
 
Join Date: Oct 2002
Location: Asheville, NC
Posts: 72
Convolution
Let's start with the basics. What you're really doing is creating a new image a pixel at a time, using the rules in the kernel.

Consider the center of the kernel (5x5 in Photoshop, 7x7 with my Custom plug-in) to be the original pixel, and the squares around it to be its neighbors. If we used a kernel like this:

0 0 0 0 0
0 0 0 0 0
0 0 1 0 0
0 0 0 0 0
0 0 0 0 0 (set the scale to 1 offset to 0)

Add extra zeros around the outside to get to a 7x7:
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 1 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 (set the scale to 1 offset to 0, or turn on “Autoscale”)

This is called the identity function. If you use this kernel you will get out exactly what was put it. The weight on the center pixel is 1.0, and the weights on the neighbors are all 0.0, so the image is left alone.

Add an Echo

If we change it to look like this:

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 1 0 0 1
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 (set the scale to 2 offset to 0, or turn on “Autoscale”)

You add an “echo” that is 3 pixels to the right, and the image seems to shift 1 1/2 pixels to the right (halfway between the center and the echo).

Embossing

Let’s change the value to the right to be a –1 instead.

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 1 0 0 –1
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 (set the scale to 1 offset to 128, or turn on “Autoscale”)

This shows you the difference between the central value (the original image) and the value 3 pixels to the right. We’ve just invented embossing.

The –1 doesn’t have to be the value 3 pixels to the right. In fact, it could be ANY of the neighbors. Try it.

The technical name for this is a Directional Derivative – we’re taking the 1-D derivative or the rate of change from a pixel to its neighbor which gives us the slope of the signal. Not really meaningful unless you can think of the brightness of the image as a surface (treat the values as altitudes).

The derivative tends to be large (either positive or negative) when the image is changing rapidly. This can happen in two places: edges and noise.

Averaging (or blurring)

We can get rid of noise by adding neighbors together. Try the following kernel:

0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 1 1 1 1 1 0
0 1 1 1 1 1 0
0 1 1 1 1 1 0
0 0 1 1 1 0 0
0 0 0 0 0 0 0 (set the scale to 21 offset to 0, or turn on “Autoscale”)

This is an approximation of a round neighborhood where all 21 values are added together. The original pixel is therefore 1/21 of the result. This is a significant blur.

Let’s try to blur in only one direction:
0 0 0 0 0 0 1
0 0 0 0 0 1 0
0 0 0 0 1 0 0
0 0 0 1 0 0 0
0 0 1 0 0 0 0
0 1 0 0 0 0 0
1 0 0 0 0 0 0 (scale 7 offset 0, or turn on “Autoscale”)

(With Photoshop, use the center 5x5 and set the scale to 5 offset to 0)

This will be a blur in one direction (45 degrees). You could try thickening the line to see what that does.

Q: What about scale and offset?

Here’s a good rule of thumb:
If the sum of the values is zero (e.g. the embossing case, directional derivatives), then the offset should be 128. The scale works if it is the sum of the positive values in the kernel. You aren’t restricted to that, but it is a good place to start. Or, you can turn on “Autoscale” and our Custom filter will do the work (it will find the largest and smallest value and make sure they fit in the 0..255 range).

Sharpening

We’ve seen that you can (sort of) find an edge with a derivative. How does “Trace Edges” work? They use two different kernels and add the results of the images together. (This is a simplified version of a Sobel Edge Detector, named after the guy, but it is similar to Trace Edges.)

We’ll take some directional derivatives (do each of these in different layers):
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 0 -1 0 0
0 0 1 0 -1 0 0
0 0 1 0 -1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 (scale = 3 offset = 0, autoscale OFF)

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 -1 0 1 0 0
0 0 -1 0 1 0 0
0 0 -1 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 (scale = 3 offset = 0, autoscale OFF)

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 -1 -1 -1 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 (scale = 3 offset = 0, autoscale OFF)

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 0 0 0 0 0 0
0 0 -1 -1 -1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 (scale = 3 offset = 0, autoscale OFF)

Now use the transfer mode “Lighter” between all of the layers. This gives you the biggest “step up” from each of the 4 directions (there is a way to do 8 directions) as a new image. This is a map of where the edges are. Also note, we’re using a little bit of blur in the other direction when doing the derivative. This helps reduce the effect of noise when “Tracing Edges”.

That’s enough for today, but next time we’ll talk about Gaussian Blurs, Laplacian (2nd-derivative edge enhancement), high-pass and low-pass filters, and the “Mexican Hat” filter.

-Chris Russ
Reply With Quote
  #9  
Old 10-23-2002, 11:09 AM
jcr6's Avatar
jcr6 jcr6 is offline
Member
 
Join Date: Oct 2002
Location: Asheville, NC
Posts: 72
Angry Interest in this topic?

Questions, problems, things I should know, things I SHOULDN'T know?

If you're not interested, then I'll stop.
Reply With Quote
  #10  
Old 10-23-2002, 11:35 AM
Doug Nelson's Avatar
Doug Nelson Doug Nelson is offline
Janitor
 
Join Date: Aug 2001
Posts: 6,387
Blog Entries: 21
Please don't stop, it's fascinating. Way over my head, but fascinating.
Reply With Quote
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
PHOTO ART: Mini-challenge #49 – Park Bench DannyRaphael Photo Art Mini-Challenges 100 12-25-2010 08:49 PM
Impressionist plugin: Troubleshooting Cheryl H Photo-Art Resources 34 06-15-2009 11:13 PM
Sharpening T Paul Scratch Pad 34 08-16-2004 11:02 AM
Photoshop Filters: Books and websites DannyRaphael Photo-Based Art 1 03-20-2003 05:17 PM
Impressive Free Filters thomasgeorge Software 1 01-02-2002 11:40 AM


All times are GMT -6. The time now is 06:49 PM.


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