Pages: [1] 2   Go Down

Author Topic: Halo-free sharpening algorithm  (Read 24500 times)

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2005
    • http://www.guillermoluijk.com
Halo-free sharpening algorithm
« on: October 21, 2010, 03:05:23 pm »

Manuel Llorens has developed a simple but effective algorithm that sharpens images without creating sharpening halos. This is possible because the algorithm focuses on reducing the blurring by eliminating the soft gradient zone between two sides of differentiated brightness. Unlike the common unsharp mask, it does not increase accutance by enhancing local contrast in the edges, so it will never produce halos.

A complete article including description, examples and source code here: Shar­pe­ning.

Before:


And after:


Regards
« Last Edit: October 22, 2010, 02:11:44 pm by Guillermo Luijk »
Logged

feppe

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2906
  • Oh this shows up in here!
    • Harri Jahkola Photography
Re: Halo-free sharpening algorithm
« Reply #1 on: October 21, 2010, 03:59:22 pm »

Manuel Llorens has developed a simple but effective algorithm that sharpens images without creating sharpening halos. This is possible because the algorithm focuses on reducing the blurring by eliminating the soft gradient zone between two sides of differentiated colour. Unlike the common unsharp mask, it does not increases accutance by enhancing local contrast in the edges, so it will never produce halos.

A complete article including description, examples and source code here: Shar­pe­ning.

Aren't sharpening halos desirable as long as they aren't visible in normal viewing conditions? Re: Fraser and Schewe in Real World Image Sharpening.
« Last Edit: October 21, 2010, 04:02:39 pm by feppe »
Logged

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2005
    • http://www.guillermoluijk.com
Re: Halo-free sharpening algorithm
« Reply #2 on: October 21, 2010, 04:19:46 pm »

It is better to achieve the ideal focus (no halos present). From CiC tutorial GUIDE TO IMAGE SHARPENING:

Unsharp mask sharpening (red line):


Ideal sharpening (green line):


Manuel's algorithm has the ideal sharpening in mind.

Regards

RFPhotography

  • Guest
Re: Halo-free sharpening algorithm
« Reply #3 on: October 21, 2010, 06:34:00 pm »

There are already methods other than USM which sharpen well without halos or other artifacts.  How is this method equal to or better than those?  How does one implement this method? 
Logged

feppe

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2906
  • Oh this shows up in here!
    • Harri Jahkola Photography
Re: Halo-free sharpening algorithm
« Reply #4 on: October 21, 2010, 07:09:04 pm »

It is better to achieve the ideal focus (no halos present). From CiC tutorial GUIDE TO IMAGE SHARPENING:
[...]
Manuel's algorithm has the ideal sharpening in mind.

That doesn't even begin to answer my question. How is it "better" or "ideal"?

Fraser and Schewe's book is widely considered the reference to sharpening, but what you claim seems to be against its teachings.

NikoJorj

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1082
    • http://nikojorj.free.fr/
Re: Halo-free sharpening algorithm
« Reply #5 on: October 22, 2010, 02:38:15 am »

Compromises, always compromises...
This method seems very interesting to avoid artifacts (the harsh look of an oversharpened image).
For me, I feel there is still a price to pay : fine textures are less sharpened than outlines, and it gives a bit of that "too smooth look".

Anyway, it's good to have the choice (or to mix methods as in LR/ACR), so kudos to Manuel Llorens to have made the code public!  :)
Logged
Nicolas from Grenoble
A small gallery

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Re: Halo-free sharpening algorithm
« Reply #6 on: October 22, 2010, 10:21:39 am »

That doesn't even begin to answer my question. How is it "better" or "ideal"?

Fraser and Schewe's book is widely considered the reference to sharpening, but what you claim seems to be against its teachings.

I don't see how this new sharpening method contradicts the teachings of Fraser and Schewe. The main sharpening tool used by these authors is the unsharp mask, which works by creating a sharpening halo. With that method, a halo is necessary to have a sharpening effect: no halo, no sharpening. They do discuss the limitations of the unsharp mask (page 132) and briefly cover sharpening using the high pass filter on a layer with the overlay blending mode and also smart sharpen (which is a form of deconvolution sharpening).

Their recommendations for use of the blend if sliders, surface masks and edge masks can be used with other forms of sharpening. Deconvolution methods such as Richardson-Lucy (RL) are attractive, since they actually restore image detail rather than creating the appearance of sharpness. Manuel's method adds another tool to our sharpening tool box and I think that we should learn how to use it rather than dismiss it on some theoretical grounds taken out of context.

Bill
Logged

feppe

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2906
  • Oh this shows up in here!
    • Harri Jahkola Photography
Re: Halo-free sharpening algorithm
« Reply #7 on: October 22, 2010, 11:48:15 am »

I don't see how this new sharpening method contradicts the teachings of Fraser and Schewe. The main sharpening tool used by these authors is the unsharp mask, which works by creating a sharpening halo. With that method, a halo is necessary to have a sharpening effect: no halo, no sharpening. They do discuss the limitations of the unsharp mask (page 132) and briefly cover sharpening using the high pass filter on a layer with the overlay blending mode and also smart sharpen (which is a form of deconvolution sharpening).

Their recommendations for use of the blend if sliders, surface masks and edge masks can be used with other forms of sharpening. Deconvolution methods such as Richardson-Lucy (RL) are attractive, since they actually restore image detail rather than creating the appearance of sharpness. Manuel's method adds another tool to our sharpening tool box and I think that we should learn how to use it rather than dismiss it on some theoretical grounds taken out of context.

I wasn't dismissing anything, but looking for an explanation of why this new method is claimed to be "better" and "ideal." Extraordinary claims require extraordinary proof.

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2005
    • http://www.guillermoluijk.com
Re: Halo-free sharpening algorithm
« Reply #8 on: October 22, 2010, 02:21:54 pm »

How is it "better" or "ideal"?

Fraser and Schewe's book is widely considered the reference to sharpening, but what you claim seems to be against its teachings.

I wasn't dismissing anything, but looking for an explanation of why this new method is claimed to be "better" and "ideal." Extraordinary claims require extraordinary proof.

IMO it is more convenient to eradicate the origin of a flaw (what Manuel's method tries to achieve), than to fix a flaw with another flaw (the unsharp mask approach). That is why I said better, at least conceptually speaking of course.

On the other hand I never said his method is ideal, I meant his method's goal is to achieve the ideal contrast profile, the one you would have obtained with ideal zero-blurred source data (see Sean's pictures).

If you are interested in more explanations you can email Manuel. I posted his article because I found it very interesting and the results promising, just to encourage forum members to provide positive feedback or even make improvements (the source code is available).

Regards
« Last Edit: October 22, 2010, 07:38:47 pm by Guillermo Luijk »
Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Halo-free sharpening algorithm
« Reply #9 on: October 22, 2010, 03:12:16 pm »

IMO it is more convenient to erradicate the origin of a flaw (what Manuel's method tries to achieve), than to fix a flaw with another flaw (the unsharp mask approach). That is why I said better, at least conceptually speaking of course.

Indeed, most of the Faser/Schewe book deals with how to avoid halo, or reduce it's size so it won't show easily. The only conceivable merrit in narrow radius halo is to precompensate for losses that will manifest themselves later on in the workflow, i.e. in print.

Quote
On the other hand I never said his method is ideal, I meant his method's goal is to achieve the ideal contrast profile, the one you would have obtained with ideal zero-blurred source data (see Sean's pictures).

What's nice is that it's locally adaptive, it adjusts to the level of local detail. Whether it's close to the unblurred detail is uncertain, but it does look better than with either halo or blur.

Quote
I posted his article because I found it very interesting and the results promising, just to encourage forum members to provide positive feedback or even make improvements (the source code is available).

Thanks for sharing. It's always interesting to venture beyond the trodden path.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

sniper

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 670
Re: Halo-free sharpening algorithm
« Reply #10 on: October 26, 2010, 07:14:51 pm »

As interesting as this is how does one apply it in the real world?
Logged

George Machen

  • Newbie
  • *
  • Offline Offline
  • Posts: 14
Re: Halo-free sharpening algorithm
« Reply #11 on: October 26, 2010, 11:58:46 pm »

In the Manuel Llorens section, "A brief des­crip­tion of the algo­rithm," after staring at the charts & description of what the procedure basically is doing, my first impression was that it more or less is increasing contrast about edges. So I played around a little to see what I could see:

- Opened an image in Photoshop.
- Duped the layer in Luminosity blending mode.
- Increased contrast heavily with Curves (just a quick & dirty dragging the endpoints inward).
- Added a layer mask to which I Applied Image, inverted, a Find Edges of the original image.
- Still on the layer mask, tried a Minimum to "choke" the selection, but didn't like the blocky result, so instead loaded the mask as a selection and did a Select > Modify > Contract > 1 pixel, inverted the selection, and deleted.
- (Usually I blur layer masks, but doing so of course produced USM-like halos in the final image, defeating the purpose, so I aborted — but that's OK; there already was enough smoothness in the mask, anyway.... Hey, isn't the USM overshoot in Manuel's graph just the Gaussian Blur component of USM in the first place?)

So I ended up with a subtly-sharper-appearing image — not as much as with the Manuel Llorens algorithm, but I think my results were weaker at least partially because I didn't also include "correc­tions for cor­ners, dia­go­nals and some other cases."

I need to know in simple language what Manuel's manipulation does that my crude little exercise doesn't. My only point is that altering each pixel within a gradient at an edge such that the "pixel value will become more simi­lar to the adja­cent pixel with the lower gra­dient" just sounded to me a whole lot like increasing targeted contrast. In other words, what I'm missing is how, in the words of Guillermo's opening paragraph, "eliminating the soft gradient zone between two sides of differentiated brightness" is any different from "[increasing] accutance by enhancing local contrast in the edges." I can't make a distinction in my mind, and that's what's tripping me up.


Memo: USM also shares the undesired property in the Manuel Llorens procedure of sharpening already-strong edges more than soft edges, the reasons for which in USM are discussed in Bruce Fraser's sharpening book.
« Last Edit: October 27, 2010, 12:02:34 am by George Machen »
Logged

BernardLanguillier

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 13983
    • http://www.flickr.com/photos/bernardlanguillier/sets/
Re: Halo-free sharpening algorithm
« Reply #12 on: October 27, 2010, 06:34:48 am »

I need to know in simple language what Manuel's manipulation does that my crude little exercise doesn't. My only point is that altering each pixel within a gradient at an edge such that the "pixel value will become more simi­lar to the adja­cent pixel with the lower gra­dient" just sounded to me a whole lot like increasing targeted contrast. In other words, what I'm missing is how, in the words of Guillermo's opening paragraph, "eliminating the soft gradient zone between two sides of differentiated brightness" is any different from "[increasing] accutance by enhancing local contrast in the edges." I can't make a distinction in my mind, and that's what's tripping me up.

I guess that it is indeed a form of local contrast enhancement, but tuned with a mask so as to make sure that no overshoot affects the light/dark pixels on both sides of the transition zone.

It could be difficult to come up with an algo able to deal with all situations since one pixel will typically belong to several gradients depending on direction and spatial frequency. Distinguishing small scale noise from actual micro edges occuring in textured areas might be just as hard with this technique as it is with more traditional approaches.

Does someone know whether this technique is similar to the one used by Topaz in the sharpening plug-in?

Cheers,
Bernard
« Last Edit: October 27, 2010, 06:37:08 am by BernardLanguillier »
Logged

Jack Flesher

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2592
    • www.getdpi.com
Re: Halo-free sharpening algorithm
« Reply #13 on: October 27, 2010, 09:57:43 am »

Shoot with medium format digital, and you don't need to worry much about how you implement downstream sharpening at all if your original capture is good and you don't overdo it -- speaking only as a practical matter for normal print output of course.  As for the theory behind sharpening, it is an interesting discussion...
« Last Edit: October 27, 2010, 09:59:37 am by Jack Flesher »
Logged
Jack
[url=http://forum.getdpi.com/forum/

hjulenissen

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2051
Re: Halo-free sharpening algorithm
« Reply #14 on: October 27, 2010, 10:38:28 am »

Shoot with medium format digital, and you don't need to worry much about how you implement downstream sharpening at all if your original capture is good and you don't overdo it -- speaking only as a practical matter for normal print output of course.  As for the theory behind sharpening, it is an interesting discussion...
Do you mean shoot without OLPF?

-h
Logged

Jack Flesher

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2592
    • www.getdpi.com
Re: Halo-free sharpening algorithm
« Reply #15 on: October 27, 2010, 02:12:13 pm »

Do you mean shoot without OLPF?

-h

No OLPF/AA is a certainly a significant part of the equation, then simply having a whole bunch of native, clean pixels available to lay down on the print is the other.
« Last Edit: October 27, 2010, 02:15:35 pm by Jack Flesher »
Logged
Jack
[url=http://forum.getdpi.com/forum/

hjulenissen

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2051
Re: Halo-free sharpening algorithm
« Reply #16 on: October 27, 2010, 03:36:20 pm »

No OLPF/AA is a certainly a significant part of the equation, then simply having a whole bunch of native, clean pixels available to lay down on the print is the other.
I have no experience with MF, but the measurements on dxo does not seem to support that MF in general is that much "cleaner" than FF or even crop per pixel?
http://www.dxomark.com/index.php/en/Camera-Sensor/Compare-sensors/(appareil1)/668%7C0/(appareil2)/483%7C0/(appareil3)/619%7C0/(onglet)/0/(brand)/Pentax/(brand2)/Canon/(brand3)/Canon

OLPF, on the other hand, does have a significant effect - with positive and negative consequences:
http://www.maxmax.com/nikon_d200hr.htm


-h
« Last Edit: October 27, 2010, 03:44:25 pm by hjulenissen »
Logged

Jack Flesher

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2592
    • www.getdpi.com
Re: Halo-free sharpening algorithm
« Reply #17 on: October 27, 2010, 06:42:14 pm »

I have no experience with MF,

Maybe some day you'll make time for it, and then can decide for yourself.

 :)

Cheers,
« Last Edit: October 27, 2010, 06:53:15 pm by Jack Flesher »
Logged
Jack
[url=http://forum.getdpi.com/forum/

stephenmarsh

  • Newbie
  • *
  • Offline Offline
  • Posts: 18
Re: Halo-free sharpening algorithm
« Reply #18 on: October 27, 2010, 08:43:02 pm »

Guillermo, thanks for the heads up!

It would appear that a new "in progress" open source raw/raster image editor is using the capture sharpening method that you linked to:

http://photivo.org


Sincerely,

Stephen Marsh

http://binaryfx.customer.netspace.net.au/ (coming soon!)
http://members.ozemail.com.au/~binaryfx/
http://prepression.blogspot.com/
Logged

hjulenissen

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2051
Re: Halo-free sharpening algorithm
« Reply #19 on: October 28, 2010, 02:37:00 am »

Maybe some day you'll make time for it, and then can decide for yourself.

 :)

Cheers,
I have the time, but for now I havent seen results that make it worth the investement (for me).

-h
Logged
Pages: [1] 2   Go Up