MegaSharp

MegaSharp is MegaVision’s unsharp masking routine and it works better than Photoshop’s. MegaSharp allows the identification of a line in the scene and it allows lab space luminance sharpening of the line and no sharpening of reflectances that are not lines. MegaSharp even allows blurring of reflectances that are not identified as lines. And MegaSharp can be applied in RGB; it automatically takes the file to a luminance channel in a lab space, applies the defined sharpening and returns the file to RGB.

MegaSharp has 4 definable dialog boxes, Blur Threshold, Sharpen Threshold, Sharpening Amount, and Kernel. MegaSharp includes the following readme instructions about the settings that will illuminate its workings.

Kernel Size: Kernel Size affects the width of the lines that enhance edges. When you apply USM, you will notice that a sharp edge in the image becomes sharper. The sharpness comes from increasing the contrast along an edge. An edge is characterized (in the luminance channel) by one side of the edge being dark and one side of the edge being light. Increasing the contrast along an edge makes the dark side of the edge darker and the light side of the edge lighter. Thus you will see a dark line along the dark side of the edge and a light line along the light side of the edge. Increasing the Kernel Size increases the width of both the light and dark lines along an edge. You generally only want these lines to be about a pixel wide each. The difference from 0 to 10 makes about a pixel width in total difference.

Amount: Amount affects how dark and how light are the edge contrast lines discussed above. As the Amount is increased, the dark lines get darker and the light lines get lighter. You can see then, that Kernel Size affects the width of the lines and Amount affects the intensity of the edge contrast lines. The Amount can be set very low so that almost no effect is produced or very high so that dark lines are very dark and light lines are very light. A setting of 200-400% is normal.

Sharpening Threshold: MegaSharp evaluates the raw image and calculates the sharpness, or hardness, of all edges in the image. A hard edge is where the image (in the luminance channel) transitions over a short distance from very light to very dark. A short transition distance and a large density difference between the light side of an edge and the dark side of an edge both contribute to the hardness of the edge. MegaSharp evaluates the hardness of the edge and, if the edge is not a very hard edge, MegaSharp will not sharpen it. The Sharpening Threshold determines how hard the edge must be in order for it to be sharpened. The higher you set the Sharpening Threshold, the harder must be the edge in order that it gets sharpened. If you apply a very high gain with no Sharpening Threshold, you may have lots of “speckles”, or "noise" in your image. This happens because in the raw image there are random variations in the pixels from pixel to pixel which look to the software like very short edges. You can reduce the noise by setting a Sharpening Threshold. The higher the threshold, the more you reduce the noise. However, if you set the sharpening threshold too high, edges that you want to sharpen will not get sharpened. Settings between 5 and 20 are normal, though you may go from 0 to 100 or more for special conditions.

Blur Threshold: As described above, MegaSharp evaluates the image and calculates the hardness of all edges. If an edge is not very hard, you can actually make it even less hard by blurring it. This is useful to further reduce the noise in a picture. The Blur Threshold works much like the sharpening threshold. If you make it too high, you can actually blur edges that you want to sharpen. The Blur Threshold should generally be set to 0, and cannot exceed the Sharpening Threshold.

You might try the following settings:

Blur Threshold
0
Sharpening Threshold
15
Amount
350 %
Kernel Size
5

Generally, the settings should be in the following ranges:

Blur Threshold
0-10
Sharpening Threshold
5-20
Amount
200-400 %
Kernel Size
3-8

Table of Contents