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
  #16  
Old 10-26-2002, 07:25 PM
DJ Dubovsky's Avatar
Senior Member
 
Join Date: Aug 2001
Location: Upper Penninsula of Michigan
Posts: 1,659
Chris,
I'm amazed and thankful that you took the time to type all that out for us and try to explain the mechanics behind it all. It does seem overwhelming but I definately bookmarked this page for future numbers to plug in and save as settings. I think if I really sit down and plug through it and look at the results of your numbers I will begin to feel more comfortable with this filter.
DJ
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
  #17  
Old 10-28-2002, 06:47 AM
jcr6's Avatar
Member
 
Join Date: Oct 2002
Location: Asheville, NC
Posts: 44
Let's go back and try some of these. If you have trouble figuring out what I wrote, we can go over those things again.

The point is that convolution is a fundamental part of image processing and that it is a powerful tool.

Not necessarily an EASY tool.

(It's not like I can look at a kernel and intuitively tell you what it does. I have to stare at it for awhile and then guess.)

-Chris
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
  #18  
Old 10-28-2002, 08:28 PM
Flora's Avatar
Moderator
Patron
 
Join Date: Mar 2002
Location: Milan, Italy
Posts: 2,058
Blog Entries: 3
Hi Chris!

I have been asking around about Custom Filter, (Photoshop), a while ago.

Stephen has been a big help pointing out several links where I could find a lot of information on the topic....Unfortunately all that proved to be "Way over my head" too....

It will probably remain that way for me but, after reading your posts, I'll definitely start experimenting with it again.... It fascinated me before and now that I have a better glimpse on the starting point....well......

So, let me join everybody else in thanking you for "sharing your time and knowledge on this topic"
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
  #19  
Old 10-30-2002, 06:26 AM
stewreno's Avatar
Junior Member
 
Join Date: Oct 2002
Location: Honolulu
Posts: 1
Hi Chris! Could you explain Scale and Offset in more detail? I'm not sure I get what I am trying to accomplish with those numbers.

Is the Offset added to the center value? Or the final product? Or is something else completely?

To get something even close to the original, the sum of the values in your kernel should be 1, Correct? It seems that an Offset value of 128 would throw this way off, wherever it's used.

I can't figure exactly where the Scale fits in either, although I know it divides some part of the convulsion.

Paint Shop Pro uses the terms Division Factor and Bias. I'm assuming they are the same thing as Scale and Offset.

That's all the questions I have right now. Thanks in advance (and thanks for the awesome tutorials, I hope to see more).
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
  #20  
Old 10-30-2002, 06:50 AM
jcr6's Avatar
Member
 
Join Date: Oct 2002
Location: Asheville, NC
Posts: 44
Quote:
Is the Offset added to the center value? Or the final product? Or is something else completely?

To get something even close to the original, the sum of the values in your kernel should be 1, Correct? It seems that an Offset value of 128 would throw this way off, wherever it's used.

I can't figure exactly where the Scale fits in either, although I know it divides some part of the convulsion.

Paint Shop Pro uses the terms Division Factor and Bias. I'm assuming they are the same thing as Scale and Offset.
Let's say I had a kernel that was like this:
0 0 0
1 1 1
0 0 0

(remember to put this in the center and add the extra zeros all around -- I'm a lazy typist today)

I would want to divide the result by 3 because the sum of the kernel is 3. Since the sum isn't zero, we can leave the offset at 0.
(Scale is what we divide the product of the pixels and the kernel by. Offset is added afterwards.)

You could invert the image with:
0 0 0
0 -1 0
0 0 0 (scale = 1, offset = 0)

The case where offset matters is when the sum of the kernel is zero:
0 -1 0
-1 4 -1
0 -1 0

In a uniform area on the image, where all of the neighbors are the same, this will give you a zero result. It the edges are getting darker, you could get a negative result and if the edges are getting brighter you could get a positive result. So we add 128 (gray) to push these values to the middle of the histogram.

What do you use for scale in this case? I like to use 4 which is the sum of the positive values. You could use 1 and really see the effects more strongly.

The one that really causes confusion is this one:

0 -1 0
-1 8 -1
0 -1 0 (scale = 4, offset = 0)

Now, the positive sum is 8, the negative sum is 4 and the overall sum is 4. Because the sum isn't zero the offset should be 0. The scale should be the sum of the kernel, or in this case 4.

Does this make sense?
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
  #21  
Old 11-01-2002, 01:48 PM
pstewart's Avatar
Registered User
 
Join Date: Jul 2002
Location: Chicago suburb
Posts: 790
It was more than nice of Chris to share all this expertise with us. Now that we know the secrets, isn't he afraid we'll become competitors? Hmmm...let's see...I think I'll call my company muledeer graphics.

Jus' teasin'...

Phyllis
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
  #22  
Old 11-01-2002, 02:14 PM
jcr6's Avatar
Member
 
Join Date: Oct 2002
Location: Asheville, NC
Posts: 44
Quote:
Muledeer Graphics
Sure, why not. Then we'll change our name to Nuclear Graphics and go fission all over ya!

I am trying to lead you down the golden path. I will attempt to explain high-pass filters without going the Fourier mathematics route. Then, I guess, we could go to fractal textures... Hmmm.

Before then, I think we'll go into edge detectors. I wanted to show one called a "Frei and Chen" which is very good at finding faint lines, but rejecting noise. If this were used to create a selection mask on the image, I imagine we could do a rather impressive job. (First, let me try a few things on my computer before unleashing it on you.)

The other constraint is that I want a way for people to be able to try it themselves, and perhaps play around. We can't do an ordinary Sobel in an action because it really calls for taking the square root of the sum of the squares of two orthogonal derivatives. Yes, I have a plug-in that does it. Or, a Canny that will make the lines skinny afterwards.

(Some people in machine vision have a huge obsession with edges and regions of the image, and we might be able steal some of their ideas to make better automatic segmentation actions in another discussion.)

Finally, I'd like to introduce you all to a gentleman named David Marr who was a physiologist trying to figure out how the human visual system worked -- by tracing the neurons. Basically he was mapping out the wetware.

Image processing/image analysis is a collection of "Hacks that worked." (Call them heuristics if you like.)

Now that I've hinted at where we're going, this is your last chance to ask questions about where we've been.

-Chris
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
  #23  
Old 11-05-2002, 06:38 AM
jcr6's Avatar
Member
 
Join Date: Oct 2002
Location: Asheville, NC
Posts: 44
Stephen M asked a question about kernels that did nudging. There were two groups of them, one that did 1/3 of a pixel and another that did 1/2 a pixel.

The 1/3 pixel kernel looked like this:

0 0 0 0 0
0 0 0 0 0
0 0 8 4 0
0 0 0 0 0
0 0 0 0 0 (scale = 12, offset = 0)

Except they did a little bit of sharpening at the same time, which I think detracts from the result and causes a tiny bit of a halo:

0 0 0 0 0
0 0 0 0 0
0 -1 8 4 -1
0 0 0 0 0
0 0 0 0 0 (scale = 10, offset = 0)

Basically, the second one uses a small amount of a Laplacian (2nd-derivative) sharpening to compensate for the implicit blur in the kernel.

You could rotate the kernel to get blurs in the other 3 directions:

0 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0
0 0 4 0 0 - 0 0 0 0 0 - 0 0 0 0 0
0 0 8 0 0 - 0 4 8 0 0 - 0 0 8 0 0
0 0 0 0 0 - 0 0 0 0 0 - 0 0 4 0 0
0 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 (scale = 12, offset = 0)

Do you understand why this works? Questions? Problems?
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
  #24  
Old 11-06-2002, 03:08 AM
Senior Member
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 439
Chris - again you astound me...Thank you for deconvolving the third party convolution! <g>

While I am at it - if we are convolving...and there is a thing known as deconvolution which can be used for making a blurry image appear more infocus...just what/where does deconvolution fit into the scheme of things?

OK, let me see if I am following things correctly from your previous excellent tutorials.

These 'sub pixel motion' custom convolution kernels are a variant of what you described as a more basic 'echo' in an earlier post of yours. Correct?

Instead of a basic 00101 echo as you onced described, the current pixel being processed by this third party kernel will base the echo as a 8:4 in averaged brightness weighting. Correct?

The -1 sharpen value seems obvious now that you point it out. I had noticed it visually, but I did not know how it fit into the construction of the kernel. I agree that this is perhaps not best as a default, thanks to your excellent tip I may now make a version without sharpening as well as keeping the versions as is.

Have I been keeping up with things? Am I totally off base? Do I deserve a A or an F for my test results?

Stephen Marsh.
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
  #25  
Old 11-08-2002, 07:35 AM
Junior Member
 
Join Date: Oct 2002
Posts: 3
Smile Convolution presets in Gimp

Quote:
Originally posted by jcr6

The other constraint is that I want a way for people to be able to try it themselves, and perhaps play around. We can't do an ordinary Sobel in an action because it really calls for taking the square root of the sum of the squares of two orthogonal derivatives. Yes, I have a plug-in that does it. Or, a Canny that will make the lines skinny afterwards.


-Chris [/b]
It would be difficult if at all possible to do this in PS actions, but with the scriptable Gimp, it is easy to play with convolutions which are very powerful indeed. In case anyone is interested take a look at the script here http://gug.sunsite.dk/scripts.php
or more specifically the version 0.5 here http://gug.sunsite.dk/scripts/1005753014.scm

The scripting language used in Gimp is called Scheme, a subset of LISP language..

I have an example showing the powerful convolutions at work, here at http://www.geocities.com/lasm.rm/video.html

All the artistic, line-art, black-and-white photos you see are convolved from a custom Gimp script. I have never seen a comercial product which can do this kind of transformation
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
  #26  
Old 11-08-2002, 07:55 AM
jcr6's Avatar
Member
 
Join Date: Oct 2002
Location: Asheville, NC
Posts: 44
Quote:
artistic, line-art, black-and-white photos you see are convolved from a custom Gimp script
Not dissimilar from adding "Trace Edges" back to the original image. I suspect that we could do a fairly good approximation of your Gimp Script within Photoshop.

Actually, that would be a good challenge. Can we come up with ways to approximate various effects with actions, custom convolution, etc. Naturally, everything we come up with will be in the public domain, with commentary on how we did it and why.

Steve, what do you think?

-Chris
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
  #27  
Old 12-14-2002, 09:36 PM
Junior Member
 
Join Date: Oct 2002
Posts: 3
Cool Edge Detection Gallery

Here's a showcase of Gimp's edge detection algorithms

http://www.pbase.com/lasm/edge_detect_in_gimp

Enjoy !
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
  #28  
Old 12-29-2002, 08:26 PM
Senior Member
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 439
Action Tester Required

Hi Folks, I have been playing with custom convolution off and on and have put some of these kernels into a Photoshop 5.x or higher action set, things are a bit raw at this point - but close to being final (I hope).

This has been a great learning experience, which I have to thank Chris Russ for helping me along the way - as the consise and easy to follow explanations in this thread have helped me decipher some of the common but hard to follow examples that can be found on the web when looking for info on 'image processing via convolution'.

Before this action set grows any larger, I thought it might be wise to ask for some help in:

a) Checking the convolution kernels contained in the action, including kernel construction (coefficients, bias, scale & offset) and that it matches the action name and works as intended etc.

b) Testing the actions in multiple versions of Photoshop on Mac and PC.

This action set will be a free offering and credit will go those who helped test and evaluate the actions, or additions to the actions or whatever. I will also put together a PDF manual to accompany the action set, once all the little details are ironed out.

So, if you think that you have an 'intermediate' understanding of convolution (then you're one up on me <g>) and picking apart actions - please send me a 'PM'. I am testing on PC v5.x and v7, so a Mac based v6 user would be ideal - although I would really like to hear from anyone who has been following this convolution thread and would like to help verify the results gained so far.

Sincerely,

Stephen Marsh.

Last edited by Stephen M; 01-06-2003 at 08:58 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
  #29  
Old 01-11-2003, 10:21 PM
Senior Member
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 439
Custom Convolution Action Set Preview

As I have not had any response to these new posts, I presume that this post will either scare people away or spark their imagination...

Attached is a GIF image preview of the custom convolution actions in the set.

Stephen Marsh.
Attached Images
File Type: gif convolution_actionsetpreview.gif (26.6 KB, 50 views)

Last edited by Stephen M; 01-12-2003 at 12:52 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
  #30  
Old 01-13-2003, 12:44 AM
Senior Member
 
Join Date: Sep 2001
Location: Dallas/Ft.Worth,Texas
Posts: 230
Hello Steven,
I can give you a hand(if you want). It's the least I can do for you. I use them for noise reduction(in the a,b channels of L*A*B) in actions and for sharpening purposes,actions also. I can test on a pc for v.5,5.5,6. On the mac I can't do this because I don't have acess to it at times(at work shooting).
I just got done a skin smoothing action which I wanted to do for a while(based on Dan Margulis'). But taken it a little further than the last one I posted.

John Opitz
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
PHOTO ART: Mini-challenge #49 – Park Bench DannyRaphael Photo Art Mini-Challenges 86 10-22-2008 04:12 AM
Impressionist plugin: Troubleshooting Cheryl H Photo-Art Resources 26 04-02-2006 09:43 AM
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 02:12 PM.