Wavelet-based image decolorization and enhancement
09858495 ยท 2018-01-02
Assignee
Inventors
Cpc classification
H04N1/6058
ELECTRICITY
International classification
H04N5/208
ELECTRICITY
Abstract
The present invention relates to image processing. More particularly, the present invention provides methods for efficient image decolorization and color image enhancement. The methods of the present invention comprise decolorization in frequency domain, adaptive brightness control for an enhanced grayscale image and color image enhancement. The present invention is able to improve sharpness and fine details in both enhanced grayscale and color images.
Claims
1. A method for image decolorization, comprising: splitting an input color image having a plurality of pixels into a red image, a green image and a blue image; performing wavelet transform for the red image, the green image and the blue image to obtain a red wavelet coefficient, a green wavelet coefficient, and a blue wavelet coefficient respectively for each pixel, wherein each of the red wavelet coefficients, the green wavelet coefficients and the blue wavelet coefficients for the plurality of pixels comprises a magnitude and a sign; for each pixel, categorizing the magnitudes of the red wavelet coefficient, the green wavelet coefficient, and the blue wavelet coefficient into a first magnitude M.sub.L, a second magnitude M.sub.M, and a third magnitude M.sub.S, wherein the first magnitude is larger than or equal to the second magnitude, and the second magnitude is larger than or equal to the third magnitude; for each pixel, selecting a sign of a wavelet coefficient having the first magnitude to be a sign of an enhanced wavelet coefficient; for each pixel, calculating a magnitude of the enhanced wavelet coefficient M.sub.E by the below equation:
M.sub.E=M.sub.L+(a*M.sub.Mb*M.sub.S) where a denotes a first adjusting parameter, and b denotes a second adjusting parameter; for each pixel, determining the enhanced wavelet coefficient based on the calculated magnitude of the enhanced wavelet coefficient and the selected sign of the enhanced wavelet coefficient; and applying an inverse wavelet transform to the determined enhanced wavelet coefficients for the plurality of pixels to obtain an enhanced grayscale image.
2. The method of claim 1, wherein for each pixel, the magnitudes of the red wavelet coefficient, the green wavelet coefficient, and the blue wavelet coefficient are obtained by taking absolute values of the red wavelet coefficient, the green wavelet coefficient, and the blue wavelet coefficient respectively.
3. The method of claim 1, wherein for each pixel, the magnitudes of the red wavelet coefficient, the green wavelet coefficient, and the blue wavelet coefficient are sorted in a descending or an ascending order before the step of categorizing the magnitudes of the red wavelet coefficient, the green wavelet coefficient, and the blue wavelet coefficient into the first magnitude, the second magnitude, and the third magnitude.
4. The method of claim 1, wherein the first adjusting parameter is equal to or larger than the second adjusting parameter, and the second adjusting parameter is equal to or larger than zero.
5. The method of claim 1, wherein the first adjusting parameter and the second adjusting parameter are equal to 0.5.
6. A method for adaptive image decolorization, comprising: splitting an input color image having a plurality of pixels into a red image, a green image and a blue image; performing wavelet transform for the red image, the green image and the blue image to obtain a red wavelet coefficient, a green wavelet coefficient, and a blue wavelet coefficient respectively for each pixel, wherein each of the red wavelet coefficients, the green wavelet coefficients and the blue wavelet coefficients for the plurality of pixels comprises a magnitude and a sign; for each pixel, categorizing the magnitudes of the red wavelet coefficient, the green wavelet coefficient, and the blue wavelet coefficient into a first magnitude M.sub.L, a second magnitude M.sub.M, and a third magnitude M.sub.S, wherein the first magnitude is larger than or equal to the second magnitude, and the second magnitude is larger than or equal to the third magnitude; for each pixel, selecting a sign of a wavelet coefficient having the first magnitude to be a sign of an enhanced wavelet coefficient; for each pixel, calculating a magnitude of the enhanced wavelet coefficient M.sub.E by a first equation:
M.sub.E=M.sub.L+(a*M.sub.Mb*M.sub.S) where a denotes a first adjusting parameter, and b denotes a second adjusting parameter; for each pixel, determining the enhanced wavelet coefficient based on the calculated magnitude of the enhanced wavelet coefficient and the selected sign of the enhanced wavelet coefficient; calculating a low frequency wavelet energy and a high frequency wavelet energy based on the determined enhanced wavelet coefficients; converting the input color image into a gray image; calculating a gray image energy of the gray image; calculating an adaptive brightness control factor based on the low frequency wavelet energy of the enhanced wavelet coefficients, the high frequency wavelet energy of the enhanced wavelet coefficients, and the gray image energy; performing an energy normalization based on the adaptive brightness control factor to normalize the determined enhanced wavelet coefficients; and applying an inverse wavelet transform to the normalized enhanced wavelet coefficients for the plurality of pixels to obtain a normalized enhanced grayscale image with adaptive brightness control.
7. The method of claim 6, wherein for each pixel, the magnitudes of the red wavelet coefficient, the green wavelet coefficient, and the blue wavelet coefficient are obtained by taking absolute values of the red wavelet coefficient, the green wavelet coefficient, and the blue wavelet coefficient respectively.
8. The method of claim 6, wherein for each pixel, the magnitudes of the red wavelet coefficient, the green wavelet coefficient, and the blue wavelet coefficient are sorted in a descending or an ascending order before the step of categorizing the magnitudes of the red wavelet coefficient, the green wavelet coefficient, and the blue wavelet coefficient into the first magnitude, the second magnitude, and the third magnitude.
9. The method of claim 6, wherein the first adjusting parameter is equal to or larger than the second adjusting parameter, and the second adjusting parameter is equal to or larger than zero.
10. The method of claim 6, wherein the first adjusting parameter and the second adjusting parameter are equal to 0.5.
11. The method of claim 6, wherein the adaptive brightness control factor is calculated by a second equation:
=1((E.sub.L+E.sub.H)E.sub.G)/E.sub.L where E.sub.L denotes the low frequency wavelet energy of the enhanced wavelet coefficients, E.sub.H denotes the high frequency wavelet energy of the enhanced wavelet coefficients, and E.sub.G denotes the gray image energy.
12. A method for color image enhancement, comprising: splitting an input color image having a plurality of pixels into a red image, a green image and a blue image; performing wavelet transform for the red image, the green image and the blue image to obtain a red wavelet coefficient, a green wavelet coefficient, and a blue wavelet coefficient respectively for each pixel, wherein each of the red wavelet coefficients, the green wavelet coefficients and the blue wavelet coefficients for the plurality of pixels comprises a magnitude and a sign; for each pixel, categorizing the magnitudes of the red wavelet coefficient, the green wavelet coefficient, and the blue wavelet coefficient into a first magnitude M.sub.L, a second magnitude M.sub.M, and a third magnitude M.sub.S, wherein the first magnitude is larger than or equal to the second magnitude, and the second magnitude is larger than or equal to the third magnitude; for each pixel, selecting a sign of a wavelet coefficient having the first magnitude to be a sign of an enhanced wavelet coefficient; for each pixel, calculating a magnitude of the enhanced wavelet coefficient M.sub.E by a first equation:
M.sub.E=M.sub.L+(a*M.sub.Mb*M.sub.S) where a denotes a first adjusting parameter, and b denotes a second adjusting parameter; for each pixel, determining the enhanced wavelet coefficient based on the calculated magnitude of the enhanced wavelet coefficient and the selected sign of the enhanced wavelet coefficient; calculating a low frequency wavelet energy and a high frequency wavelet energy based on the determined enhanced wavelet coefficients; converting the input color image into a gray image; calculating a gray image energy of the gray image; calculating an adaptive brightness control factor based on the low frequency wavelet energy of the enhanced wavelet coefficients, the high frequency wavelet energy of the enhanced wavelet coefficients, and the gray image energy; performing an energy normalization based on the adaptive brightness control factor to normalize the determined enhanced wavelet coefficients; applying an inverse wavelet transform to the normalized enhanced wavelet coefficients for the plurality of pixels to obtain a normalized enhanced grayscale image with adaptive brightness control; splitting the input color image into a Y image, an U image, and a V image, wherein the Y image, the U image and the V image are color components in a YUV color space; and combining the normalized enhanced grayscale image with adaptive brightness control with the U image and the V image to obtain a color enhanced image.
13. The method of claim 12, wherein for each pixel, the magnitudes of the red wavelet coefficient, the green wavelet coefficient, and the blue wavelet coefficient are obtained by taking absolute values of the red wavelet coefficient, the green wavelet coefficient, and the blue wavelet coefficient respectively.
14. The method of claim 12, wherein for each pixel, the magnitudes of the red wavelet coefficient, the green wavelet coefficient, and the blue wavelet coefficient are sorted in a descending or an ascending order before the step of categorizing the magnitudes of the red wavelet coefficient, the green wavelet coefficient, and the blue wavelet coefficient into the first magnitude, the second magnitude, and the third magnitude.
15. The method of claim 12, wherein the first adjusting parameter is equal to or larger than the second adjusting parameter, and the second adjusting parameter is equal to or larger than zero.
16. The method of claim 12, wherein the first adjusting parameter and the second adjusting parameter are equal to 0.5.
17. The method of claim 12, wherein the adaptive brightness control factor is calculated by a second equation:
=1((E.sub.L+E.sub.H)E.sub.G)/E.sub.L where E.sub.L denotes the low frequency wavelet energy of the enhanced wavelet coefficients, E.sub.H denotes the high frequency wavelet energy of the enhanced wavelet coefficients, and E.sub.G denotes the gray image energy.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee. Embodiments of the present invention are described in more details hereinafter with reference to the drawings, in which:
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS
(19) In the following description, methods for image decolorization and image color enhancement are set forth as preferred examples. It will be apparent to those skilled in the art that modifications, including additions and/or substitutions, may be made without departing from the scope and spirit of the invention. Specific details may be omitted so as not to obscure the invention; however, the disclosure is written to enable one skilled in the art to practice the teachings herein without undue experimentation.
(20) As disclosed therein, R denotes red, B denotes blue, and G denotes green.
(21) The present invention provides methods for efficient image decolorization and color image enhancement. The methods comprise decolorization in frequency domain, adaptive brightness control for the enhanced grayscale image and color image enhancement.
(22) According to wavelet transform theorem, wavelet coefficients of an image with larger magnitude contain significant information, e.g. edge and line. In order to further improve the image details and contrast in the enhanced grayscale image, the present invention provides a new scheme that comprises of two most significant color channels.
(23) The present method performs wavelet transform on each RGB color component of input image, then sorts the RGB wavelet coefficients pixel-by-pixel in descending order for enhanced coefficient calculation which comprises two most significant color channels.
(24)
M.sub.E=M.sub.L+(a*M.sub.Mb*M.sub.S) where: ab0
(25) In step 106, enhanced wavelet coefficients are determined based on the magnitudes of enhanced wavelet coefficient and the signs of the enhanced wavelet coefficient. In step 107, an inverse wavelet transform is applied to the enhanced wavelet coefficients to obtain an enhanced grayscale image.
(26) Alternatively, the magnitudes of the RGB wavelet coefficients can also be sorted in an ascending order in step 103.
(27) According to an embodiment of the presently claimed invention, an input color image of size mn is split into RGB components. After performing wavelet transform for each of the RGB color components, each of the wavelet transform coefficients {W.sub.Ri, W.sub.Gi, W.sub.Bi} is defined by both a magnitude {M.sub.Ri, M.sub.Gi, M.sub.Bi} and a sign {S.sub.Ri, S.sub.Gi, S.sub.Bi};
(28) where M.sub.Ri=|W.sub.Ri| and S.sub.Ri=sign(W.sub.Ri), i=0, 1, . . . , mn1;
(29) M.sub.Gi=|W.sub.Gi| and S.sub.Gi=sign(W.sub.Gi), i=0, 1, . . . , mn1;
(30) M.sub.Bi=|W.sub.Bi| and S.sub.Bi=sign(W.sub.Bi), i=0, 1, . . . , mn1.
(31) The magnitudes of RGB wavelet coefficients are sorted pixel-by-pixel in descending order, such that M.sub.LiM.sub.MiM.sub.si, The sign S.sub.i of the wavelet coefficient which has the largest magnitude M.sub.Li is stored. The magnitude of enhanced wavelet coefficient M.sub.Ei is calculated as follows:
M.sub.E=M.sub.Li+(a*M.sub.Mib*M.sub.Si)
where ab0, and i=0, 1, . . . , mn1.
(32) Preferably, the optimal values for the parameters a and b are 0.5. Therefore,
(33) (i) if M.sub.MiM.sub.Si, then M.sub.EiM.sub.Li
(34) (ii) if M.sub.Mi>>M.sub.Si, then M.sub.Ei=M.sub.Li+0.5(M.sub.MiM.sub.Si)
(35) In the case (i), it implies that mainly the first channel M.sub.L contributes to the improvement of the image details and contrast.
(36) In the case (ii), it implies that the second channel M.sub.M also contributes to the improvement of the image details and contrast.
(37) The enhanced wavelet coefficient W.sub.Ei is obtained as follows:
W.sub.Ei=S.sub.i*M.sub.Ei
(38)
(39)
(40) The present invention further provides a method for an image decolorization with adaptive brightness control. The method applies an adaptive brightness control parameter to low frequency subband so as to adjust the brightness of the enhanced grayscale image.
(41) After the enhanced wavelet coefficients calculation, the total energy of the enhanced grayscale image is higher than the original grayscale image as such E.sub.L+E.sub.HE.sub.G, where E.sub.L denotes the low frequency wavelet energy of the enhanced wavelet coefficients, E.sub.H denotes the high frequency wavelet energy of the enhanced wavelet coefficients, and E.sub.G denotes the gray image energy. Therefore, the overall brightness of the enhanced grayscale image is noticeably higher than the original grayscale image.
(42) Because the low frequency coefficients corresponding to most of the energy concentration presented in the image, high frequency wavelets coefficients represent details in the image, but contributes little spatial-frequency energy. Therefore, in order to preserve detail information of the enhanced grayscale image while maintaining the image energy, the method of the present invention attenuates the energy of low frequency subband. According to Parseval's Theorem, it is assumed that E.sub.L+E.sub.H=E.sub.G. Since the magnitudes of enhanced wavelet coefficients are relatively large, an adaptive brightness control parameter , and energy normalization are applied.
(43) The energy of low frequency subband is adjusted by the parameter so as to match the overall brightness to the original grayscale image as below equation:
(*E.sub.L+E.sub.H)E.sub.G for energy normalization
where =1((E.sub.L+E.sub.H)E.sub.G)/E.sub.L.
(44)
(45) According to an embodiment of the present invention, an original color image, as shown in
(46)
where I(x,y) denotes a pixel intensity of the gray scale image obtained by conventional RGB to gray conversion; (x,y) denotes a pixel coordination; and (m,n) denotes an width and height of the image.
(47) A plurality of enhanced wavelet coefficients are obtained by the image decolorization approach of the present invention, and the low frequency wavelet energy E.sub.L is calculated by the below equation:
(48)
where W(x,y) denotes an enhanced wavelet coefficient of the enhanced gray image; and (m1,n1) denotes a width and height of the low frequency wavelet coefficient.
(49) Accordingly, the high frequency wavelet energy E.sub.H is calculated by the below equation:
(50)
(51)
(52) The present invention further provides a method for a color image enhancement approach. The method integrates the enhanced grayscale image into the luminance channel in YUV space to achieve better color image enhancement.
(53)
(54)
Experimental Results
(55) The experimental result regarding to the image decolorization is shown as follows.
(56) The experimental result regarding to the image decolorization with adaptive brightness control is shown as follows.
(57) The experimental result regarding to the color image enhancement is shown as follows.
(58) Objective performance evaluation for image decolorization is performed between the present invention and a prior art. To enable an objective quantification of the performance of decolorization method, the normalized cross-correlation NCC between the resulting grayscale image and R, G, B color channels of the original input images is adopted. The NCC calculation is shown as follows:
(59)
where I.sub.i represents intensity of one of the three R, G, or B channels of a color input image; I.sub.g represents intensity of an enhanced gray image; and (x,y) represents the image coordination.
(60) 24 standard test images are used for the performance test.
(61) According to the present invention, the method for image decolorization is applicable to monochromatic printing, displaying color images on monochromatic medical displays, and pattern recognition. On the other hand, the method for color image enhancement is applicable to medical image enhancement, defect detection, and visual inspection and interpretation.
(62) The embodiments disclosed herein may be implemented using a general purpose or specialized computing device, computer processor, or electronic circuitry including but not limited to a digital signal processor (DSP), application specific integrated circuit (ASIC), a field programmable gate array (FPGA), and other programmable logic device configured or programmed according to the teachings of the present disclosure. Computer instructions or software codes running in the general purpose or specialized computing device, computer processor, or programmable logic device can readily be prepared by practitioners skilled in the software or electronic art based on the teachings of the present disclosure.
(63) In some embodiments, the present invention includes a computer storage medium having computer instructions or software codes stored therein which can be used to program a computer or microprocessor to perform any of the processes of the present invention. The storage medium can include, but is not limited to, floppy disks, optical discs, Blu-ray Disc, DVD, CD-ROMs, and magneto-optical disks, ROMs, RAMs, flash memory devices, or any type of media or device suitable for storing instructions, codes, and/or data. The foregoing description of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations will be apparent to the practitioner skilled in the art.
(64) The embodiments were chosen and described in order to best explain the principles of the invention and its practical application, thereby enabling others skilled in the art to understand the invention for various embodiments and with various modifications that are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalence.