SWEngineer
12-18-2004, 11:39 AM
Sketchy thoughts:
How does the standard (decolor), copy, invert, GaussianBlur in ColorDodge mode really work? The best explanation I've seen comes from this tutorial. (www.shanzcan.com/photoshop/mschar1v4.pdf) I have an alternate perspective to share, one that I think opens up some new ideas for sketch effects. (My perspective arose via these excellent tutorials from byRo: tut1 tut2 ) Rather than think of GaussianBlur as dispersing pixels, think of it as subtracting the high frequency (fine detail) from the original image. The lower the radius, the less detail removed. With the details removed, they no longer "mask" (dodge to white) themselves in the layered image, allowing them to show through.
Thus you should be able to (and do) get a very similar result this way: Create a layer filled with white below the image. Set the image layer mode to LinearLight. Now run the Other->HighPass filter on the image layer and adjust the radius to get the result you want. in some ways, this may be a superior method. In my test example, image elements appear more uniformly with changing radius. (I speculate this arises from subtleties in the math / algorithms in the Photoshop engine.) Try it yourself. The example image comes from this thread and has a nice mix of "frequencies" to illustrate my point. (I hope sdubose99 doesn't mind my using it here.)
Now that we recognize the invert / color dodge trick as simply extracting the high frequency information, we can bend it more to our will. For example, if you have a noisy or very busy picture, you likely don't really want the highest frequency elements captured in the "sketch". To prevent this, first apply a suitable Gaussian Blur to your image before doing the sketch treatment. (you can use Median, SmartBlur, etc, instead but the mathematical yin-yang relationship that exists between Gaussian Blur and High Pass no longer holds up. Not that this matters, the goal is a pleasing image, not elegant math.)
We can now be selective about the "frequency" content we expose other useful sketch filters too. Such filters include PosterEdges, InkOutlines, SmartBlur-EdgeOnly, FindEges, TraceContour, GlowingEdges, Photocopy, & TornEdges (one of my favorites). In fact, you can combine different treatments on different portions of the frequency spectrum. To give you some ideas, see the attachments. Note that I did NOT try to pick useful frequency ranges, just an arbitrary selection of high, medium, & low. Judicious choice of frequencies and filter settings should give a wide variety of good outcomes. My examples, being arbitrary, likely represent not-so-good outcomes. But, I think they illustrate the point.
-Mark
Attachments:
1) Comparison of HighPass vs ColorDodge method.
2) TornEdges filter variations (Applied to the right frequency range & with careful selection of filter parameters, this gives a really good broken line, multi-shade of gray outline type sketch.)
3) Composite Sketches (using the color image - no desaturation)
Bottom Layer: GBlur 4, InkOutlines 26/0/21
Middle Layer: HighPass4, GBlur 2, TornEdges 24/11/10, Darken mode, 41% Opacity
Top Layer: HighPass 2, FindEdges, LinearLight, 19% Opacity
How does the standard (decolor), copy, invert, GaussianBlur in ColorDodge mode really work? The best explanation I've seen comes from this tutorial. (www.shanzcan.com/photoshop/mschar1v4.pdf) I have an alternate perspective to share, one that I think opens up some new ideas for sketch effects. (My perspective arose via these excellent tutorials from byRo: tut1 tut2 ) Rather than think of GaussianBlur as dispersing pixels, think of it as subtracting the high frequency (fine detail) from the original image. The lower the radius, the less detail removed. With the details removed, they no longer "mask" (dodge to white) themselves in the layered image, allowing them to show through.
Thus you should be able to (and do) get a very similar result this way: Create a layer filled with white below the image. Set the image layer mode to LinearLight. Now run the Other->HighPass filter on the image layer and adjust the radius to get the result you want. in some ways, this may be a superior method. In my test example, image elements appear more uniformly with changing radius. (I speculate this arises from subtleties in the math / algorithms in the Photoshop engine.) Try it yourself. The example image comes from this thread and has a nice mix of "frequencies" to illustrate my point. (I hope sdubose99 doesn't mind my using it here.)
Now that we recognize the invert / color dodge trick as simply extracting the high frequency information, we can bend it more to our will. For example, if you have a noisy or very busy picture, you likely don't really want the highest frequency elements captured in the "sketch". To prevent this, first apply a suitable Gaussian Blur to your image before doing the sketch treatment. (you can use Median, SmartBlur, etc, instead but the mathematical yin-yang relationship that exists between Gaussian Blur and High Pass no longer holds up. Not that this matters, the goal is a pleasing image, not elegant math.)
We can now be selective about the "frequency" content we expose other useful sketch filters too. Such filters include PosterEdges, InkOutlines, SmartBlur-EdgeOnly, FindEges, TraceContour, GlowingEdges, Photocopy, & TornEdges (one of my favorites). In fact, you can combine different treatments on different portions of the frequency spectrum. To give you some ideas, see the attachments. Note that I did NOT try to pick useful frequency ranges, just an arbitrary selection of high, medium, & low. Judicious choice of frequencies and filter settings should give a wide variety of good outcomes. My examples, being arbitrary, likely represent not-so-good outcomes. But, I think they illustrate the point.
-Mark
Attachments:
1) Comparison of HighPass vs ColorDodge method.
2) TornEdges filter variations (Applied to the right frequency range & with careful selection of filter parameters, this gives a really good broken line, multi-shade of gray outline type sketch.)
3) Composite Sketches (using the color image - no desaturation)
Bottom Layer: GBlur 4, InkOutlines 26/0/21
Middle Layer: HighPass4, GBlur 2, TornEdges 24/11/10, Darken mode, 41% Opacity
Top Layer: HighPass 2, FindEdges, LinearLight, 19% Opacity