Announcement

Collapse
No announcement yet.

Notes on Sharpening

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Notes on Sharpening

    Dear All,
    I signed in to the forum long time ago but I admit I'm no frequent poster... I was first very impressed and appealed by the tutorials made by byRo about sharpening, and I come back here from time to time to check for new inputs.

    Now, it happens I've written an article about sharpening: which may not be intended as a tutorial tout-court, even though it has all the walkthrough to duplicate the tecniques exposed; it may be better defined as a personal collection of notes about the subject and a bunch of different, esotic way to apply sharpening and solve common problems like: modulate and differentiate the effect of sharpening in edges and texture, the use of surface blur as a sharpening kernel, pyramid decomposition (gaussian, bilateral and mixed) as very efficient sharpening platform, etc.

    Friends say me it's a bit technical, but I guess they have been impressed by the terminology only (they feel "pyramid decomposition" is scary maybe? Spooky difference of gaussians? ;-)
    Anyway, I've put all my efforts to make it readable and every assumption can be verified within Photoshop. I'll be glad to hear your comments and suggestions about it: the website that gently hosts it, has made a comment section available for those who would like to give feedbacks (lot of visitors but few people that stops to say hello, I must really be scary :-) and I'll keep the thread checked here as well.
    The english version is there:

    Notes on Sharpening article


    Currently I'm developing some Photoshop CS4 panels that automatize and give an (I hope) nice neat GUI to some of the operation suggested - for those who don't know about it, with CS4 it's now possible via Flex/ExtendScript to make custom built and designed Flash "object" that are loaded in Photoshop as panels (just like Info Palette, Layers, Channels, Hystograms, etc). Somehow they will be made available there in the future, I guess.

    By the way, in doing that, I've now realized thad the sharpening equalizer byRo proposed years ago is made by DoG (Difference of Gaussians) layers. The concept behind it is different but similar to the one I've suggested with pyramid decomposition, it could be interesting to implement a true decomposition made by DoG. The todo list increases worryingly ;-)

    Anyway, many thanks for your attention and kind regards,

    Davide Barranca
    Bologna, Italy

  • #2
    Re: Notes on Sharpening

    Great read... but not for everyone...

    I too have a quest for perfect sharpening. I came up with a perfect combo a while back involving somewhere around 14 layers, all in one action. It creates a very "fine" sharpen, perfect for skin and hair.

    I am def going to make some of what I learned in the article part of my arsenal.

    Thanks,
    -Keven

    Comment


    • #3
      Re: Notes on Sharpening

      You lost me at weighted least square...But I'm quite pleased I was able to follow to there.

      Care to share what "weighted least square" does in laymens terms...I followed a few links but all I got was formulas, and my brain don't handle them very well!
      .
      .
      .I'm curious what potential lays behind this mysterious door.

      Comment


      • #4
        Re: Notes on Sharpening

        Hi neumanns,
        think of weighted least square as "a better surface blur filter"!
        I've read the math behind it and I won't tell you I've really understood it, but, if you get a look to their video here or here (smaller) you'll see a pyramid decomposition using WLS in action. I'm showing in my article how to build a Gaussian and a Bilateral one - if Adobe would implement that WLS in photoshop...
        Pyramid decomposition simply let you tweak the contrast in (as many as you want) different frequency ranges, depending on the levels of the decomposition - so, if you will, high frequency (finer detail, such as hair), mid frequency and low frequency (more broad transition, such cheeks in portrait, something that doesn't change too quickly). Different kernels (gaussian, bilateral, WLS) lead to different look - gaussian produces halos, WLS is halo-free, etc.
        Glad you've enjoyed it anyway!
        Ciao,

        Davide

        Comment


        • #5
          Re: Notes on Sharpening

          Originally posted by igot2pman View Post
          I came up with a perfect combo a while back involving somewhere around 14 layers, all in one action.
          Thanks Keven,
          but now that you have appealed us, you must share your thoughts as well
          Kind regards,
          Davide

          Comment


          • #6
            Re: Notes on Sharpening

            I recounted the layers, and its 11...

            Spent like 3 days strait tuning it. its now basically perfect in that it sharpens with basically no lighten or darken and no halo's. The picture below has only been sharpened.

            I normally don’t even show a screen shoot of it. But as you asked, here it is. I don’t think i am willing to share how it’s done, as around here sometimes people just take... if you know what i mean. Or don't even say thank you...

            But its 5 different methods into one.

            -Keven
            Attached Files
            Last edited by igot2pman; 02-11-2009, 02:58 PM.

            Comment


            • #7
              Re: Notes on Sharpening

              A while ago i decided I wanted a better understanding of how photoshop was doing it's magic. While I still don't fully understand what is going on behind the scene understanding the concepts even if only at a conceptual level has helped me improve my usage of the program.

              I'm not even gonna pretend I know how they filter the frequencys in the samples they use in the video...But it sounds very interesting to say the least.

              Anybody that has spent much time learning sharpening has also learned how to combat the dreaded halo. The "weighted least square" filter does seem interesting if for no other reason than why combat halos when you can avoid them in the first place.

              Thank you for sharing your information and studies so openly...I admire people who do that. Most people seem to want to keep there knowledge to themselves or try and sell it for a buck.

              I am gonna have to look into this deeper at a latter time...thanks for sharing.

              Comment


              • #8
                Re: Notes on Sharpening

                There is no quick and easy answer to the question: what is weighted least squares?

                Ordinary Least Squares (OLS) is the basic linear regression model. The idea is predicting change in some variable (y) using one or more independent variables (x's).

                OLS has certain assumptions for unbiased and efficient estimates. These are called the Gauss-Markov assumptions.

                Weighted Least Squares (WLS) is employed for a couple of violations of the Gauss-Markov assumptions. One is called homoskedasticity. The other is independence of error terms and the independent variables (the x's).

                Linear regression assumes that every data point provides equally precise information. Digital imaging involves noise, which challenges the Gauss Markov assumption that observations are measured without error.

                Without reading article here, my surmise this is the use of WLS being referenced.

                Cheers,

                Mitch

                Comment


                • #9
                  Re: Notes on Sharpening

                  Originally posted by igot2pman View Post
                  I normally don’t even show a screen shoot of it. But as you asked, here it is. I don’t think i am willing to share how it’s done, as around here sometimes people just take... if you know what i mean. Or don't even say thank you...
                  Dear Keven,
                  I can understand that you are jealous of your work (very remarkable indeed!) For instance, I've freely written about all the techniques - also because I really believe in sharing as a form of knowledge growing: in my article I ask for comments but also for suggestions about how to improove the theoretical aspects. On the other hand, I hope to get some small revenues (with the panels and the scripts) to cover the time spent in writing - since my family keeps having that strange habit of eat two or three times a day (all the days of the week).

                  Somehow, I guess the theory should be available for everyone, while its application is something you've got to be rewarded for.
                  Anyway, thanks for showing your routine - while the layerset is a bit cryptic, the result seems very good.
                  Kind regards,
                  Davide

                  Comment


                  • #10
                    Re: Notes on Sharpening

                    Davide,

                    I agree the theory should be available to everyone and it is. I learned everything there from RTP and just put it all together.

                    Nothing cryptic. They are named what they do, not how you do them. If i could sell them, and make scripts, I would. But in all reality, not many would pay much.

                    I will tell you this, the "KA - Basic sh" is basically the Manuel Libres Librodo Jr. sharpen.

                    If anything, your method is not only more technical, its more difficult.

                    -Keven

                    Comment


                    • #11
                      Re: Notes on Sharpening

                      I read the article. I understand the principle.

                      Unfortunately, there was a lot more on theory than on how to accomplish the results. I only actually saw one clear "how to," and it is incomplete. It doesn't actually say how to blend the channels to the layers to complete the effect.

                      A step by step "how to" in this thread would be nice. I'd like to try the technique, but I don't know all the steps. I think a lot of people reading the article will make more sense of it if they can walk through the technique and see what it does, how it works, etc. with their own eyes. All those equations are useless unless you are into the mathematical theory behind the technique and its methodology.

                      Comment


                      • #12
                        Re: Notes on Sharpening

                        AFrazier,

                        I feel the same way... but what i assumed was after you did the calculation, you get a grey layer that sort of looks like a high pass layer, you could then set the grey layer to soft light or overlay. Then, adjust the opacity.

                        hope it helps,
                        -Keven

                        Comment


                        • #13
                          Re: Notes on Sharpening

                          That's the closest I've been able to come to applying this version of sharpening. I did the blur, did the calculation, then selected the new alpha channel, copied it from the main screen, pasted it, and converted the blending mode.
                          In short, the only way I was able to make it work was so similar to a high pass sharpen, I don't see the need for all that extra effort.
                          If, however, this provides for the "pyramid" mentioned, where multiple levels of sharpening can be had, then it might be worth the effort.

                          I just need a precise "how to" so I can see if it is worth my while.

                          I read a few articles on the subject. They are all much like this article. In fact, the equations are even worse. If you aren't proficient in calculus, you might as well skip the read. All any of these articles talk about is the theory behind the method. None of them amply describe the method itself.

                          Comment


                          • #14
                            Re: Notes on Sharpening

                            Originally posted by AFrazier View Post
                            In short, the only way I was able to make it work was so similar to a high pass sharpen, I don't see the need for all that extra effort.
                            Dear Alex,
                            I'm sorry if you and others weren't able to walk through all the examples. I did an extensive use of abbreviations and my main intent was to make everything more fluid - maybe I got the opposite effect.

                            I guess you missed "LL2" or "LL1", which stand for: do a further blending mode in LinearLight; I first suggested 2 different way of doing that, but now it's clear that the correct way to get the layer is to subtract with Offset=128 and Scale=2, and then blend the result (the HighPass-like layer) in LinearLight 100% opacity: this is what I call LL2.

                            LinearLight is not something that you should substitute with Overlay (for instance), because it's only with LL that the blurred original + the HighPass-like layer that you get back the original - something we must get in order to have later on a correct pyramidal decomposition.

                            Let me try to help you reading it from the beginning: you're right, the result of a single ORIG-BLUR subtraction is HighPass (LL1, while LL2 it's half the effect but you can forget this now). That's something I had to show first because it is the base of all the theory that follows - and I had to suggest LL2. Obviously the story doesn't end here.

                            The second step is Difference of Gaussian (DoG): a subtraction between two differently gaussian blurred versions of the original - an intermediate step off the track of traditional sharpening. I've to dig deeper in DoG, but it's something I wanted to show because it's really promising. Next, we start to enter the real play.

                            The third step is to use a different blurring kernel, for instance Surface blur. Instead of ORIG - GB (that is: HighPass) here the result of the subtraction (ORIG - SB) is *not at all* HighPass, it's something different and you have no way to get that HighPass-like layer but performing the subtraction. Using SB instead of GB keeps edges alone and affects mainly texture. Again, you've to put the layer LinearLight blending mode.

                            Fourth step is to combine GB and SB, and get a HighPass-like layer (again, something you couldn't get but with the subtraction) that enhances edges alone, and doesn't affect textures.

                            By now I've showed how to get a tool, an "HighPass-like" layer (to be blended in LinearLight 100% opacity), to boost either edges alone and textures alone. It's a edges OR texture tool, to combine them we've to go ahead.

                            Then, with pyramid decomposition, as you correctly got, the goal is to use GB, or SB, to have a 3 level (or more) simultaneous sharpening equalizer. It's different from give a picture 3 or more rounds of sharpening with different radii - and that's the why pyramidal decomposition is so interesting.

                            Finally, recalling that we were able to find a way to direct the sharpening to edges alone od texture alone, I suggest a "mixed" pyramid: it's like a 2 sliders tool/equalizer for sharpening separately texture AND edges.

                            In doing this I've showed the final Layers and Channels palettes, to help the reader to replicate everything. In all the big pictures, in the caption, I show the radii used to get precisely that effect (DoG, pyramids, etc.)

                            If you think I should add something more (final or intermediate screenshots, or something else), please suggest me precisely what to add in your opinion and where, in order to increase the usability of the article, and I'll be glad to add it - that's part of the work-in-progress.
                            Thanks for the feedback and kind regards,

                            Davide

                            Comment


                            • #15
                              Re: Notes on Sharpening

                              Okay, I got the concept with the Linear Light. In fact, I tried it. The problem I ran into (because your explanations aren't quite clear enough) was that I couldn't figure out how to maintain the Difference layer while blending in Linear Light. If you try to copy the layer, changing the Blending mode just changes the Blending mode. You can paste a copy of the Alpha channel onto the layers pallette, but it only emphasized edges so long as the image is in Difference Blend mode.
                              The blur I got. The edges I got. Combining the Calculations result for a Hi Pass-like effect I managed. But it's just not clear how multiple layers are to be built, used, and blended, except to say the Blend mode should be Linear Light in an otherwise non-descript fashion.

                              In other words, a "step 1 - Create a Duplicate Layer," "step 2 - Change the Blend mode of the Duplicate Layer to Difference," and so on.

                              We need a step by step. Forget the theory. It's too muddled. Just tell us how to do it. We'll understand the theory better when we can see how it functions with our own eyes.

                              Comment

                              Loading...
                              Working...
                              X