The present disclosure generally relates to digital images, and more particularly to sharpening of digital images.
A digital image capturing system, such as a digital camera, is well known for recording either motion or still images. The digital image capturing system may be used to capture raw image data from an image sensor through a lens system, and subsequently processes the raw image data into output images using a digital image pipeline as shown in
Many image sharpening algorithms are known in the art. Popular ones include unsharp masking, high pass filtering, and the like. Generally it is possible to perform image sharpening either in a Red Green Blue (RGB) domain or in a luminance-chrominance domain such as a YUV.
Pixels in a digital image may be arranged in rows and columns. Consider an input image pixel where Xm,n, denotes a value of a pixel at an mth row and nth column. The input image may be fed into the image sensor as shown in
Ym,n=Xm,n+α(Xm,n−Sm,n) (1)
where Sm,n is a smoothed version of Xm,n, and α is a scaling factor. The smoothed value Sm,n is often generated by processing Xm,n with a low pass filter. Typical low pass filters used in image processing for this purpose can have a kernel of size 3×3, 3×5, 5×5, and the like. The scaling factor controls the sharpness of the output image. Generally, a larger value of α results in a sharper output image. One common characteristic of image sharpening algorithms is that they always enhance high frequency content of the images. Although this makes the output images sharper, it also amplifies the noise content of the images.
In view of the foregoing disadvantages inherent in the prior art, the general purpose of the present disclosure is to provide a method and apparatus for sharpening digital images to include all advantages of the prior art, and to overcome the drawbacks inherent therein.
It is therefore an object of the present disclosure to provide a method and apparatus for increasing the sharpness of digital images without increasing the noise in the digital images.
To achieve the above objects, in one aspect, the present disclosure provides a method for sharpening a digital image captured by a digital imaging device, the method comprising, for each pixel Xm,n of the digital image: a) at an edge detector determining an edge parameter E, the edge parameter E providing an indication of whether the pixel Xm,n is at an edge of the digital image; b) at a noise detector determining a noise parameter σ, the noise parameter σ providing an indication of whether the pixel Xm,n represents noise in the digital image; c) at a scaling module determining a scaling factor αm,n based on a combination of the edge parameter E and the noise parameter σ; and d) at an image sharpening module applying the scaling factor αm,n on a pixel by pixel basis to sharpen the digital image to get a sharpened pixel Ym,n.
In another aspect, the present disclosure provides an image processor for sharpening a digital image captured by a image processing system, the image processor comprising: for each pixel Xm,n of the digital image: a) an edge detector capable of determining an edge parameter E, the edge parameter E provides an indication of whether the pixel Xm,n is at an edge of the digital image; b) a noise detector capable of determining a noise parameter σ, the noise parameter σ provides an indication of whether the pixel Xm,n represents noise in the digital image; c) a scaling module coupled to the edge detector and to the noise detector, the scaling module capable of determining a scaling factor αm,n based on a combination of the edge parameter E and the noise parameter σ; and d) an image sharpening module coupled to the scaling module, the image sharpening module capable of utilizing the scaling factor αm,n on a pixel by pixel basis to sharpen the digital image to get a sharpened pixel Ym,n.
In yet another aspect of the present disclosure, the present disclosure provides computer-implemented methods, computer systems and a computer readable medium containing a computer program product for sharpening a digital image captured by a digital imaging device, the computer program product comprising: for each pixel Xm,n of the digital image: a) program code for determining an edge parameter E, the edge parameter E providing an indication of whether the pixel Xm,n is at an edge of the digital image; b) program code for determining a noise parameter σ, the noise parameter σ providing an indication of whether the pixel Xm,n represents noise in the digital image; c) program code for determining a scaling factor αm,n based on a combination of the edge parameter E and the noise parameter σ; and d) program code for applying the scaling factor αm,n on a pixel by pixel basis to sharpen the digital image to get a sharpened pixel Ym,n.
The accompanying drawings, where like reference numerals refer to identical or functionally similar elements throughout the separate views, together with the detailed description below, are incorporated in and form part of the specification, and serve to further illustrate embodiments of concepts that include the claimed disclosure, and explain various principles and advantages of those embodiments.
The method and apparatus have been represented where appropriate by conventional symbols in the drawings, showing only those specific details that are pertinent to understanding the embodiments of the present disclosure so as not to obscure the disclosure with details that will be readily apparent to those of ordinary skill in the art having the benefit of the description herein.
Before describing in detail embodiments that are in accordance with the present disclosure, it should be observed that the embodiments reside primarily in combinations of method steps and system components related to sharpening a digital image without amplifying a noise level in the digital image.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one module or action from another module or action without necessarily requiring or implying any actual such relationship or order between such modules or actions. The terms “comprises,” “comprising,” or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements that does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by “comprises . . . a” does not, without more constraints, preclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
Any embodiment described herein is not necessarily to be construed as preferred or advantageous over other embodiments. All of the embodiments described in this detailed description are illustrative, and provided to enable persons skilled in the art to make or use the disclosure and not to limit the scope of the disclosure, which is defined by the claims.
The present disclosure provides a method and system for increasing the sharpness of digital images without or at least minimally amplifying a noise level in the digital images. Specifically, a digital image is processed or sharpened by the system pixel by pixel, as will be explained in conjunction with
Referring to
Referring to now
The image buffer 300 may store the digital image 500 as shown in the
The image processor 400 includes an edge detector 10, a noise detector 20, a scaling module 30, an image sharpening module 40, an image darkening module 50, and an adder 60. The image processor 400 may read the digital image 500 in the form of blocks of pixels in order to sharpen the digital image 500. Specifically, a block of pixels may be read by the edge detector 10 from the image buffer 300. The edge detector 10 executes an edge detection algorithm to determine whether a pixel Xm,n is at an edge. Specifically, the edge detector 10 is capable of determining an edge parameter E of the pixel Xm,n of the digital image 500. The edge parameter E provides an indication of whether the pixel Xm,n is at an edge in the image. Further, the edge parameter E may determine whether the pixel Xm,n is on a dark side of the edge or on a light side of the edge. In embodiment of the present disclosure, a Sobel type edge detector may be used as the edge detection algorithm. However, it will be evident to a person skilled in the art that any other type of edge detector may be used without deviating from the scope of present disclosure.
In the present embodiment, the blocks of pixels may also be read by the noise detector 20 from the image buffer 300. The noise detector 20 is capable of determining a noise parameter σ which provides an indication of whether the pixel Xm,n represents noise in the digital image 500. Specifically, the noise parameter σ may compare the pixel Xm,n with a neighborhood R of pixels centered on the pixel Xm,n. In one embodiment, a 3×3 neighborhood R of pixels centered at Xm,n may be considered. The 3×3 neighborhood R of pixels defines an 8-pixel neighborhood comprising the pixel set {Xm−1,n−1, Xm−1,n, Xm−1,n+1, Xm,n−1, Xm,n+1, Xm+1,n−1, Xm+1,n, Xm+1,n+1}.
The pixels in the neighborhood R are examined to determine the maximum value and minimum pixel values in the neighborhood R as follows:
In one embodiment, if the pixel Xm,n is either larger than Am,n or lower than Bm,n, then the pixel Xm,n is considered to be a high level noise. Further, when the difference between Am,n and Bm,n is large or when pixel Xm,n is close to either Am,n or Bm,n pixel Xm,n would be considered to be a medium level noise.
In one embodiment of the present disclosure, the edge parameter E and the noise parameter σ may be fed to the scaling module 30 for calculation of a scaling factor αm,n. Specifically, the edge detector 10 and the noise detector 20 are coupled to the scaling module 30 which is capable of determining the scaling factor αm,n based on a combination of the edge parameter E and the noise parameter σ. The scaling factor αm,n is used to sharpen the digital image 500. In a one embodiment, the scaling module 30 controls the value of the scaling factor αm,n for every pixel location by combining the results of edge parameter E and noise parameter σ. An objective of the combining the results of edge parameter E and noise parameter σ for calculating the scaling factor αm,n is to avoid sharpening at either non-edge pixels or noise pixels.
In one embodiment of the present disclosure, when the pixel Xm,n is considered to be a high level noise, the scaling factor will be set to zero and there will be no sharpening. Similarly, when the pixel Xm,n is considered to be a medium level noise, the scaling factor will be reduced thereby reducing the sharpening level. In other words, the scaling factor αm,n may be discarded when the value of the pixel Xm,n is outside a range defined by the neighborhood pixels.
In one embodiment of the present disclosure, the scaling factor αm,n may be fed to the image sharpening module 40 which is coupled to the scaling module 30. The image sharpening module 40 is capable of utilizing the scaling factor αm,n in as a parameter of an image sharpening algorithm for sharpening the pixel Xm,n to get a sharpened pixel Ym,n in an output image. In one embodiment, the image sharpening module 40 implements an unsharp masking algorithm of the form
Ym,n=Xm,n+αm,n(Xm,n−Sm,n) (4)
where the scaling factor αm,n varies from pixel to pixel, and Ym,n is a pixel an output/sharpened image. In one embodiment, to perform edge controlled sharpening, the scaling factor αm,n is set to zero for the pixel locations where an edge is not detected. Further, for edge pixel locations, scaling factor αm,n is set to a non-zero value to perform edge sharpening.
In one embodiment of the present disclosure, the edge parameter E may be fed to the image darkening module 50 which is coupled to the edge detector 10. The image darkening module 50 is capable of determining an offset parameter Um,n when the pixel Xm,n is determined to be on the dark side of the edge. When the pixel Xm,n is determined to be on the dark side of the edge, the image darkening module 50 darkens the pixel Xm,n in order to sharpen the pixel Xm,n using the offset parameter Um,n.
In an embodiment of the present disclosure, an adder may generate an output image pixel Tm,n based on a combination of the sharpened pixel Ym,n and the offset parameter Um,n as shown in the following equation:
Tm,n=Ym,n−Um,n (5)
Referring now to
It will be appreciated that embodiments of the disclosure described herein may comprise one or more conventional processors and unique stored program instructions that control the one or more processors to implement, in conjunction with certain non-processor circuits, some, most, or all functions of sharpening a digital image without amplifying a noise level in the digital image. Alternatively, some or all functions of sharpening a digital image could be implemented by a state machine that has not stored program instructions, or in one or more Application Specific Integrated Circuits (ASICs), in which each function or some combinations of certain of the functions are implemented as custom logic. Of course, a combination of the two approaches could be used. Thus, methods and means for these functions have been described herein. Further, it is expected that one of ordinary skill, notwithstanding possibly significant effort and many design choices motivated by, for example, available time, current technology, and economic considerations, when guided by the concepts and principles disclosed herein will be readily capable of generating such software instructions and programs and ICs with minimal experimentation.
As will be understood by those familiar with the art, the disclosure may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. Likewise, the particular naming and division of the modules, agents, managers, functions, procedures, actions, methods, classes, objects, layers, features, attributes, methodologies and other aspects are not mandatory or significant, and the mechanisms that implement the disclosure or its features may have different names, divisions and/or formats. Furthermore, as will be apparent to one of ordinary skill in the relevant art, the modules, agents, managers, functions, procedures, actions, methods, classes, objects, layers, features, attributes, methodologies and other aspects of the disclosure can be implemented as software, hardware, firmware or any combination of the three. Of course, wherever a component of the present disclosure is implemented as software, the component can be implemented as a script, as a standalone program, as part of a larger program, as a plurality of separate scripts or programs, as a statically or dynamically linked library, as a kernel loadable module, as a device driver, and/or in every and any other way known now or in the future to those of skill in the art of computer programming. Additionally, the present disclosure is in no way limited to implementation in any specific programming language, or for any specific operating system or environment. Accordingly, the disclosure of the present disclosure is intended to be illustrative, but not limiting, of the scope of the disclosure, which is set forth in the following claims.
Number | Name | Date | Kind |
---|---|---|---|
6628329 | Kelly et al. | Sep 2003 | B1 |
7379626 | Lachine et al. | May 2008 | B2 |
7872678 | Fuchs et al. | Jan 2011 | B2 |
20090096889 | Tsuruoka | Apr 2009 | A1 |
20090316049 | Fuji | Dec 2009 | A1 |
20100040302 | Su et al. | Feb 2010 | A1 |
20100245632 | Suzuki | Sep 2010 | A1 |
20110205402 | Kumar et al. | Aug 2011 | A1 |
Number | Date | Country | |
---|---|---|---|
20110267484 A1 | Nov 2011 | US |