Summary of the invention
In view of this, the invention provides a kind of control method of image enhancement coefficient and a kind of regulating device of image enhancement coefficient and a kind of image enchancing method and a kind of image intensifier device, can improve the picture quality after enhancing.
The control method of a kind of image enhancement coefficient provided by the invention, comprising:
A1, according to each pixel in input picture, be adjacent respectively the grey value difference degree of pixel, identify the picture structure classification under each pixel, described picture structure classification comprises discrete noise, flat site and details area;
A2, by the image enhancement coefficient that belongs to all pixels of discrete noise be all set to make this pixel after image enhancement processing by the value of filtering high fdrequency component, and in the first preset range, regulate respectively the image enhancement coefficient of each pixel belong to flat site, in the second preset range, regulate respectively the image enhancement coefficient of each pixel that belongs to details area, the lower limit of the second preset range equals the upper limit of the first preset range.
Described step a1 comprises:
The absolute value of difference and the average of each pixel neighbor gray-scale values all with it of each pixel and its each neighbor gray-scale value in a11, difference calculating input image;
A12, for any pixel:
If one of value minimum is more than or equal to predetermined first threshold in all absolute values of its correspondence, determine that this pixel belongs to discrete noise;
If one of value minimum is less than predetermined first threshold but the absolute value of the difference of its gray-scale value mean value corresponding with it is less than or equal to predetermined Second Threshold in all absolute values of its correspondence, determine that this pixel belongs to flat site;
If one of value minimum absolute value that is less than the difference of predetermined first threshold and its gray-scale value mean value corresponding with it is greater than predetermined Second Threshold in all absolute values of its correspondence, determine that this pixel belongs to details area.
Can make pixel is-1 by the value of filtering high fdrequency component after image enhancement processing;
The first preset range is 0~1 times that predetermined image strengthens coefficient standard value;
The second preset range is 1~2 times that predetermined image strengthens coefficient standard value.
In described step a2, to belonging to the pixel of flat site and details area, concrete image enhancement coefficient adjustment process comprises:
The gray-scale value mean square deviation of each pixel neighbors all with it in difference calculating input image;
To belonging to any pixel of flat site, the product that calculates gray-scale value mean square deviation corresponding to this pixel and the ratio of maximum gradation value mean square deviation the ratio calculating and predetermined image enhancing coefficient standard value is set to the image enhancement coefficient of this pixel;
To belonging to any pixel of details area, if ratio corresponding to this pixel is less than the 3rd threshold value, predetermined image strengthens the image enhancement coefficient that coefficient standard value is set to this pixel, if ratio corresponding to this pixel is more than or equal to the 3rd threshold value, calculate the product that the gray-scale value mean square deviation of this pixel ratio corresponding with maximum gradation value mean square deviation and this ratio and predetermined image strengthen coefficient standard value, then this product and predetermined image enhancing coefficient standard value sum are set to the image enhancement coefficient of this pixel.
The regulating device of a kind of image enhancement coefficient provided by the invention, comprising:
Textural classification module, is adjacent respectively the grey value difference degree of pixel according to each pixel in input picture, identify the picture structure classification under each pixel, and described picture structure classification comprises discrete noise, flat site and details area;
Classification adjusting module, by the image enhancement coefficient that belongs to all pixels of discrete noise be all set to make this pixel after image enhancement processing by the value of filtering high fdrequency component, and in the first preset range, regulate respectively the image enhancement coefficient of each pixel belong to flat site, in the second preset range, regulate respectively the image enhancement coefficient of each pixel that belongs to details area, the lower limit of the second preset range equals the upper limit of the first preset range.
Textural classification module comprises:
The first calculating sub module, the respectively absolute value of difference and the average of each pixel neighbor gray-scale values all with it of each pixel and its each neighbor gray-scale value in calculating input image;
Discriminant classification submodule, if in all absolute values corresponding to pixel one of value minimum be more than or equal to predetermined first threshold, determine that this pixel belongs to discrete noise; If one of value minimum is less than predetermined first threshold but the absolute value of the difference of its gray-scale value mean value corresponding with it is less than or equal to predetermined Second Threshold in all absolute values corresponding to pixel, determine that this pixel belongs to flat site; If one of value minimum absolute value that is less than the difference of predetermined first threshold and its gray-scale value mean value corresponding with it is greater than predetermined Second Threshold in all absolute values corresponding to pixel, determine that this pixel belongs to details area.
In classification adjusting module, can make pixel after image enhancement processing by the value of filtering high fdrequency component for the-1, first preset range be that 0~1 times of strengthening coefficient standard value of predetermined image, the second preset range are 1~2 times that predetermined image strengthens coefficient standard value.
Classification adjusting module comprises:
The first assignment submodule, is all set to-1 by the image enhancement coefficient that belongs to all pixels of discrete noise;
The second calculating sub module, respectively the gray-scale value mean square deviation of each pixel neighbors all with it in calculating input image;
The second assignment submodule, to belonging to any pixel of flat site, the product that calculates gray-scale value mean square deviation corresponding to this pixel and the ratio of maximum gradation value mean square deviation the ratio calculating and predetermined image enhancing coefficient standard value is set to the image enhancement coefficient of this pixel;
The 3rd assignment submodule, to belonging to any pixel of details area, if ratio corresponding to this pixel is less than the 3rd threshold value, predetermined image strengthens the image enhancement coefficient that coefficient standard value is set to this pixel, if ratio corresponding to this pixel is more than or equal to the 3rd threshold value, calculate the product that the gray-scale value mean square deviation of this pixel ratio corresponding with maximum gradation value mean square deviation and this ratio and predetermined image strengthen coefficient standard value, then this product and predetermined image enhancing coefficient standard value sum are set to the image enhancement coefficient of this pixel.
A kind of image enchancing method provided by the invention, comprising:
A1, according to each pixel in input picture, be adjacent respectively the grey value difference degree of pixel, identify the picture structure classification under each pixel, described picture structure classification comprises discrete noise, flat site and details area;
A2, by the image enhancement coefficient that belongs to all pixels of discrete noise be all set to make this pixel after image enhancement processing by the value of filtering high fdrequency component, and in the first preset range, regulate respectively the image enhancement coefficient of each pixel belong to flat site, in the second preset range, regulate respectively the image enhancement coefficient of each pixel that belongs to details area, the lower limit of the second preset range equals the upper limit of the first preset range;
A3, utilize the product of the high fdrequency component of each pixel and the image enhancement coefficient of this pixel in input picture to carry out image enhancement processing, the output image being enhanced respectively.
Described step a1 comprises:
The absolute value of difference and the average of each pixel neighbor gray-scale values all with it of each pixel and its each neighbor gray-scale value in a11, difference calculating input image;
A12, for any pixel:
If one of value minimum is more than or equal to predetermined first threshold in all absolute values of its correspondence, determine that this pixel belongs to discrete noise;
If one of value minimum is less than predetermined first threshold but the absolute value of the difference of its gray-scale value mean value corresponding with it is less than or equal to predetermined Second Threshold in all absolute values of its correspondence, determine that this pixel belongs to flat site;
If one of value minimum absolute value that is less than the difference of predetermined first threshold and its gray-scale value mean value corresponding with it is greater than predetermined Second Threshold in all absolute values of its correspondence, determine that this pixel belongs to details area.
Can make pixel is-1 by the value of filtering high fdrequency component after image enhancement processing;
The first preset range is 0~1 times that predetermined image strengthens coefficient standard value;
The second preset range is 1~2 times that predetermined image strengthens coefficient standard value.
In described step a2, to belonging to the pixel of flat site and details area, concrete image enhancement coefficient adjustment process comprises:
The gray-scale value mean square deviation of each pixel neighbors all with it in difference calculating input image;
To belonging to any pixel of flat site, the product that calculates gray-scale value mean square deviation corresponding to this pixel and the ratio of maximum gradation value mean square deviation the ratio calculating and predetermined image enhancing coefficient standard value is set to the image enhancement coefficient of this pixel;
To belonging to any pixel of details area, if ratio corresponding to this pixel is less than the 3rd threshold value, predetermined image strengthens the image enhancement coefficient that coefficient standard value is set to this pixel, if ratio corresponding to this pixel is more than or equal to the 3rd threshold value, calculate the product that the gray-scale value mean square deviation of this pixel ratio corresponding with maximum gradation value mean square deviation and this ratio and predetermined image strengthen coefficient standard value, then this product and predetermined image enhancing coefficient standard value sum are set to the image enhancement coefficient of this pixel.
A kind of image intensifier device provided by the invention, comprising:
Textural classification module, is adjacent respectively the grey value difference degree of pixel according to each pixel in input picture, identify the picture structure classification under each pixel, and described picture structure classification comprises discrete noise, flat site and details area;
Classification adjusting module, by the image enhancement coefficient that belongs to all pixels of discrete noise be all set to make this pixel after image enhancement processing by the value of filtering high fdrequency component, and in the first preset range, regulate respectively the image enhancement coefficient of each pixel belong to flat site, in the second preset range, regulate respectively the image enhancement coefficient of each pixel that belongs to details area, the lower limit of the second preset range equals the upper limit of the first preset range;
Strengthen processing module, utilize respectively the product of the high fdrequency component of each pixel and the image enhancement coefficient of this pixel in input picture to carry out image enhancement processing, the output image being enhanced.
Textural classification module comprises:
The first calculating sub module, the respectively absolute value of difference and the average of each pixel neighbor gray-scale values all with it of each pixel and its each neighbor gray-scale value in calculating input image;
Discriminant classification submodule, if in all absolute values corresponding to pixel one of value minimum be more than or equal to predetermined first threshold, determine that this pixel belongs to discrete noise; If one of value minimum is less than predetermined first threshold but the absolute value of the difference of its gray-scale value mean value corresponding with it is less than or equal to predetermined Second Threshold in all absolute values corresponding to pixel, determine that this pixel belongs to flat site; If one of value minimum absolute value that is less than the difference of predetermined first threshold and its gray-scale value mean value corresponding with it is greater than predetermined Second Threshold in all absolute values corresponding to pixel, determine that this pixel belongs to details area.
In classification adjusting module, can make pixel after image enhancement processing by the value of filtering high fdrequency component for the-1, first preset range be that 0~1 times of strengthening coefficient standard value of predetermined image, the second preset range are 1~2 times that predetermined image strengthens coefficient standard value.
Classification adjusting module comprises:
The first assignment submodule, is all set to-1 by the image enhancement coefficient that belongs to all pixels of discrete noise;
The second calculating sub module, respectively the gray-scale value mean square deviation of each pixel neighbors all with it in calculating input image;
The second assignment submodule, to belonging to any pixel of flat site, the product that calculates gray-scale value mean square deviation corresponding to this pixel and the ratio of maximum gradation value mean square deviation the ratio calculating and predetermined image enhancing coefficient standard value is set to the image enhancement coefficient of this pixel;
The 3rd assignment submodule, to belonging to any pixel of details area, if ratio corresponding to this pixel is less than the 3rd threshold value, predetermined image strengthens the image enhancement coefficient that coefficient standard value is set to this pixel, if ratio corresponding to this pixel is more than or equal to the 3rd threshold value, calculate the product that the gray-scale value mean square deviation of this pixel ratio corresponding with maximum gradation value mean square deviation and this ratio and predetermined image strengthen coefficient standard value, then this product and predetermined image enhancing coefficient standard value sum are set to the image enhancement coefficient of this pixel.
As seen from the above technical solution, first the present invention is adjacent the grey value difference degree of pixel according to each pixel in input picture, each pixel is identified as to different picture structure classifications, then, for the image enhancement coefficient of the pixel of different images structured sort, regulate respectively again, make in the image after strengthening, discrete noise is obtained suitable enhancing details area by filtering, flat site can obtain enhancing by a larger margin than flat site, thereby can improve the picture quality after enhancing.
And, alternatively, the present invention can carry out recognition image structured sort by analyzing the absolute value of difference and the average of each pixel neighbor gray-scale values all with it of each pixel and its each neighbor gray-scale value, than the mode of utilizing gradient or variance equivalent, realizes simple and effective.
In addition, optional this, the present invention can be by analyzing the gray-scale value mean square deviation of each pixel neighbors all with it, the image enhancement coefficient self-adaptation of the pixel of flat site and details area being carried out to more refinement regulates, further the strong and weak edge in details area is also adopted to different regulative modes, thereby can further improve the picture quality after enhancing.
Embodiment
For making object of the present invention, technical scheme and advantage clearer, referring to the accompanying drawing embodiment that develops simultaneously, the present invention is described in more detail.
Fig. 1 is the exemplary flow schematic diagram of image enchancing method in the embodiment of the present invention.As shown in Figure 1, the image enchancing method in the present embodiment comprises the steps:
Step 100, the respectively high fdrequency component of each pixel in calculating input image.
A kind of optional mode that realizes this step is, by input picture is carried out to the high fdrequency component that simple filtering obtains each pixel in input picture, specifically can utilize following masterplate to carry out convolution to each pixel in input picture and the adjacent pixel of this pixel surrounding:
Above-mentioned masterplate Mask take 3 * 3 as example, during to each pixel filter, only consider the surrounding neighbor in its 3 * 3 scope, and in practical application, also can utilize 5 * 5 or the masterplate Mask of other sizes, be that m can get the odd number that is greater than arbitrarily 1, correspondingly, the masterplate Mask expression formula of general m * m is as follows:
Certainly, for the ease of hardware, realize, preferably still adopt 3 * 3 masterplate Mask, like this " 1/ (m according to masterplate Mask
2-1), " during represented division arithmetic, utilize hardware directly to move to right 8.
Step 101, is adjacent respectively the grey value difference degree of pixel according to each pixel in input picture, identify the picture structure classification under each pixel, and described picture structure classification comprises discrete noise, flat site and details area.
Because difference maximum between discrete noise, flat site and details area is just the gray-value variation rule between each neighbor, therefore, this step is adjacent the grey value difference degree of pixel according to each pixel in input picture, can identify by the difference of above-mentioned Changing Pattern the picture structure classification under each pixel.
A kind of optional mode that realizes this step is, analyze the absolute value of difference and the average of each pixel neighbor gray-scale values all with it of each pixel and its each neighbor gray-scale value and carry out recognition image structured sort, this optional mode is than all kinds of modes of utilizing gradient or variance equivalent, realize simply and effective, and this optional mode specifically can comprise following processing procedure:
First, the absolute value abs (D of the difference of each pixel and its each neighbor gray-scale value in difference calculating input image
i) and the average f (x, y) of each pixel neighbor gray-scale values all with it;
Wherein, abs (D
i)=abs (f (P
i)-f (x, y)), f (P
i) be i neighbor, if the neighbor of take in 3 * 3 scopes shown in Fig. 2 is example, i is the positive integer of value in 1~8, in like manner, if neighbor is the neighbor within the scope of n * n, i is that value is at 1~(n
2-1) positive integer in, n gets the odd number that is greater than 1;
Correspondingly, if the neighbor of take in 3 * 3 scopes shown in Fig. 2 is example,
F (x, y) can also be expressed as
In like manner, for the neighbor within the scope of n * n,
Or f (x, y) can also be expressed as
Wherein, f (x+p, y+q) is the grey scale pixel value that the inherent level of pixel space neighborhood to be filtered and vertical direction are offset respectively p and q;
Then, for each pixel, analyze respectively:
An if min (abs (D of value minimum in all absolute values corresponding to this pixel
i)) be more than or equal to predetermined first threshold T1, i.e. min (abs (D
i))>=T1, represent that the difference of gray-scale value of this pixel neighbors all with it is all excessive, thereby determine that this pixel belongs to discrete noise;
An if min (abs (D of value minimum in all absolute values corresponding to this pixel
i)) be less than predetermined first threshold T1 but the absolute value of the difference of this grey scale pixel value f (x, y) mean value f (x, y) corresponding with it is less than or equal to predetermined Second Threshold T2, i.e. min (abs (D
i)) < T1, abs (f (x, y)-f (x, y))≤T2, although represent the not difference gray-scale value mean value that all gray-scale value excessive but this pixel is on close level within the scope of its all neighbors of the gray-scale value of neighbors all with it of this pixel, thereby determine that this pixel belongs to flat site;
An if min (abs (D of value minimum in all absolute values corresponding to this pixel
i)) difference that is less than predetermined first threshold T1 and this grey scale pixel value f (x, y) mean value f (x, y) corresponding with it is greater than predetermined Second Threshold T2, i.e. min (abs (D
i)) < T1, abs (f (x, y)-f (x, y)) > T2, represent this pixel not only not the difference of the gray-scale value of neighbors all with it all gray-scale value level excessive and this pixel than the gray-scale value mean value within the scope of its all neighbors, there is enough large difference, thereby determine that this pixel belongs to details area.
In practical application, predetermined first threshold can be got 15~25, preferably be got 20, and predetermined Second Threshold is got 8~16, preferably got 12.
Step 102, by the image enhancement coefficient that belongs to all pixels of discrete noise be all set to make this pixel after image enhancement processing by the value of filtering high fdrequency component, for example-1, and in the first preset range, regulate respectively the image enhancement coefficient of each pixel belong to flat site, in the second preset range, regulate respectively the image enhancement coefficient of each pixel that belongs to details area, and, the lower limit of the second preset range equals the upper limit of the first preset range, continuous to guarantee to belong to the image enhancement coefficient range of adjustment of pixel of different images structure, for example, the first preset range can strengthen coefficient standard value λ for predetermined image
00~1 times, the second preset range can strengthen coefficient standard value λ for predetermined image
01~2 times.
Specifically:
1), for all pixels that belong to discrete noise, its λ (x, y)=-1, makes in follow-up enhanced processes the filtering that should cumulative high fdrequency component becomes negative value, realizes pixel high fdrequency component.
2) to belonging to the pixel of flat site, concrete image enhancement coefficient adjustment process comprises:
The gray-scale value mean square deviation d (x, y) of each pixel neighbors all with it in calculating input image respectively, wherein, if the neighbor of take in 3 * 3 scopes shown in Fig. 2 is example,
In like manner, for the neighbor within the scope of n * n,
Calculate this pixel corresponding grey scale value mean square deviation d (x, y) and maximum gradation value mean square deviation d
maxratio
and by this ratio
strengthen coefficient standard value λ with predetermined image
0product
be set to the image enhancement coefficient of this pixel, because d (x, y) is necessarily more than or equal to 0 and be less than or equal to d
max, thereby realized at 0~1 times of λ
0scope is interior to belonging to the adjusting of the image enhancement coefficient of flat site pixel;
Wherein, d
maxcan be the gray-scale value mean square deviation d (x of all pixels from current input image, y) in, select maximum one, or, due to when utilizing hardware chip to realize this step, likely due to hardware constraints, cannot obtain the d in the whole two field picture of current input
max, for this situation, the d of some frames before can utilizing
max, but before utilize utilizing the d in some frames
maxtime, likely occur
be greater than 1 situation, now just need by
be clamped to 1.
3) to belonging to any pixel of details area:
According to the mode identical with flat site, the gray-scale value mean square deviation d (x, y) of each pixel neighbors all with it in difference calculating input image;
If ratio corresponding to this pixel is less than the 3rd threshold value T3, represents in details area, to comprise weak edge described in this any pixel, thereby predetermined image is strengthened to coefficient standard value λ
0be set to the image enhancement coefficient of this pixel, i.e. λ (x, y)=λ
0;
If ratio corresponding to this pixel is more than or equal to the 3rd threshold value, represent in details area, to comprise strong edge described in this any pixel, thereby by ratio corresponding to this pixel
strengthen coefficient standard value λ with predetermined image
0product
strengthen coefficient standard value λ with predetermined image again
0sum
be set to the image enhancement coefficient of this pixel,
Like this,, realized at 1~2 times of λ
0scope is interior to belonging to the adjusting of the image enhancement coefficient of details area pixel, and is greater than weak edge for the amplitude of accommodation at strong edge.
In addition, while carrying out image enhancement coefficient adjusting to belonging to any pixel of flat site and details area, all gray-scale value mean square deviation d (x, y) that calculate can be moved to left to 8, now, above-mentioned ratio just can be expressed as
Thus, be less than or equal to 1
become integer d ' (x, y), thereby can be convenient to hardware lookup table; Correspondingly,
with regard to substitution table, be shown
just replace with
Above-mentioned steps 101~102 can realize the control method of image enhancement coefficient in the present embodiment, and step 100 was not necessarily carried out before step 101, it can carry out with step 101~step 102 simultaneously or execution after step 102.
Step 103, utilizes respectively the product of the high fdrequency component of each pixel and the image enhancement coefficient of this pixel in input picture to carry out image enhancement processing, the output image being enhanced.
The processing procedure of this step can be expressed as f ' (x, y)=f (x, y)+λ (x, y) f
h(x, y).Wherein, f ' (x, y) represents the gray-scale value after each pixel that (x, y) in output image gets respectively different value strengthens, and f (x, y) represents that in input picture, (x, y) gets respectively the gray-scale value of each pixel of different value, f
h(x, y) in the input picture that expression step 100 obtains, (x, y) gets respectively the gray-scale value high fdrequency component of each pixel of different value, λ (x, y) in the input picture obtaining for step 102, (x, y) gets respectively the corresponding image enhancement coefficient of each pixel of different value.
So far, this flow process finishes.
As above visible, in the present embodiment, first the control method of image enhancement coefficient and image enchancing method are adjacent the grey value difference degree of pixel according to each pixel in input picture, each pixel is identified as to different picture structure classifications, then, for the image enhancement coefficient of the pixel of different images structured sort, regulate respectively again, make in the image after strengthening, discrete noise is obtained suitable enhancing details area by filtering, flat site can obtain enhancing by a larger margin than flat site, thereby can improve the picture quality after enhancing.
More than the detailed description to the control method of image enhancement coefficient in the present embodiment and image enchancing method, below, then the regulating device of image enhancement coefficient in the present embodiment and image intensifier device are described.
Fig. 3 is the exemplary configurations schematic diagram of image intensifier device in the embodiment of the present invention.As shown in Figure 3, the image intensifier device in the present embodiment comprises: high frequency computing module, textural classification module, classification adjusting module and enhancing processing module.
High frequency computing module, the respectively high fdrequency component of each pixel in calculating input image.
In practical application, a kind of optional processing mode of high frequency computing module is, by input picture is carried out to the high fdrequency component that simple filtering obtains each pixel in input picture, specifically can utilize following masterplate to carry out convolution to each pixel in input picture and the adjacent pixel of this pixel surrounding:
Above-mentioned masterplate Mask take 3 * 3 as example, during to each pixel filter, only consider the surrounding neighbor in its 3 * 3 scope, and in practical application, also can utilize 5 * 5 or the masterplate Mask of other sizes, be that m can get the odd number that is greater than arbitrarily 1, correspondingly, the masterplate Mask expression formula of general m * m is as follows:
Certainly, for the ease of hardware, realize, preferably still adopt 3 * 3 masterplate Mask, like this " 1/ (m according to masterplate Mask
2-1), " during represented division arithmetic, utilize hardware directly to move to right 8.
Textural classification module, is adjacent respectively the grey value difference degree of pixel according to each pixel in input picture, identify the picture structure classification under each pixel, and described picture structure classification comprises discrete noise, flat site and details area.
Because difference maximum between discrete noise, flat site and details area is just the gray-value variation rule between each neighbor, therefore, textural classification module is adjacent the grey value difference degree of pixel according to each pixel in input picture, can identify by the difference of above-mentioned Changing Pattern the picture structure classification under each pixel.
In practical application, a kind of optional processing mode of textural classification module is, analyze the absolute value of difference and the average of each pixel neighbor gray-scale values all with it of each pixel and its each neighbor gray-scale value and carry out recognition image structured sort, this optional mode is than all kinds of modes of utilizing gradient or variance equivalent, realize simply and effective, and textural classification module can specifically comprise: the first calculating sub module and discriminant classification submodule (all not shown in Fig. 3).
The first calculating sub module, respectively the absolute value abs (D of the difference of each pixel and its each neighbor gray-scale value in calculating input image
i) and the average f (x, y) of each pixel neighbor gray-scale values all with it;
Wherein, abs (D
i)=abs (f (P
i)-f (x, y)), f (P
i) be i neighbor, if the neighbor of take in 3 * 3 scopes shown in Fig. 2 is example, i is the positive integer of value in 1~8, in like manner, if neighbor is the neighbor within the scope of n * n, i is that value is at 1~(n
2-1) positive integer in, n gets the odd number that is greater than 1;
Correspondingly, if the neighbor of take in 3 * 3 scopes shown in Fig. 2 is example,
F (x, y) can also be expressed as
In like manner, for the neighbor within the scope of n * n,
Or f (x, y) can also be expressed as
Wherein, f (x+p, y+q) is the grey scale pixel value that the inherent level of pixel space neighborhood to be filtered and vertical direction are offset respectively p and q;
Discriminant classification submodule, for each pixel, analyze respectively:
An if min (abs (D of value minimum in all absolute values corresponding to this pixel
i)) be more than or equal to predetermined first threshold T1, i.e. min (abs (D
i))>=T1, represent that the difference of gray-scale value of this pixel neighbors all with it is all excessive, thereby determine that this pixel belongs to discrete noise;
An if min (abs (D of value minimum in all absolute values corresponding to this pixel
i)) be less than predetermined first threshold T1 but the absolute value of the difference of this grey scale pixel value f (x, y) mean value f (x, y) corresponding with it is less than or equal to predetermined Second Threshold T2, i.e. min (abs (D
i)) < T1, abs (f (x, y)-f (x, y))≤T2, although represent the not difference gray-scale value mean value that all gray-scale value excessive but this pixel is on close level within the scope of its all neighbors of the gray-scale value of neighbors all with it of this pixel, thereby determine that this pixel belongs to flat site;
An if min (abs (D of value minimum in all absolute values corresponding to this pixel
i)) difference that is less than predetermined first threshold T1 and this grey scale pixel value f (x, y) mean value f (x, y) corresponding with it is greater than predetermined Second Threshold T2, i.e. min (abs (D
i)) < T1, abs (f (x, y)-f (x, y)) > T2, represent this pixel not only not the difference of the gray-scale value of neighbors all with it all gray-scale value level excessive and this pixel than the gray-scale value mean value within the scope of its all neighbors, there is enough large difference, thereby determine that this pixel belongs to details area.
In practical application, predetermined first threshold can be got 15~25, preferably be got 20, and predetermined Second Threshold is got 8~16, preferably got 12.
Classification adjusting module, by the image enhancement coefficient that belongs to all pixels of discrete noise be all set to make this pixel after image enhancement processing by the value of filtering high fdrequency component, for example-1, and in the first preset range, regulate respectively the image enhancement coefficient of each pixel belong to flat site, in the second preset range, regulate respectively the image enhancement coefficient of each pixel that belongs to details area, and, the lower limit of the second preset range equals the upper limit of the first preset range, continuous to guarantee to belong to the image enhancement coefficient range of adjustment of pixel of different images structure, for example, the first preset range can strengthen coefficient standard value λ for predetermined image
00~1 times, the second preset range can strengthen coefficient standard value λ for predetermined image
01~2 times.
Specifically, classification adjusting module can comprise: the first assignment submodule, the second calculating sub module, the second assignment submodule, the 3rd assignment submodule (all not shown in Fig. 3).
The first assignment submodule, for all pixels that belong to discrete noise, its λ (x, y)=-1, makes in follow-up enhanced processes the filtering that should cumulative high fdrequency component becomes negative value, realizes pixel high fdrequency component.
The second calculating sub module, the gray-scale value mean square deviation d (x, y) of each pixel neighbors all with it in calculating input image respectively, wherein, if the neighbor of take in 3 * 3 scopes shown in Fig. 2 is example,
In like manner, for the neighbor within the scope of n * n,
The second assignment submodule, to belonging to each pixel of flat site, calculates this pixel corresponding grey scale value mean square deviation d (x, y) and maximum gradation value mean square deviation d
maxratio
and by this ratio
strengthen coefficient standard value λ with predetermined image
0product
be set to the image enhancement coefficient of this pixel, because d (x, y) is necessarily more than or equal to 0 and be less than or equal to d
max, thereby realized at 0~1 times of λ
0scope is interior to belonging to the adjusting of the image enhancement coefficient of flat site pixel;
The 3rd assignment submodule, to belonging to the pixel of flat site, if ratio corresponding to this pixel is less than the 3rd threshold value T3, represents in details area, to comprise weak edge described in this any pixel, thereby predetermined image is strengthened to coefficient standard value λ
0be set to the image enhancement coefficient of this pixel, i.e. λ (x, y)=λ
0;
If ratio corresponding to this pixel is more than or equal to the 3rd threshold value, represent in details area, to comprise strong edge described in this any pixel, thereby by ratio corresponding to this pixel
strengthen coefficient standard value λ with predetermined image
0product
strengthen coefficient standard value λ with predetermined image again
0sum
be set to the image enhancement coefficient of this pixel,
Like this,, realized at 1~2 times of λ
0scope is interior to belonging to the adjusting of the image enhancement coefficient of details area pixel, and is greater than weak edge for the amplitude of accommodation at strong edge;
Wherein, d
maxcan be the gray-scale value mean square deviation d (x of all pixels from current input image, y) in, select maximum one, or, due to when utilizing hardware chip to realize the calculating of gray-scale value mean square deviation, likely due to hardware constraints, cannot obtain the gray-scale value mean square deviation of all pixels in the whole two field picture of current input, for this situation, the d of some frames before can utilizing
max, but before utilize utilizing the d in some frames
maxtime, likely occur
be greater than 1 situation, now just need by
be clamped to 1.
In addition, while carrying out image enhancement coefficient adjusting to belonging to any pixel of flat site and details area, all gray-scale value mean square deviation d (x, y) that calculate can be moved to left to 8, now, above-mentioned ratio just can be expressed as
Thus, be less than or equal to 1
become integer d ' (x, y), thereby can be convenient to hardware lookup table; Correspondingly,
with regard to substitution table, be shown
just replace with
Said structure sort module and classification adjusting module also can be combined as an independently image enhancement coefficient regulating device.
Strengthen processing module, utilize respectively the product of the high fdrequency component of each pixel and the image enhancement coefficient of this pixel in input picture to carry out image enhancement processing, the output image being enhanced.
In practical application, the processing procedure that strengthens processing module can be expressed as f ' (x, y)=f (x, y)+λ (x, y) f
h(x, y).Wherein, f ' (x, y) represents the gray-scale value after each pixel that (x, y) in output image gets respectively different value strengthens, and f (x, y) represents that in input picture, (x, y) gets respectively the gray-scale value of each pixel of different value, f
h(x, y) (x in the input picture that expression high frequency computing module obtains, y) get respectively the gray-scale value high fdrequency component of each pixel of different value, λ (x, y) for (x, y) in the input picture that obtains of classification adjusting module gets respectively the corresponding image enhancement coefficient of each pixel of different value.
As above visible, in the present embodiment, first the regulating device of image enhancement coefficient and image intensifier device are adjacent the grey value difference degree of pixel according to each pixel in input picture, each pixel is identified as to different picture structure classifications, then, for the image enhancement coefficient of the pixel of different images structured sort, regulate respectively again, make in the image after strengthening, discrete noise is obtained suitable enhancing details area by filtering, flat site can obtain enhancing by a larger margin than flat site, thereby can improve the picture quality after enhancing.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of doing, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.