This application claims the benefit of Chinese Application No. 201310109326.3, filed Mar. 29, 2013, the disclosure of which is incorporated herein by reference.
1. Field
The embodiments relate to the field of image processing, and particularly, to a gray image processing method and apparatus.
2. Description of the Related Art
Currently, with the popularization and development of the electronic devices such as digital camera and scanner, the digital images can be easily obtained. However, any physical sensor (e.g., thermal sensor, electric sensor, or other type of sensor) will be influenced by noises at certain extent, and those noises influence the signal measurement authenticity. As a result, any image data obtained includes signals and noises. Various image-related applications, such as medical image analysis, image segmentation and object detection, usually require an effective noise suppression method to further obtain a reliable result. Thus, the image filtration has become one of the most important and extensive research topics about image processing and computer vision. The gray image is one type of image significant and widely used, so its noise suppression method is very important.
In the prior art, in order to denoise the image, many methods such as wavelet threshold method, non-local means method, Gaussian filtering method, and bilateral filtering method have been tried to filter the gray image.
In which, the wavelet threshold method applies a wavelet transform to the original image to transform it into the wavelet domain, and filters multi-channel wavelet coefficients by using a threshold method, wherein the wavelet coefficients usually include a slash detail coefficient, a horizontal detail coefficient and a vertical detail coefficient in the decomposition of level 1. At present, a known threshold method is the hard threshold, which sets all the detail coefficients within a range from zero to a set value, and finally, all the wavelet coefficients after the threshold setting are returned to the image domain through an inverse wavelet transform. This method can suppress noises, but some image details will also be suppressed.
The non-local means method is a non-linear edge reservation filtering method, which calculates a weighted sum of the input pixels as each output pixel. Due to the collection of the input pixels, one output pixel may originate from a large area of the input image, and then become “non-local”. One key feature of the non-local means method is that the weighted value is determined by the distance between the small image blocks. The method can reserve the image details and effectively suppress the Gaussian noise. However, in some practical applications, other noises besides the Gaussian noise are also existed, and they cannot be effectively removed by using this method.
The Gaussian filtering method is a weighted means method and each output pixel is set as a weighted means of around pixels, wherein the weighted value of the original pixel is the maximum, and the weighted values of around pixels gradually decrease with the increase of the distance away from the original pixel. The method can reduce the noises by smoothing the image, but the image details are also degraded.
The bilateral filtering method is a smooth filtering method of edge reservation and noise reduction, and the brightness value of each pixel in the image is replaced by the weighted means of the brightness values of adjacent pixels. The method is based on Gaussian distribution, and the key is that those weighted values are based on not only the Euclidean distance, but also the radiation difference. The method can reserve the sharp edges through each traverse pixel of the system and corresponding weighted values of adjacent pixels. However, if the image has high noises, the method will distort the image edges.
It is clear that none the existing methods can well reserve the image details while effectively removing various image noises.
To be noted, the above introduction to the technical background is just made for the convenience of clearly and completely describing the technical solutions, and to facilitate the understanding of a person skilled in the art. It shall not be deemed that the above technical solutions are known to a person skilled in the art just because they have been illustrated in the Background section.
Additional aspects and/or advantages will be set forth in part in the description which follows and, in part, will be apparent from the description, or may be learned by practice of the embodiments.
The objective of the embodiments is to provide a gray image processing method and apparatus, which are capable of effectively removing various image noises, and well reserving the image details.
According to an aspect of the embodiments, a gray image processing method is provided, including: performing N-level decomposition of an original gray image by using a wavelet transform method; and processing each level of components one by one starting from an N-th level, so as to obtain a processed gray image; wherein the processing each level of components in N levels includes: performing non-local means processing to all the pixels of a first component, a second component, a third component and a fourth component of the current level, and performing wavelet reconstruction of the four non-local means processed components, so as to obtain a first component of a level preceding the current level; wherein the performing non-local means processing to one of all the pixels of a first component, a second component, a third component and a fourth component of the current level comprises: performing non-local means processing to one pixel of the first component of the current level, so as to obtain a pixel value of the non-local means processed pixel and a weighted value matrix of pixels within a predetermined search range around the pixel, wherein the weighted value matrix is an R×R matrix, R denoting the number of the pixels within the predetermined search range, which is an integer greater than or equal to 1; and using the weighted value matrix to respectively calculate pixel values of the non-local means processed pixels in the second component, the third component and the fourth component of the current level corresponding to the pixel in the first component; or the processing each level of components in the N levels comprises: performing non-local means processing to all the pixels of the first component of the current level, and performing wavelet reconstruction of the non-local means processed first component, second component, third component and fourth component, so as to obtain a first component of a level preceding the current level; wherein N is greater than or equal to 1, and when the current level is the N-th level, the first component of the current level is a first component obtained after the N-th level decomposition; and when N is greater than 1 and the current level is not the N-th level, the first component of the current level is a first component obtained after processing a component of a level next to the current level; and when N is greater than 1, manners for processing the components of different levels in the N levels are identical or different.
According to another aspect of the embodiments, a gray image processing apparatus is provided, including: a decomposing unit configured to perform N-level decomposition of an original gray image by using a wavelet transform method; and a processing unit configured to process each level of components one by one starting from an N-th level, so as to obtain a processed gray image; wherein the processing each level of components in N levels by the processing unit comprises: performing non-local means processing to all the pixels of a first component, a second component, a third component and a fourth component of the current level, and performing wavelet reconstruction of the four non-local means processed components, so as to obtain a first component of a level preceding the current level; wherein the performing non-local means processing to one of all the pixels of a first component, a second component, a third component and a fourth component of the current level by the processing unit comprises: performing non-local means processing to one pixel of the first component of the current level, so as to obtain a pixel value of the non-local means processed pixel and a weighted value matrix of pixels within a predetermined search range around the pixel, wherein the weighted value matrix is an R×R matrix, R denoting the number of the pixels within the predetermined search range, which is an integer greater than or equal to 1; and using the weighted value matrix to respectively calculate pixel values of the non-local means processed pixels in the second component, the third component and the fourth component of the current level corresponding to the pixel in the first component; or the processing each level of components in the N levels by the processing unit comprises: performing non-local means processing to all the pixels of the first component of the current level, and performing wavelet reconstruction of the non-local means processed first component, second component, third component and fourth component, so as to obtain a first component of a level preceding the current level; when N is greater than or equal to 1 and the current level is the N-th level, the first component of the current level is a first component obtained after the N-th level decomposition; and when N is greater than 1 and the current level is not the N-th level, the first component of the current level is a first component obtained after processing a component of a level next to the current level; and when N is greater than 1, manners for processing the components of different levels in the N levels are identical or different.
The embodiments have the following beneficial effects: effectively removing various image noises, and well reserving the image details.
The subsequent descriptions and drawings disclose the particular embodiments in detail to indicate the ways of employing the principle of the embodiments. It shall be appreciated that the scope of the embodiments of the invention is not limited thereto, and those embodiments comprise many changes, modifications and equivalents within the scope of the spirit and the clauses of the accompanied claims.
Features described and/or illustrated with respect to one embodiment can be used in one or more other embodiments in a same or similar way, and/or by being combined with or replacing the features in other embodiments.
To be noted, the term “comprise/include” used herein specifies the presence of feature, element, step or component, not excluding the presence or addition of one or more other features, elements, steps or components or combinations thereof.
Many aspects of the embodiments will be understood better with reference to the following drawings. The parts in the drawings are not drafted in proportion, and the emphasis lies in clearly illustrating the principle of the embodiments. For the convenience of illustrating and describing some portions, corresponding portions in the drawings may be enlarged or narrowed. The elements and features illustrated in one drawing or embodiment may be combined with elements and features illustrated in one or more other drawings or embodiments. In addition, the similar reference signs denote corresponding parts in several drawings, and they can be used to denote corresponding portions in more than one embodiment. In which:
Reference will now be made in detail to the embodiments, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout. The embodiments are described below to explain the embodiments by referring to the figures.
The above and other features will be more obvious through the following descriptions with reference to the drawings. The descriptions and the drawings specifically disclose the particular embodiments, which are some of the embodiments capable of adopting the principle of the embodiments. To be noted, the embodiments are not limited to the described embodiments. On the contrary, the embodiments include any amendment, modification and equivalent falling within the scope of the accompanied claims.
Currently, the image processing method in the prior art cannot well reserve the image details while effectively removing various image noises. The embodiments provide an image processing method based on a wavelet transform and improved non-local means hybrid structure, which combines the wavelet transform method and the non-local means method, so as to well reserve the image details while effectively removing various image noises.
The image processing method and apparatus of the embodiments are described in detail as follows with reference to the drawings.
Embodiment 1
Step 101: performing N-level decomposition of an original gray image by using a wavelet transform method.
In the embodiment, any of the existing wavelet transform methods may be used to perform a decomposition of the gray image. For example, the decomposition of the original gray image may be performed by using a lifting wavelet transform method, but the embodiment is not limited thereto.
In the embodiment, the decomposition may be performed by using the method as shown in
The following components are obtained after performing the N-level decomposition of the original gray image by using the lifting wavelet transform: a first component CaN, a second component ChN, a third component CvN, a fourth component CdN of an N-th level, . . . , a second component ChL, a third component CvL, a fourth component CdL of a L-th level, . . . , and a second component Ch1, a third component Cv1 and a fourth component Cd1 of a first level; i.e., totally 3N+1 components are obtained, wherein N is an integer larger than or equal to 1, 1≦L≦N;
In the embodiment, the preceding level and the next level of the L-th level are determined according to the decomposition order, i.e., the (L−1)-th level is the preceding level of the L-th level, and the (L+1)-th level is the next level of the L-th level.
When N is larger than 1 and L is unequal to N, the second component ChL, the third component CvL and the fourth component CdL of the L-th level are obtained from a decomposition of the first component Ch(L−1) of the (L−1)-th level.
Step 102: processing each level of components one by one starting from an N-th level, so as to obtain a processed gray image.
In which, each level of components may be processed one by one in an order from the N-th level to the first level by using the non-local means method. The following modes may be adopted when processing each level of components in the N levels:
Processing mode 1:
Step 301: performing non-local means processing to all the pixels of a first component, a second component, a third component and a fourth component of the current level, and gathering the pixel values of all the non-local means processed pixels, so as to obtain the four non-local means processed components.
In the embodiment, the non-local means processing may be performed by using a method as shown in
Step 302: performing wavelet reconstruction of the four non-local means processed components, so as to obtain a first component of a level preceding the current level.
In the embodiment, when performing the wavelet reconstruction of the four non-local means processed components, any of the existing methods may be used, and herein is omitted. Next, the descriptions are made with reference to
In the embodiment, in step 301, when performing non-local means processing to each of all the pixels of the first component, the second component, the third component and the fourth component of the current level, the method as shown in
Step 301a: performing non-local means processing to one pixel of the first component of the current level, so as to obtain a pixel value of the non-local means processed pixel and a weighted value matrix of pixels within a predetermined search range around the pixel, wherein the weighted value matrix is an R×R matrix, R denoting the number of the pixels within the predetermined search range, which is an integer greater than or equal to 1.
In the embodiment, when performing non-local means processing to one pixel of the first component of the current level, for example the following equations (1)-(4) may be used for the calculation, which are omitted herein.
In the embodiment, the weighted value matrix may be obtained by combining the following equation (5), which is omitted herein.
Step 301b: using the weighted value matrix to respectively calculate pixel values of the non-local means processed pixels in the second component, the third component and the fourth component of the current level corresponding to the pixel in the first component.
In the embodiment, when using the weighted value matrix to respectively calculate pixel values of the non-local means processed pixels in the second component, the third component and the fourth component of the current level corresponding to the pixel in the first component, for example the following equations (9)-(11) may be used for the calculation, which are omitted herein.
Processing mode 2:
Step 401: performing non-local means processing to all the pixels of the first component of the current level.
In the embodiment, when performing non-local means processing to all the pixels of the first component of the current level, for example the following equations (1)-(4) may be used for the calculation, which are omitted herein.
Step 402: performing wavelet reconstruction of the non-local means processed first component, as well as a second component, a third component and a fourth component of the current level, so as to obtain a first component of a level preceding the current level.
In the embodiment, when performing wavelet reconstruction of the four non-local means processed components, any of the existing modes may be used, and herein is omitted. Next, the descriptions are made with reference to
In the embodiment, in step 102, when processing each level of components in the N levels, either of the above two processing modes may be used.
When N is larger than 1, the same processing mode may be used for the components of different levels in the N levels, i.e., processing mode 1 or processing mode 2 is always used when processing each level of components. In addition, different processing modes may also be used for the components of different levels in the N levels, e.g., processing mode 1 is used for the current L-th level while processing mode 2 is used for the L−1 level, and vice versa.
In the embodiment, the image denoising effect is improved with the increase of N, i.e., the increase of the decomposition level.
For the value of N, generally the image denoising requirement and the calculation complexity shall be considered comprehensively. For example, N may be 1 or 2. For example, when N=1, the components of the first level are processed by using processing mode 1. In this case, the calculation is simple and the denoising can be well done. When N=2, the components of the second level are processed by using processing mode 2, and the components of the first level are processed by using processing mode 1. In this case, a deep denoising can be carried out.
In the embodiment, the processes of decomposition and reconstruction of the gray image are briefly described with reference to
As shown in
In the embodiment, the methods as shown in
In the embodiment, the pixel value of the non-local means processed pixel, which is obtained by performing non-local means processing to one pixel of the first component of the current level, is a weighted sum of the pixel values of the pixels within the predetermined search range around the pixel, which is expressed as:
where, NL(i, j) denotes a pixel value of pixel (i, j) after non-local means processing, x(n,m) denotes a pixel value of pixel (n,m) within the predetermined search range, w(n,m) denotes a weighted value of pixel (n,m), R denotes the number of the pixels within the predetermined search range, i, j, n, m and R being integers greater than or equal to 1.
In the embodiment, the weighted value w(n,m) of pixel (n,m) may be calculated by using equation (2) below:
w(n,m)=e(−d(n,m)/h) (2);
where, d(n,m) denotes a distance between the image block where pixel (n, m) is located and the image block where pixel (i, j) is located, and h denotes a control coefficient.
In the embodiment, the distance may be calculated in any of the existing methods.
In addition, the distance may also be calculated by using equations (3) and (4) below:
where, r denotes the size of the image block, the image block consisting of (2r+1)×(2r+1) pixels, T denotes a normalization coefficient, k, t and r are all integers greater than or equal to 1,
k≦r, t≦r, and h denotes a control coefficient.
In the embodiment, the control coefficient h is used to control the denoising effect. In order to suppress more noises, h may be set as higher and preferably between 1 and 100. For example, in the embodiment, R may be set as 10, r may be set as 3, and h may be set as 20.
In which, when the distance is calculated by using the equation (3), a normalization is performed so that the denoised image edge has a smooth transition and reserves a certain sharpness.
In step 301a, the R×R weighted value matrix can be obtained as follows:
The weighted value of each pixel within the search range is calculated by using the equations (2)-(4), so as to obtain an R×R weighted value matrix which is defined as follows:
where, wi,j denotes the weighted value of pixel (i, j), r denotes the size of the image block, and i, j and r are all integers greater than or equal to 1.
In step 301b, the obtained weighted value matrix may be used to respectively calculate pixel values of the non-local means processed pixels in the second component, the third component and the fourth component of the current level corresponding to the pixel in the first component, and the pixel values of all the non-local means processed pixels may be gathered, so as to obtain the four non-local means processed components, thereby completing step 301.
In addition, after step 301a, the method may further comprise: performing normalization to the obtained weighted value matrix. Thus, in step 301b, the normalized weighted value matrix may be used to respectively calculate pixel values of the non-local means processed pixels in the second component, the third component and the fourth component of the current level corresponding to the pixel in the first component.
For example, the normalization may be performed as follows: in the R×R weighted value matrix, the weighted value wi,j of pixel (i, j) is the maximum, and the weighted value of the pixel (i, j) is reset, so as to perform normalization to the weighted value matrix by using equations (6)-(7) below:
wi,j=max(W) (6);
W=W/max(W) (7);
w obtained by using the equation (7) is a normalized weighted value matrix. The denoising effect can be further improved through the normalization to the weighted value matrix.
In steps 301 and 401, for example the non-local means processed components can be obtained in the following method:
when the current level is the L-th level, calculations for all the pixels of the first component of the current level are performed by using the equation (1), and all the pixel values of all the non-local means processed pixels are gathered to obtain the non-local means first component of each level:
Where, NLM-CaL(i, j) denotes the non-local means first component of the L-th level, CaL(n,m) denotes the pixel value of the pixel (n,m) within the predetermined search range of the first component of the L-th level, and R denotes the number of pixels within the predetermined search range.
For each pixel of the first component of the current level, the R×R weighted value matrix is obtained by using the equation (5). Through those weighted value matrixes, the non-local means second component, third component and fourth component of the current level are calculated respectively by using the equations (9)-(11) below:
where, NLM-ChL(i, j), NLM-CvL(i, j) and NLM-CdL(i, j) respectively denote the non-local means second component, third component and fourth component of the L-th level; ChL(n,m), CvL(n,m), CdL(n,m) respectively denote the pixel values of pixels (n,m) within the predetermined search ranges of the second component, the third component and the fourth component of the L-th level. Thus the four non-local means components of the L-th level are obtained.
As can be seen from the above embodiment, by combining the wavelet transform method with the non-local means method, various image noises can be removed, and the image details can be well reserved.
Embodiment 2
a decomposing unit 1001 configured to perform N-level decomposition of an original gray image by using a wavelet transform method; and
a processing unit 1002 configured to process each level of components one by one starting from an N-th level, so as to obtain a processed gray image;
wherein the processing each level of components in N levels by the processing unit 1002 comprises:
Processing mode 1:
performing non-local means processing to all the pixels of a first component, a second component, a third component and a fourth component of the current level, and performing wavelet reconstruction to the four non-local means processed component, so as to obtain a first component of a level preceding the current level;
wherein the performing non-local means processing to one of all the pixels of a first component, a second component, a third component and a fourth component of the current level comprises:
performing non-local means processing to one pixel of the first component of the current level, so as to obtain a pixel value of the non-local means processed pixel and a weighted value matrix of pixels within a predetermined search range around the pixel, wherein the weighted value matrix is an R×R matrix, R denoting the number of the pixels within the predetermined search range, which is an integer greater than or equal to 1; and
using the weighted value matrix to respectively calculate pixel values of the non-local means processed pixels in the second component, the third component and the fourth component of the current level corresponding to the pixel in the first component; or
Processing mode 2:
performing non-local means processing to all the pixels of the first component of the current level, and performing wavelet reconstruction to the non-local means processed first component as well as a second component, a third component and a fourth component of the current level, so as to obtain a first component of a level preceding the current level;
wherein N is greater than or equal to 1, and when the current level is the N-th level, the first component of the current level is a first component obtained after the N-th level decomposition; and when N is greater than 1 and the current level is not the N-th level, the first component of the current level is a first component obtained after processing a component of a level next to the current level.
In the embodiment, when processing each level of components in the N levels by the processing unit 1002, either of the above two processing modes may be used.
When N is larger than 1, the same processing mode may be used for the components of different levels in the N levels, i.e., processing mode 1 or processing mode 2 is always used when processing each level of components. In addition, different processing modes may also be used for the components of different levels in the N levels, e.g., processing mode 1 is used for the current L-th level while processing mode 2 is used for the (L-1)-th level, and vice versa.
In the embodiment, the image denoising effect is improved with the increase of N, i.e., the increase of the decomposition level.
For the value of N, generally the image denoising requirement and the calculation complexity shall be considered comprehensively. For example, N may be 1 or 2. For example, when N=1, the components of the first level are processed by using processing mode 1. In that case, the calculation is simple and the denoising can be well done. When N=2, the components of the second level are processed by using processing mode 2, and the components of the first level are processed by using processing mode 1. In that case, a deep denoising can be carried out.
In the embodiment, the method for the decomposing unit 1001 to perform N-level decomposition of the original gray image by using a wavelet transform method, and processing mode 1 or 2 used by the processing unit 1002 to process each level of components one by one starting from the N-th level, are the same as those described in Embodiment 1, and herein are omitted.
In which, the calculating unit 1003 and the normalizing unit 1004 are optional parts, and represented with dotted boxes in
As can be seen from the above embodiment, by combining the wavelet transform method with the non-local means method, various image noises can be removed, and the image details can be well reserved.
Embodiment 3
Step 1101: performing a decomposition of an original gray image by using a wavelet transform method, so as to obtain four components after the decomposition of a first level, i.e., a first component Ca1, a second component Ch1, a third component Cv1 and a fourth component Cd1.
In which, the method for performing a decomposition by using a wavelet transform method is the same as that in Embodiment 1, and herein is omitted.
Step 1102: judging whether a deep denoising is necessary, and if so, entering step 1103 (i.e., a case where N=2), while if not, directly entering step 1106 ((i.e., a case where N=1).
Step 1103: if a deep denoising is necessary, further performing a decomposition of the first component Ca1 by using the wavelet transform method, so as to obtain four components after the decomposition of a second level, i.e., a first component Ca2, a second component Ch2, a third component Cv2 and a fourth component Cd2.
Step 1104: performing a non-local means processing to the first component Ca2, so as to obtain a non-local means processed first component NLM-Ca2.
In which, the non-local means processed pixel value of each pixel in the first component Ca2 is calculated by using equations (1)-(4) in Embodiment 1, so as to obtain the non-local means processed first component NLM-Ca2, wherein, for example R may be set as 7, r may be set as 2, and h may be set as 20.
Step 1105: performing a wavelet reconstruction based on the non-local means first component NLM-Ca2, the second component Ch2, the third component Cv2 and the fourth component Cd2, so as to obtain a reconstructed first component WR-Ca1.
In which, the method for performing wavelet reconstruction is the same as that in Embodiment 1, and herein is omitted.
Step 1106: if it is judged in step 1102 that a deep denoising is necessary, performing non-local means processing to the reconstructed first component WR-Ca1, so as to obtain a non-local means processed first component NLM-Ca1; if it is judged in step 1102 that a deep denoising is unnecessary, directly performing non-local means processing to the first component Ca1, so as also to obtain a non-local means processed first component NLM-Ca1.
In which, similarly, the non-local means processed pixel value of each pixel in the reconstructed first component WR-Ca1 or first component Ca1 by using the equations (1)-(4) in Embodiment 1, so as to obtain the non-local means processed first component NLM-Ca1, wherein, for example R may be set as 10, r may be set as 3, and h may be set as 20.
Step 1107: during the non-local means processing performed in step 1106, the non-local means processed pixel value of each pixel in the reconstructed first component WR-Ca1 or first component Ca1 is obtained; for one of the pixels, the R×R weighted value matrix representing the weighted values of various pixels within a search range around the pixel by using the equation (5) in Embodiment 1. The operation is repeated for all the pixels to obtain the R×R weighted value matrix corresponding to each pixel in the reconstructed first component WR-Ca1 or first component Ca1.
Step 1108: calculating a non-local means processed second component NLM-Cd1, a non-local means processed third component NLM-Cv1 and a non-local means processed fourth component NLM-Ch1 by using the obtained R×R weighted value matrixes and the equations (9)-(11) in Embodiment 1.
Step 1109: performing a wavelet reconstruction based on the non-local means first component NLM-Ca1 obtained in step 1106, as well as the non-local means processed second component NLM-Cd1, the non-local means processed third component NLM-Cv1 and the non-local means processed fourth component NLM-Ch1 obtained in step 1108, so as to obtain the processed gray image.
In the embodiment, it is judged whether a deep denoising is necessary during the N-level decomposition, and a decomposition of a next level is performed only when it is judged that a deep denoising is necessary. But the embodiment is not limited thereto, for example, the decomposition may be preset as having N levels, then 3N+1 components are obtained after performing all the N-level decompositions. The 3N+1 components are stored and used to perform processing level by level.
As can be seen from the above embodiment, by combining the wavelet transform method with the non-local means method, various image noises can be removed, and the image details can be well reserved.
Embodiment 4
Step 1201: performing a decomposition of an original gray image by using a wavelet transform method, so as to obtain four components after the decomposition of a first level, i.e., a first component Ca1, a second component Ch1, a third component Cv1 and a fourth component Cd1.
In which, the method for performing a decomposition by using a wavelet transform is the same as that in Embodiment 1, and herein is omitted.
Step 1202: judging whether a deep denoising is necessary, and if so, entering step 1203 (i.e., a case where N=2), while if not, directly entering step 1208 ((i.e., a case where N=1).
Step 1203: if a deep denoising is necessary, further performing a decomposition of the first component Ca1 by using the wavelet transform method, so as to obtain four components after the decomposition of a second level, i.e., a first component Ca2, a second component Ch2, a third component Cv2 and a fourth component Cd2.
Step 1204: performing a non-local means processing to the first component Ca2, so as to obtain a non-local means processed first component NLM-Ca2.
Step 1205: during the non-local means processing performed in step 1204, the non-local means processed pixel value of each pixel in the first component Ca2 is obtained; for one of the pixels, the R×R weighted value matrix representing the weighted values of various pixels within a search range around the pixel by using equation (5) in Embodiment 1; the operation is repeated for all the pixels so as to obtain the R×R weighted value matrix corresponding to each pixel in the first component Ca2.
Step 1206: respectively calculating a non-local means processed second component NLM-Cd2, a non-local means processed third component NLM-Cv2 and a non-local means processed fourth component NLM-Ch2 by using the equations (9)-(11) in Embodiment 1.
Step 1207: performing a wavelet reconstruction based on the non-local means processed first component NLM-Ca2 obtained in step 1204, as well as the non-local means processed second component NLM-Cd2, the non-local means processed third component NLM-Cv2 and the non-local means processed fourth component NLM-Ch2 obtained in step 1206, so as to obtain the reconstructed first component WR-Ca1.
Steps 1208-1211 are the same as steps 1106-1109 in Embodiment 3, and herein are omitted. After step 1211, the processed gray image is obtained.
As can be seen from the above embodiment, by combining the wavelet transform method with the non-local means method, various image noises can be removed, and the image details can be well reserved.
Embodiment 5
Step 1301: performing a decomposition of an original gray image by using a wavelet transform method, so as to obtain four components after the decomposition of level 1, i.e., a first component Ca1, a second component Ch1, a third component Cv1 and a fourth component Cd1.
Step 1302: performing a decomposition of the first component Ca1 by still using a wavelet transform method, so as to obtain four components after the decomposition of a second level, i.e., a first component Ca2, a second component Ch2, a third component Cv2 and a fourth component Cd2.
Step 1303: performing a decomposition of the first component Ca2 by further using a wavelet transform method, so as to obtain four components after the decomposition of a third level, i.e., a first component Ca3, a second component Ch3, a third component Cv3 and a fourth component Cd3.
In which, the method for performing a decomposition by using a wavelet transform is the same as that in Embodiment 1, and herein is omitted.
Step 1304: performing a non-local means processing to the first component Ca3, so as to obtain a non-local means processed first component NLM-Ca3.
In which, the non-local means processed pixel value of each pixel in the first component Ca3 is calculated by using the equations (1)-(4) in Embodiment 1, so as to obtain the non-local means processed first component NLM-Ca3.
Step 1305: performing a wavelet reconstruction based on the non-local means processed first component NLM-Ca3, as well as the second component Ch3, the third component Cv3 and the fourth component Cd3, so as to obtain the reconstructed first component WR-Ca2.
In which, the method for performing the wavelet reconstruction is the same as that in Embodiment 1, and herein is omitted.
Step 1306: performing a non-local means processing of the reconstructed first component WR-Ca2, so as to obtain a non-local means processed first component NLM-Ca2.
In which, the non-local means processed pixel value of each pixel in the first component Ca2 is calculated by using the equations (1)-(4) in Embodiment 1, so as to obtain the non-local means processed first component NLM-Ca2.
Step 1307: performing a wavelet reconstruction based on the non-local means processed first component NLM-Ca2, as well as the second component Ch2, the third component Cv2 and the fourth component Cd2, so as to obtain the reconstructed first component WR-Ca1.
Steps 1308-1311 are the same as steps 1106-1109 in Embodiment 3, and herein are omitted. After step 1311, the processed gray image is obtained.
In addition, as a modification to the embodiment, processing mode 2 in step 102 of Embodiment 1 is used to process the components of the third level, and processing mode 1 is used to process the components of the second and first levels. Moreover, processing mode 1 or 2 may be always used to process the components of the first level, the second level and the third level.
In addition, when N is larger than 3, processing mode 2 in step 102 of Embodiment 1 is used to process the components form the N-th level to the second level, and processing mode 1 is used to process the components of the first level. Moreover, processing modes 1 and 2 in step 102 of Embodiment 1 may be alternatively used to process the components of different levels.
The above situations are just given for exemplary descriptions, and the embodiments are not limited thereto.
As can be seen from the above embodiment, by combining the wavelet transform with the non-local means method, various image noises can be removed, and the image details can be well reserved.
The above apparatuses and methods of the embodiment may be implemented by hardware, or a combination of hardware and software. The embodiments relate to a computer readable program which when being executed by a logic part, enables the logic part to implement the aforementioned apparatuses or constituent parts, or enables the logic part to implement the aforementioned methods or steps. The embodiments further relate to a storage medium for storing the above program, such as hard disc, magnetic disc, optical disc, DVD, flash memory, etc.
The embodiments is described as above in conjunction with the particular embodiments. But a person skilled in the art shall appreciate that those descriptions are just exemplary, rather than limitations to the protection scope of the embodiments. A person skilled in the art can make various modifications and changes to the embodiments based on the spirit and the principle of the embodiments, and those modifications and changes also fall within the scope of the embodiments.
Number | Date | Country | Kind |
---|---|---|---|
2013 1 0109326 | Mar 2013 | CN | national |
Number | Name | Date | Kind |
---|---|---|---|
5602760 | Chacon | Feb 1997 | A |
5799100 | Clarke | Aug 1998 | A |
6285798 | Lee | Sep 2001 | B1 |
7020314 | Suri | Mar 2006 | B1 |
20020168109 | Shinbata | Nov 2002 | A1 |
20030031369 | Le Pennec | Feb 2003 | A1 |
20040258104 | Li | Dec 2004 | A1 |
20050196060 | Wang | Sep 2005 | A1 |
20090136112 | Bismuth | May 2009 | A1 |
20110026791 | Collins | Feb 2011 | A1 |
20110268328 | Bar-Aviv | Nov 2011 | A1 |
20140086504 | Arai | Mar 2014 | A1 |
20140233826 | Agaian | Aug 2014 | A1 |
20150339806 | Wu | Nov 2015 | A1 |
Number | Date | Country | |
---|---|---|---|
20140294318 A1 | Oct 2014 | US |