- AKP's Newsletter
- Posts
- Unsharp Masking(USM)
Unsharp Masking(USM)
Unsharp Masking(USM)
Easy:
Imagine you have a picture you drew, but some parts of it look a bit blurry, and you want to make those parts stand out more, like the lines of a tree or the edges of a house.
Unsharp Masking is like a magic trick to make your picture look sharper and clearer. Here’s how it works, step by step, like a recipe:
Copy and Blur: First, we make a copy of your drawing but make this copy blurry on purpose, like looking at it through a foggy window. This blurry copy doesn’t have the sharp lines and details anymore.
Find the Hidden Details: Next, we compare your original drawing with the blurry one to find all the special details and lines that got lost in the blur. It’s like we’re looking for hidden treasures that the foggy window hid from us.
Bring the Details Back: After we find those hidden treasures, we add them back to your original drawing. This makes the lines and details stand out more, making everything look sharper and clearer.
Control the Magic: We have a magic control that lets us decide how much sharper we want to make the drawing. If we turn it up too high, the drawing might look a bit strange, but just the right amount can make it look perfect.
So, Unsharp Masking is like a special art trick that helps make your drawings look their best by finding and highlighting all the cool details you put into them!
Another Easy Example:
Unsharp masking is a magic trick for pictures! Imagine you have a picture that isn’t very clear, and you want to make it look sharper, like the pictures in a shiny magazine. Here’s how we do it:
Smoothing: First, we make the picture a little blurry, like looking through a foggy window. This helps us see the big picture without all the tiny details.
Comparing: Next, we compare the blurry picture with the original one. The places where the two look very different are the edges and tiny details we want to make stand out.
Making bolder: Now, we take just the differences and make them much stronger, like turning up the brightness of those details.
Fixing: Sometimes, we go a little too strong, so we make sure everything looks nice and natural by not letting the changes be too extreme.
Putting it back together: Finally, we put the original picture and the stronger details back together, and voila! The picture now looks much sharper and clearer, like it has been given a magic boost!
We use this trick in computer programs to make old or blurry pictures look better, but it’s important not to overdo it, or the picture might start to look fake or too edgy.
Moderate:
Unsharp masking is a technique used in digital image processing to make images appear sharper and more detailed. It works by creating a special kind of “mask” that highlights the differences between the original image and a blurred version of the same image. This mask makes the contrast in the fine details of the image more noticeable, which gives the impression of increased sharpness.
To create the unsharp mask, a blurred version of the original image is first made using a Gaussian blur filter. Then, the blurred image is subtracted from the original image, which leaves behind an “unsharp mask” that highlights the differences between the two. This mask is then adjusted to control the intensity and size of the sharpening effect.
Unsharp masking is a popular technique because it can improve the overall sharpness of digital images, and it can also restore sharpness in scanned images and optimize images for printing or digital display. It is often used by photographers, designers, and anyone else who works with digital images.
The unsharp masking technique involves several steps, including image acquisition and preprocessing, creating a blurred version of the image, subtracting the blurred image from the original, adjusting the sharpening effect, and applying the unsharp mask to the image. By following these steps, you can enhance the sharpness and details of your digital images.
There are three main parameters that can be adjusted when using unsharp masking: amount, radius, and threshold. The amount parameter controls the intensity of the sharpening effect, the radius parameter determines the size of the details affected by the sharpening, and the threshold parameter determines the minimum difference between the original and blurred images that will be sharpened. These parameters can be adjusted to achieve the desired sharpening effect.
In summary, unsharp masking is a technique used in digital image processing to enhance the perceived sharpness and clarity of images. It works by creating a mask based on the differences between the original image and a blurred version of the same image, which highlights the fine details and contrast of the image. This technique can be a valuable support for photographers, designers, and anyone involved in digital image processing.
Hard:
Unsharp masking (USM) is a technique used in image editing software to sharpen images. Despite the confusing name, unsharp masking actually increases the sharpness of an image.
Here’s how it works:
Create a Blurred Version: A blurred copy of the original image is created. This blur reduces the high-frequency details that contribute to the perception of sharpness.
Identify Areas of Difference: The blurred version is then subtracted from the original image. This process highlights the areas with sharp edges or high-frequency details because those areas will have the most difference between the original and the blurred version.
Enhance the Sharpened Areas: The difference image (essentially an outline of the sharp edges) is then scaled up (increased in intensity) to emphasize the sharpened areas.
Recombine the Images: The scaled difference image is added back to the original image. This enhances the contrast along the edges, making the image appear sharper.
Unsharp masking is a powerful tool for improving the visual clarity of images, but it’s important to use it judiciously. Overusing unsharp masking can create halos around edges or make noise in the image more apparent.
Unsharp masking is an image sharpening technique that enhances the edges and details of an image, making it appear clearer and more defined. The name “unsharp masking” comes from the fact that the technique uses a blurred, or “unsharp”, negative image to create a mask of the original image. This unsharp mask is then combined with the original positive image, creating an image that is less blurry than the original.
The technique was first used in darkroom photography, where a large-format glass plate negative was contact-copied onto a low-contrast film or plate to create a positive image. The positive copy was made with the copy material in contact with the back of the original, rather than emulsion-to-emulsion, so it was blurred. After processing, this blurred positive was replaced in contact with the back of the original negative. When light was passed through both negative and in-register positive, the positive partially cancelled some of the information in the negative, only the low-frequency (blurred) information was cancelled, and the mask effectively reduced the dynamic range of the original negative. This resulted in an enlarged image with increased acutance, or edge contrast, without loss of highlight or shadow detail.
In digital image processing, unsharp masking works by subtracting a blurred form of an image from the original image itself to create an “edge” image which is then used to improve the acuity of the original image. This is done by amplifying the high-frequency components of the image, which correspond to the edges and details.
The unsharp masking process can be controlled by adjusting the amount, radius and threshold. The amount controls the magnitude of the sharpening effect, the radius affects the size of the edges to be enhanced, and the threshold controls the minimum brightness change that will be sharpened. By adjusting these parameters, the user can control the degree of sharpening and the details that are enhanced.
Unsharp masking is a powerful technique for increasing the sharpness and detail of an image, but it should be used with care, as over-sharpening can create halos and other unwanted artifacts. It is also important to note that unsharp masking cannot create new details, but only enhances the existing ones.
The key parameters in Unsharp Masking are:
Amount: Controls how much of the calculated detail gets added back to the original image. Increasing this value makes the image appear sharper.
Radius: Determines the size of the edges to be enhanced. A larger radius affects wider edges, while a smaller radius affects finer details.
Threshold: Sets the minimum brightness change that will be considered as an edge or detail. Higher values prevent noise from being amplified in the sharpening process.
Unsharp Masking is a powerful tool for enhancing image clarity, but it requires careful adjustment of its parameters to avoid introducing artifacts such as halos around edges or amplifying noise. It’s a staple feature in many image editing software packages, including Adobe Photoshop, GIMP, and Lightroom.
Here are some additional points to consider:
Unsharp masking doesn’t add new detail to the image, it just enhances the perception of existing detail.
This technique was originally used in darkroom photography but is now a common feature in digital photo editing software.
A few books on deep learning that I am reading: