Implementation of Generalized Unsharp Masking Algorithm for Digital Image IMPLEMENTATION of GENERALIZED UNSHARP MASKING ALGORITHM for DIGITAL IMAGE
Total Page:16
File Type:pdf, Size:1020Kb
Implementation Of Generalized Unsharp Masking Algorithm For Digital Image IMPLEMENTATION OF GENERALIZED UNSHARP MASKING ALGORITHM FOR DIGITAL IMAGE 1GANESH A. YELPALE, 2K.R.DESAI B.V.C.E,Kolhapur. Kolhapur, India. Abstract— Enhancement of contrast and sharpness of an imageis required in many applications. Unsharp masking is a classical tool for sharpness enhancement. We propose a generalized unsharp masking algorithm using the exploratory data model as a unified framework. The proposed algorithm is designed to address three issues: 1) simultaneously enhancing contrast and sharpness by means of individual treatment of the model component and the residual, 2) reducing the halo effect by means of an edge-preserving filter, and 3) solving the outof- range problem by means of log-ratio and tangent operations. We also present a study of the properties of the log-ratio operations and reveal a new connection between the Bregman divergence and the generalized linear systems. This connection not only provides a novel insight into the geometrical property of such systems, but also opens a new pathway for system development. We present a new system called the tangent system which is based upon a specific Bregman divergence. The proposed algorithm is able to significantly improve the contrast and sharpness of an image. In the proposed algorithm, the user can adjust the two parameters controlling the contrast and sharpness to produce the desired results. This makes the proposed algorithm practically useful. Keywords- Bregman divergence, generalized linear system, image enhancement, unsharp masking. I. INTRODUCTION algorithm is based upon the imaging model in which the observed image is formed by the product of scene Enhancement the sharpness and contrast of images reflectance and luminance. The task is to estimate the has many practical applications. There has been reflectance from the observation. Many algorithms continuous research into the development of new use the assumption that the luminance isspatially algorithms. We first briefly review previous works smooth. The illuminance is estimated by using a low- which are directly related to our work. These related pass filter or multi resolution or formulating the works include unsharp masking and its variants, estimating problem as a constrained optimization histogram equalization, retinex and dehazing problem [7]. To reduce the halo effect, edge- algorithms, and generalized linear systems. We then preserving filters such as: adaptive Gaussian filter [8], describe the motivation and contribution of this weighted least-squares based filters [9] and bilateral paper. filters [7], [10] are used. II. RELATED WORK III. CLASSICAL UNSHARP MASKING Sharpness and Contrast Enhancement: the signal A) Introduction contains i) details of the image, ii) noise, and iii) Proper sharpening is a bit like black magic. We can't overshoots and under-shoots in areas of sharp edges really sharpen an image any more than it already is. If due to the smoothing of edges. While the it wasn't sharp when captured, there's nowhere the enhancement of noise isclearly undesirable, the information needed can come from later on. What we enhancement of the under-shoot and over-shoot can do is create the illusion of sharpness by creates the visually unpleasant halo effect.Ideally, the exaggerating contrast along edges in the image. This algorithm should only enhance the image details. This added contrast makes the edges stand out more, requires that the filter is not sensitive to noise and making them appear sharper. Sharpening filters does not smooth sharp edges. These issues have been emphasize the edges in the image, or the differences studied by many researchers. For example, the cubic between adjacent light and dark sample points in an filter [1] and the edge-preserving filters [2] have been image. Unsharp masking (UM) is an image used to replace the linear low-pass filter. The former manipulation technique, often available in digital is less sensitive to noise and the latter does not image processing software. The "unsharp" of the smooth sharp edges. Adaptive gain control has also name derives from the fact that the technique uses a been studied [3]. Contrast is a basic perceptual blurred, or "unsharp," positive to create a "mask" of attribute of an image [4]. It is difficult to see the the original image. The unsharped mask is then details in a low contrast image. Adaptive histogram combined with the negative, creating the illusion that equalization [5], [6] is frequently used for contrast the resulting image is sharper than the original. From enhancement. The retinex algorithm, first proposed a standpoint, an unsharp mask is generally a linear by Land has been recently studied by many ornonlinear filter that amplifies high-frequency researchers for manipulating contrast, sharpness, and components. B) Unsharp masking process The dynamic range of digital images. The retinex sharpening process works by utilizing a Proceedings of 10th IRAJ International Conference, 27th October 2013, Tirupati, India. ISBN: 978-93-82702-36-8 90 Implementation Of Generalized Unsharp Masking Algorithm For Digital Image slightly blurred version of the original image. This is then subtracted away from the original to detect the presence of edges, creating the unsharp mask (effectively a high-pass filter). Step 1: Detect Edges and Create Mask The classical unsharp masking algorithm can be represented by equation V=y+γ(x-y) where x is the input image y, is the result of a linear low-pass filter and the gain γ (γ>0) is a real scaling factor. The signal d=x-y is usually amplified (γ>1) to increase the sharpness. However, the signal contains 1) details of the image, 2) noise, and 3) over-shoots and under- shoots in areas of sharp edges due to the smoothing of edges. While the enhancement of noise is clearly undesirable, the enhancement of the under-shoot and overshoot creates the visually unpleasant halo effect. Ideally, the algorithm should only enhance the image details. This requires that the filter is not sensitive to noise and does not smooth sharp edges. These issues have been studied by many researchers. For example, the cubic filter and the edge-preserving filters have been used to replace the linear low-pass filter. The former is less sensitive to noise and the latter does not smooth sharp edges. Adaptive gain control has also been studied .Contrast is a basic perceptual attribute of an image. It is difficult to see the details in a low contrast image. Adaptive histogram equalization is frequently used for contrast enhancement. Halo effect: The UnSharp Mask is wonderful magic, but still,excessive and improper use of its parameters can produce artificial images with bizarre problems. Such problems can include overly contrasty images, edges that look like halos around objects, jagged edges, and specked or mottled areas, like faces with bad complexions. So if this might be your problem, back off, and practice moderation. The "mask overlay" is when image information from the layer above the unsharp mask passes through and replaces the layer below in a way which is proportional to brightness in that region of the mask. C) Unsharp masking algorithm Fig.1 Halo effect Proceedings of 10th IRAJ International Conference, 27th October 2013, Tirupati, India. ISBN: 978-93-82702-36-8 91 Implementation Of Generalized Unsharp Masking Algorithm For Digital Image This tiny image is a simple three tone graphic image In the proposed algorithm, the user can adjust the two containing two contrast edges, shown unsharpened on parameters controlling the contrast and sharpness to the left, and sharpened with the Unsharp Mask on the produce the desired results. This makes the proposed right. It is also shown greatly enlarged about 10X so algorithm practically useful. These related works the pixels canbe seen well. Remember about anti- include unsharp masking and its variants, histogram aliasing blending the edges with intermediate tones equalization, retinex and de-hazing algorithms, and (usually only on angled or jagged edges). Unsharp generalized linear systems. It has been recently Mask is the opposite, it involves making the pixels on studied by many researchers for manipulating the light side of the edge even lighter, and making the contrast, sharpness, and dynamic range of digital pixels on the dark side of the edge even darker, as images. The retinex algorithm is based upon the shown, to increase edge contrast. This then shows the imaging model in which the observed image is edge better, therefore we perceive the edge to be formed by the product of scene reflectance and sharper. Give this a little thought, because the same illuminance. The task is to estimate the reflectance effect happens to all of the edges in your photograph from the observation. Many algorithms use the with the Unsharp Mask. This image also assumption that the illuminance is spatially smooth. demonstrates the halo effect due to too much Enhancement of contrast and sharpness of an image is sharpening. required in many applications. Unsharp masking is a classical tool for sharpness enhancement. We propose IV. PHOTOGRAPHIC UNSHARP a generalized unsharp masking algorithm using the MASKING exploratory data model as a unified framework. The proposed algorithm is designed to address three The technique was first used in Germany in the 1930s issues: 1) simultaneously enhancing contrast and as a way of increasing the acutance, or apparent sharpness by means of individual treatment of the sharpness, of photographic images. In the model component and the residual. 2) Reducing the photographic process, a large-format glass plate halo effect by means of an edgepreserving filter. 3) negative is contactcopied onto a low contrast film or Solving the out-of-range problem by means of log- plate to create a positive. However, the positive copy ratio and tangent operations. Block diagram of is made with the copy material in contact with the Generalized unsharp masking algorithm shown in back of the original, rather than emulsion-to- Fig.2, is based upon the previous image model and emulsion, so it is blurred.