|
Script-fu unfortuantely has no preview... But you can test it with a small image and see whats happening behind the curtain.
The script takes a layer. It copies it twice and inserts them right above the original layer. Now it copies the layer again and finds edges with 'plug-in-egde' and uses
"Edges: Detect Amount"
for finding edges. Now the contrast is streched, converted to grayscale and blurred with 'plug-in-gauss' and uses
"Edges: Blur Pixels"
for radius in gaussian blur. The value is equal to horizonal and vertical.
Now the script uses the grayscaled and blurred layer as a layer mask for the fist of the copied layers. The layer is unsharped masked with 'plug-in-unsharp-mask' and uses
"Edge Sharpen USM: Amount" "Edge Sharpen USM: Radius" "Edge Sharpen USM: Threshold"
as parameters for the unsharp masking. Because of the layer mask, gotten by finding the edges of the original layer, the sharpening will only affect the edges of the image. The sharpened layer with the layermask is copied. The mode of one of the sharpened layers is set to 'darken only' and uses the
"Edge Sharpen Darken USM: Opacity"
value. The mode of the copy of the sharpened layer is set to 'lighten only' and uses the
"Edge Sharpen Lighten USM: Opacity"
value. Thats for the edges. Now the same thing is done for the rest of the image, the texture. For that purpose, the layer mask is inverted. Now actions will NOT affect edges, but the other parts of the image. Again the same thing ('plug-in-unsharp-mask', copying, mode setting) is done with the inverted layer mask using the values above, but with "texture".
So in the end, you have: 4 layers, each with a layer mask: 2 layers with a blurred edge layer mask, one darken only, one lighten only. 2 layers with the inverted blurred edge layer mask, one darken only, one lighten only. That gives a nice sharpen image.
What parameters are recommended? It depends on your image. I think, you will have to test. Sharpening is: increasing the contrast between light and dark pixels by increasing the light of lighten pixels and darken the dark pixels. So on the border of light to dark a strong sharpening effect will lead to white pixels on the light side and black pixels on the dark side. Sorry, but I can't describe it better, my native language is german... The more edges are found, the sharper the image will be. So more "Edges: Detect Amount" will increase the amount of sharpened edges. More "Edges: Blur Pixels" will increase the sharpness effect left and right from the border of the edges. But be careful. The bigger the affected area, the more the image will look oversharpened. The other values affects the unsharp mask effect. The trick of the script is, that the edges and the texture of an image are sharpened seperately, while a simple unsharp mask affect the edges and the textures exactly the same way. My recommendations: do not oversharp. Keep the "Edges: Blur Pixels" small. Sharpen the edges more than the texture.
I hope, that helped.
|