• Please use real names.

    Greetings to all who have registered to OPF and those guests taking a look around. Please use real names. Registrations with fictitious names will not be processed. REAL NAMES ONLY will be processed

    Firstname Lastname

    Register

    We are a courteous and supportive community. No need to hide behind an alia. If you have a genuine need for privacy/secrecy then let me know!
  • Welcome to the new site. Here's a thread about the update where you can post your feedback, ask questions or spot those nasty bugs!

Edge Sharpening - One Method

If any of you have ever used FM’s Sharpen Pro, you already have an idea of what edge sharpening is. It’s a way to only sharpen the parts of an image where there is a distinct edge while leaving “clean” areas like sky etc unsharpened.

This technique is a little long winded, but it works really well.

Here is our starting image… This is a crop of one of the images of LeLe I got at the zoo last week.

starting_image.jpg


What we want to do in this shot is sharpen the fur, but leave the out of focus part smooth.

Step 1) copy the background layer to a new layer. Front the layer pallet drag the background to new layer icon or from the menu click <Layer><Duplicate Layer>

Step 2) Run <Filter><Styalize><Find Edges> on this new layer. You should have something like this:

step_2.jpg


Step 3) Now we want to put a curve on this layer. And a pretty aggressive curve at that. Press <ctrl><M> or from the menu select <Image><Adjustments><Curves> to pull up a curves dialog. Put a curve on it something like this:

step_3_a.jpg


Notice the white box at the top right of the curves window. See how I’ve dragged it to the left? That is what makes the soft lines in the background go way. Then notice the basic shape of this curve. It’s this shape curve that makes the hard edges very dark. Imitate this basic shape and play with it for your image so that the edges of the object have good hard definition. Then play with that top box to push things you DON’T want sharpened to white. This is my result:

step_3_b.jpg
 
Step 4) Blur this image. To smooth out the harshness of this image we are going to put a slight Gaussian Blur on this layer. Use a very low radius… for this image I used a radius of 1.2

step_4.jpg


Step 5) Make this layer into a channel so we can use it as a selection. Press <ctrl><A> to select the whole layer, Click over to the Channels Pallet, Click on the new Channel icon at the bottom of the Channels pallet, (this will make a new channel called Alpha 1) then press <ctrl><V> to paste our edges layer into this new channel then press <ctrl><D> to deselect the original layer.

Your Channels layer should look like this when you’re done.

step_5.jpg


Step 6) Click back over to your Layers pallet, Point at the edges layer that we made in the above steps and drag it down to the little trash can at the bottom of the pallet. We don’t need it anymore.

Step 7) Copy the background layer to a new layer. Front the layer pallet drag the background to new layer icon or from the menu click <Layer><Duplicate Layer>

Step 8) Load the Alpha Channel we created earlier as a new selection. From the Menu click <Select><Load Selection> to open the Load Selection Dialog. In the Channel Drop down select “Alpha 1” and be SURE to click the INVERT check box.

step_8.jpg


You should now see the “Marching Ants” on your image…

Step 9) Now we want to contract this selection by one px… just to be sure we are only sharpening the edges of things and nothing more… Click <Select><Modify><Contract> Enter “1” in the box and click <OK>

Step 10) Do an aggressive USM (Unsharp Mask) on this layer. The key here is to set the amount very high.. like 300 to 400 and the radius to an amount dependant on what your final output is. If you are doing a small image… like for the web… make the radius 0.3… for a file around 2000x1300px make the radius 0.6 for a highres file, make the radius about 1.3 This is kind of a touchy / feely amount. This sounds very aggressive… but with the selection we’ve made… only the edges will get sharpened. Be sure to keep your Threshold at 0

I did this image at 0.3

Step 11) Press <ctrl><D> to deselect the “Marching Ants”

EDIT->

Step 12) You can adjust the Opacity of this layer to get the sharpen effect just the way you want.

<-EDIT

And that’s it… Yeah… I know it’s long… but it works REALLY well… as you can see here:

final_image.jpg
 

Tim Armes

New member
Hi Frank,

Great tutorial. I'm sure that they'll be a lot of members who'll greatly appreciate the level of detailed explanation that you've given.

If you (or anyone else) have any tutorials like this to offer then please do so. I'm intending to maintain a sticky of links to threads such as these so that we end up with a good achive of technique threads that are easy to find.

Tim
 

Nick Rains

pro member
This is indeed a good sharpening technique, please allow me a couple of tweaks...

Removing the colour from your new layer before using 'find edges' will give you a better mask.

Also, if you blur the mask before using levels you can control the shape of the mask somewhat in the levels adjustment.

Lastly, Smart Sharpen will probably give you slightly better results than USM - it's a superior tool.
 

Nick Rains

pro member
Oh, I forgot... this sequence of steps is quite easy to 'action'.

Setting the levels adjustment step to show the levels dialog box allows for individual fine tuning.
 

Asher Kelman

OPF Owner/Editor-in-Chief
Congratulations! That is going to be a mighty useful action. Nick, would you be able to add a guide to Smart Sharpen settings?

Asher
 
Easier Solution and Offer Of Way Too Much Detail

A simpler free suggestion, use the Actions or scripts from:

http://www.thelightsright.com/photoshop-tools.htm

I am not fond of his creative or output sharpening, but the capture sharpen is very good if you use the enhanced masks in unsharp mask mode using the script version. You can then turn off the surface sharpening as desired and adjust the lightening and darkening of edges to suit. Please note, the capture sharpen using Unsharp Mask and enhanced masks is very CPU intensive.

The author there also has Actions for edge detection and many other things all free.

Please note, this is not to deride educating people on how edge sharpening works. I am 100% in support of that. But, I have spent 100s of hours studying sharpening and can provide an first tier list of references (highly technical journal articles and pre-prints) if anyone is interested. Please note, this is hours of work to generate an incomplete bibliography so please do not ask for it unless you really want it. In which case I will gladly share.


Myself, once I found tools that met my needs, I abandoned the search as I would rather shoot photos than program. Nonetheless, I think there may be real value in taking my list of articles and researching them further for future articles and taking the resulting morass of algorithms and training a neural network based on a training set using hand generated masks. But I have to get more finesse into my constantly evolving taste in sharpening first.

As to Fred Miranda, that scumbag* will hopefully rot where he deserves for his deceptive business practices. I cannot recommend doing business with such an unethical individual in any fashion.

sincerely,

Sean (showing engineering pragmatism*** and academic roots)




* This is a 100% professional comment. I once went to try his "free" digital velvia action and the scumbag con-artist pulled a bait and switch** and asked for my credit card number which regardless of trying to make a living or low cost is a con-artist act and make the term scumbag a kindly description. The word free is well defined and is not the same as 4 bits ($0.50 USD) to cover bandwidth. I wrote the con-artist off at that point as just that as I will never give a credit card number to a bait and switch scam artist. I should note that I would have gladly paid 4 bits for the Action. Just never a red cent ($0.01 USD) to a con-artist.

** Bait and switch is when you ask for one thing and the criminal sales staff then tries to sell you something more expensive that you did not want or that should have been included (i.e., express shipping, the lens caps for your lens, ...) or saying what you ordered is out of stock if you fail to buy accessories.

*** Results are what matter.
 

Asher Kelman

OPF Owner/Editor-in-Chief
Sean,

While what you have said represents what you feel and therefore has logic too it, the term you have applied is a personal judgement which in one go negates and perhaps ignores all the value Fred Miranda has given. I agree we have a tendency to make heros out of "public figures" but also we like to attack them. "Bait and switch" is a very bad thing. If that how transactions are designed, that is unacceptable and very surprising. However, there could be alternate explanations.

I am not an advocate for anyone, however, I do see, at this time, a lot more good.

It is possible perhaps that there was an error in his site or that there was an error in judgement. However, "scumbag"? I don't think we should use such energy to denigrate people. I think, however, you might be justified to warn people of bad practice. More than that is IMHO, unfair.

I still see FM website as a major contribution to the photographic community. I need a hell of a lot more before I'd accept a sweeping negation of Fred! Please be conservative in use of adjectives so that we don't get to trashing people!

I haven't deleted your comments at this time, but you have made me think a lot about our policy of not censoring speech! This is however, something I am deeply concerned about.

Asher
 
Last edited:

Asher Kelman

OPF Owner/Editor-in-Chief
Sean,

Your study of sharpening appears to have taken a lot of time. Looks like you might have enough for a thesis! I'd like to know exactly what issues you have with the creative output sharpening and why you like the capture sharpening. http://www.thelightsright.com/photoshop-tools.htm

Also what difference is there between these and the commercial Photokit sharpening package?

Asher
 
Asher Kelman said:
Sean,

While what you have said represents what you feel and therefore has logic too it, the term you have applied is a personal judgement which in one go negates and perhaps ignores all the value Fred Miranda has given. I agree we have a tendency to make heros out of "public figures" but also we like to attack them. "Bait and switch" is a very bad thing. If that how transactions are designed, that is unacceptable and very surprising. However, there could be alternate explanations.

I went through his transaction processo for the "free" digital Velvia Action and was asked for a credit card number for bandwidth fees. I would have freely paid $0.50 USD for it, but telling me it is "free" and then asking $0.50 for bandwidth is simply a con-job. There is no if, and, nor but that about asking money for for "free" tool that can make such a lie anything but a con-job.

That is dishonest behavior. (period)


The issue is not the trivial cost. The fact is $0.50 for $0.001 USD in bandwidth to offset other costs is
a scam for a "free" product.

Add in that every single image I have seen FM's Actions quoted as a reason for its poor quality while my rational and correct critiques were wrong* when the fact was the image was simply grossly oversharpened. i.e., there is no substitute of computer tools for human interpretation.

And such a con cannot be forgiven. Especially when others freely share their knowledge and give better tools awy for nothing.

sincerely,

Sean (who will freely call a crook a crook regardless of their PR with completely professional judgement****)


* i.e., I used FM's Actions hence the severely visible sharpening halos must be a hallucination on the part of the highly trained viewers part**.

** I came at all this photo stuff via computer vision and remote sensing***


*** Using visible, near IR, IR, UV, .. to detect engineering details via computer vision and human interpretation.


**** I have met enough world renowned experts in their field to know that such greed is simply greed and nothing more than greed or a sick ego boost. Especially when their Actions were third tier and lackded any serious aspect of quality.
 
Asher Kelman said:
I'd like to know exactly what issues you have with the creative output sharpening and why you like the capture sharpening.

My take on that is the following. When an image is digitized, there will be some losses of resolution. Some of those losses are by design, e.g. the Anti Aliasing-filter which should prevent nasty artifacts, and part of the losses are due to imperfect optics, Depth-of-Field or the lack thereof, camera subject motion, etc.

I don't see much of a controversy when lens aberrations are corrected, who likes Chromatic Aberration or corner unsharpness anyway? There are various ways of addressing those. Things get a lot more debatable if images get sharpened, before we know the final output size.

For example, sharpened images cause more artifacts when down-sampling is needed (which happens more often as sensor-arrays have increasing numbers of sensels). In fact it is necessary to suppress the highest spatial frequencies in order to reduce artifacts. I've done some experiments to illustrate the issues, and the results can be found here.

When up-sampling, images that are too sharp may cause pixel shape artifacts, e.g. Photoshop's Bicubic Smoother attempts to address that, although dedicated software (e.g. Qimage) does a better job.

I usually postpone almost all irreversible sharpening if there is a chance that down-sampling may be involved (e.g. Web publishing).

Another issue I have with most (output) sharpening techniques, is that they usually only enhance edge contrast, but they don't really sharpen! It's just an illusion, which is fine for many purposes if they don't create additional visible artifacts by themselves, e.g. halo/clipping.

That's why I usually either blend my sharpened layer, or I use more scientific techniques (like ones used in astrophotography) if time allows.
Blending a sharpened layer, has the benefit of better control over the clipping halo artifacts that can result from attempts to contrast enhance edges that are already contrasty. This is my usual starting point:

Non-clipped-sharpening.png


The effect of such a blend is that already high contrast edges receive less contrast boost, and lower contrast edges receive more. Dialling in some layer opacity and/or adding masks, provides a very flexible amount of edge contrast enhancement, whichever method was used, and it avoids color errors from being introduced. It also allows to totally disable all sharpening for down-sampling purposes.

'Creative sharpening' is just that, a creative way of postprocessing that manipulates regional contrast with 'sharpening' tools.

Bart
 

Ray West

New member
Hi Sean,

Thanks for the link to 'the lights right' site. Its actually one of the better web sites I've come across recently, a very nice web site - you choose the music!

He has actually just put up something about 'velvia look'.

Best wishes,

Ray
 

Ray West

New member
Sharpening, contrast, white balance adjustment, whatever, is playing with numbers. If it is more than just multiplying values, then the order in which the playing takes place will be important. For example, in this panda example, the white hair is sharpened, but not the black, as far as I can see. If you play with, say, 'shadow highlight' now, to try and recover some black detail, then it is possible the image will become unuseable.

wrt Qimage, there are sample images on his site, which are interesting to play with. It would be interesting trying to find examples for neural network training, it may work wrt straightening images, maybe cropping, but I have no idea about other image qualities.

Best wishes,

Ray
 
Asher Kelman said:

While what you have said represents what you feel and therefore has logic too it, the term you have applied is a personal judgement which in one go negates and perhaps ignores all the value Fred Miranda has given. I agree we have a tendency to make heros out of "public figures" but also we like to attack them. "Bait and switch" is a very bad thing. If that how transactions are designed, that is unacceptable and very surprising. However, there could be alternate explanations.



My apologies if the term is too strong, but I am of the fool me once and be written off school. And he intentionally pulled a bait and switch on me which is not something I will forget nor forgive.

As to contributions, I have seen none but making a name for himself. The only time I have seen him mentioned directly to me is when I have given constructive critical commentary on processing artifacts and been told they could not possibly be there as they used an FM Action when they were plain for all to see.

That said, the real contributions are hopefully invisible and just show up as better images and should not be noted.
Asher Kelman said:
It is possible perhaps that there was an error in his site or that there was an error in judgement?


No. It was 100% intentional and spelled out in a paragraph. He claimed he needed people to pay $0.50 to offset bandwidth costs for his "free" action. I would have gladly payed $0.50 for it. But not after the bait and switch.

Taking a look at his homepage today I see 405 KB of image files on it. Since your average Action is less than 20 KB there is no way to justify bandwidth costs as necessary when a simple refresh of the homepage uses an order of magnitude of bandwidth. And a compressed (zip file) of an action is two orders of magnitude smaller. There is no way to justify what he did in terms of measurable bandwidth.

Asher Kelman said:
However, "scumbag"? I don't think we should use such energy to denigrate people. I think, however, you might be justified to warn people of bad practice. More than that is IMHO, unfair.

I agree I lessened myself by using that term. But that is how he treated me and likely thousands if not tens of thousands of others.
Asher Kelman said:
Please be conservative in use of adjectives so that we don't get to trashing people!

I will make an effort.
Asher Kelman said:
I haven't deleted your comments at this time, but you have made me think a lot about our policy of not censoring speech! This is however, something I am deeply concerned about.

My judgement here is based solely on his lack of ethical behavior and it has nothing to do with the quality of his work or tools which I refuse to use as I cannot wake in the morning and feel good about myself if I were to support such behavior. His intentional act violated me. It is not about the money, but the unethical behavior.

sincerely,

Sean
 

Asher Kelman

OPF Owner/Editor-in-Chief
Thanks Sean for revisiting this issue.

My concern is that we should use our capability in free speech in a way that we don't keep winning arguments but losing friends.

Asher
 
Hi Asher,
Asher Kelman said:
Your study of sharpening appears to have taken a lot of time. Looks like you might have enough for a thesis!
It was. But I only read up on it then abandoned doing the research to get something publishable.
Asher Kelman said:
I'd like to know exactly what issues you have with the creative output sharpening and why you like the capture sharpening. http://www.thelightsright.com/photoshop-tools.htm

The creative and output sharpening are too strong for my tastes. The capture sharpen is a pixel level sharpen and actually brings out details pretty well (good enough for my needs). The capture sharpen is also good for web output.

Asher Kelman said:
Also what difference is there between these and the commercial Photokit sharpening package?

  1. PK is $100 more than TLR.
  2. PK is faster than TLR.
  3. PK is less agressive in what it sharpens than TLR. But this can always be adjusted to suit.
  4. PK is closed source (although I suspect a determined individual could extract the steps.
  5. TLR is also available as a set of Actions so you can see the steps if you so desire.
  6. TLR will output masks only if you so desire or run such that you can interupt every step and customize it.
For wider sharpening I tend to just use Smart Sharpen with an amount of 15-45% with a 8-35 pixel radius (globally enhancing local contrast).

Over time I have found myself sharpening less. I do not sharpen images of people at outside of masked sharpening of specific details.

enjoy,

Sean
 
Top