CN108124141B - A kind of image processing method and device - Google Patents
A kind of image processing method and device Download PDFInfo
- Publication number
- CN108124141B CN108124141B CN201711352453.0A CN201711352453A CN108124141B CN 108124141 B CN108124141 B CN 108124141B CN 201711352453 A CN201711352453 A CN 201711352453A CN 108124141 B CN108124141 B CN 108124141B
- Authority
- CN
- China
- Prior art keywords
- channel
- value
- pixel
- area
- channel value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/10—Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
- H04N9/646—Circuits for processing colour signals for image enhancement, e.g. vertical detail restoration, cross-colour elimination, contour correction, chrominance trapping filters
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Color Television Image Signal Generators (AREA)
- Color Image Communication Systems (AREA)
Abstract
This application discloses a kind of image processing method and devices, comprising: determines the first pixel and first area and second area centered on first pixel to be processed in image to be processed, the first area is less than the second area;It determines the pixel for meeting first condition in the first area, according to the average value of the difference between the saturation infromation and preset threshold of the pixel for meeting first condition, determines corresponding first weight in the first area;According to corresponding first weight in the first area, the corresponding channel the U average value of U channel value and the first area to first pixel is weighted and averaged, obtain the false colour precorrection value in the channel U of first pixel, the corresponding channel the V average value of V channel value and the first area to first pixel is weighted and averaged, and obtains the false colour precorrection value in the channel V of first pixel.
Description
Technical field
This application involves technical field of image processing more particularly to a kind of corrections of false colour and chromatic noise suppressing method and dress
It sets.
Background technique
Human eye is that light, there are three kinds of different sensing units, different sensing units based on human eye to the identification of color
There is the principle of different response curves to the light of different-waveband, the perception of color is obtained by the synthesis of brain.In general,
It can the popular decomposition and synthesis that color is understood with the trichromatic concept of red blue green.
In camera imaging system, due to the relationship of lens optical dispersion, lateral chromatic aberration and longitudinal chromatic aberration can be generated, this
A little lateral chromatic aberrations and longitudinal chromatic aberration institute at the edge of image show as purple boundary, it is green while, Huang Bian, indigo plant while etc. false colours, cause image
Distortion, it is therefore desirable to which false colour is corrected.
Summary of the invention
The embodiment of the present application provides a kind of image processing method and device, to realize false colour correction and color noise suppression
System.
To achieve the goals above, the embodiment of the present application provides a kind of image processing method, comprising:
Determine the first pixel and the firstth area centered on first pixel to be processed in image to be processed
Domain and second area, the first area are less than the second area.
The pixel for meeting first condition in the first area is determined, according to the pixel for meeting first condition
The average value of difference between saturation infromation and preset threshold determines corresponding first weight in the first area;Wherein, institute
State pixel of the pixel for meeting first condition for saturation infromation less than the preset threshold, the saturation degree of a pixel
Information is equal to the maximum value among the absolute value of the channel U saturation difference and the absolute value of the channel V saturation difference, and the U is logical
Road saturation difference is equal to U channel value and subtracts U channel value when saturation degree is zero, and the channel V saturation difference is equal to the channel V
Value subtracts V channel value when saturation degree is zero.
U channel value and firstth area according to corresponding first weight in the first area, to first pixel
The corresponding channel the U average value in domain is weighted and averaged, and the false colour precorrection value in the channel U of first pixel is obtained, to institute
The corresponding channel the V average value of V channel value and the first area for stating the first pixel is weighted and averaged, and obtains described first
The false colour precorrection value in the channel V of pixel;Wherein, the corresponding channel the U average value in the first area is the first area
In meet first condition pixel U channel value average value, the corresponding channel the V average value in the first area is described the
Meet the average value of the V channel value of the pixel of first condition in one region.
U channel value and firstth area according to corresponding first weight in the first area, to first pixel
U channel value after image median filter in domain is weighted and averaged, and obtains the false colour correction in the channel the first pixel U
Value, is weighted the V channel value after the image median filter in the V channel value and the first area of first pixel
It is average, obtain the false colour corrected value in the channel the first pixel V;Wherein, the U channel value and V after described image median filtering
Channel value is obtained according to the channel U of first pixel and the false colour precorrection value in the channel V.
Color noise inhibition is carried out to first pixel according to the pixel in the second area, obtains described first
U channel value and V channel value after the inhibition of pixel color noise.
U channel value and the channel U false colour corrected value according to the second weight, after inhibiting to the first pixel color noise
It is weighted and averaged, the V channel value and the channel V false colour corrected value after inhibiting to the first pixel color noise are weighted
Average, after obtaining the first pixel correction U channel value and V channel value.
The image processing method that the embodiment of the present application provides further include:
After obtaining the U channel value and V channel value after the first pixel correction, execute:
If the U channel value after median filtering subtracts the obtained difference of U channel value and described first when saturation degree is zero
The U channel value of pixel subtracts the obtained difference of value in the channel U when saturation degree is zero, is all larger than zero or less than zero, then by institute
The U channel value for stating the first pixel is corrected to the U channel value after the first pixel correction, otherwise, by first pixel
The U channel value of point is set as the value in the channel U when saturation degree is zero.
If the V channel value after median filtering subtracts the obtained difference of V channel value and described first when saturation degree is zero
The V channel value of pixel subtracts the obtained difference of value in the channel V when saturation degree is zero, is all larger than zero or less than zero, then by institute
The V channel value for stating the first pixel is corrected to the V channel value after the first pixel correction, otherwise, by first pixel
The V channel value of point is set as the value in the channel V when saturation degree is zero.
Optionally, according between the channel the U saturation infromation and preset threshold of the pixel for meeting first condition
Between the average value of difference and the channel the V saturation infromation and the preset threshold of the pixel for meeting first condition
The average value of difference determines corresponding first weight in the first area, specifically includes:
Determine the set for meeting the pixel of first condition in the first area.
Determine the tired of the difference value between the saturation infromation and the preset threshold of all pixels point in the set
Adduction, the difference value between the saturation infromation and the preset threshold subtract saturation infromation equal to the preset threshold and obtain
The difference arrived.
According to it is described cumulative and and the set in pixel quantity, determine the first area corresponding first
Weight.
Optionally, according to following formula to the corresponding channel U of the U channel value of first pixel and the first area
Average value is weighted and averaged:
Mean_u_cor=(wt_global*cur_u+ (1-wt_global) * mean_u)
Wherein, mean_u_cor indicates the false colour precorrection value in the channel U of first pixel, and wt_global is indicated
Corresponding first weight in the first area, cur_u indicate the U channel value of first pixel, and mean_u indicates described the
The corresponding channel the U average value in one region.
According to following formula to the corresponding channel the V average value of the V channel value of first pixel and the first area
It is weighted and averaged:
Mean_v_cor=(wt_global*cur_v+ (1-wt_global) * mean_v)
Wherein, mean_v_cor indicates the false colour precorrection value in the channel V of first pixel, described in cur_v expression
The V channel value of first pixel, mean_v indicate the corresponding channel the V average value in the first area.
Optionally, according to following formula in the image in the U channel value and the first area of first pixel
U channel value after value filtering is weighted and averaged:
Fcc_u=(wt_global*cur_u+ (total-wt_global) * med_u)/total
Wherein, fcc_u indicates that the false colour corrected value in the channel the first pixel U, cur_u indicate first pixel
U channel value, wt_global indicates corresponding first weight in the first area, and med_u indicates the figure in the first area
As the U channel value after median filtering.
According to following formula to the image median filter in the V channel value and the first area of first pixel after
V channel value be weighted and averaged:
Fcc_v=(wt_global*cur_v+ (total-wt_global) * med_v)/total
Wherein, fcc_v indicates that the false colour corrected value in the channel the first pixel V, cur_v indicate first pixel
V channel value, med_v indicates the V channel value after the image median filter in the first area.
Optionally, color noise inhibition, tool are carried out to the pixel to be processed according to the pixel in the second area
Body includes:
It is image layered according to the pixel progress in the second area, K tomographic image from low to high is obtained, K is
Integer greater than 1.
Following steps are executed since the image of low frequency: color noise inhibition being carried out to image, after noise suppressed
Image reconstruction obtains the image of higher frequency, and arrives the sequence of high frequency, is filtered to each layer using a bilateral filtering realization.
Optionally, U channel value and the channel U false colour after inhibiting according to following formula to the first pixel color noise
Corrected value is weighted and averaged:
Output_u=alpha*cnr_u+ (1-alpha) * fcc_u
Wherein, output_u indicates the U channel value after the first pixel correction, and alpha indicates second weight,
Cnr_u indicates the U channel value after the first pixel color noise inhibition, and fcc_u indicates the channel U false colour corrected value.
V channel value and the channel V false colour corrected value after inhibiting according to following formula to the first pixel color noise
It is weighted and averaged:
Output_v=alpha*cnr_v+ (1-alpha) * fcc_v
Wherein, output_v indicates the V channel value after the first pixel correction, and cnr_v indicates first pixel
V channel value after point color noise inhibition, fcc_v indicate the channel V false colour corrected value.
Optionally, the first pixel in determination image to be processed, comprising:
Identification obtains the false colour region in the image to be processed.
The first pixel is selected in the false colour region identified.
Optionally, the first area is the block of pixels of M*M, and the second area is the block of pixels of N*N, and M and N are big
In 1 odd number, M is less than N.
In above-described embodiment, false colour correction was not only realized but also had realized color noise inhibition, also mentioned in the embodiment of the present application
It has supplied in a kind of image processing method, can also only carry out false colour correction, specific method can be not repeated herein with aforementioned.
The embodiment of the present application provides a kind of image processing apparatus, comprising:
First pixel determining module, for determining the first pixel in image to be processed and with first pixel
First area and second area centered on point, the first area are less than the second area.
Weight determination module meets for determining the pixel for meeting first condition in the first area according to described
The average value of difference between the saturation infromation and preset threshold of the pixel of first condition determines that the first area is corresponding
The first weight;Wherein, the pixel for meeting first condition is the pixel that saturation infromation is less than the preset threshold,
The saturation infromation of one pixel be equal to the channel U saturation difference absolute value and the channel V saturation difference absolute value it
In maximum value, the channel U saturation difference be equal to U channel value subtract U channel value when saturation degree is zero, the channel V
Saturation difference is equal to V channel value and subtracts V channel value when saturation degree is zero.
False colour precorrection module is used for according to corresponding first weight in the first area, to the U of first pixel
The corresponding channel the U average value of channel value and the first area is weighted and averaged, and obtains the channel U of first pixel
False colour precorrection value, the corresponding channel the V average value of V channel value and the first area to first pixel are weighted
It is average, obtain the false colour precorrection value in the channel V of first pixel;Wherein, the corresponding channel U in the first area is average
Value is the average value for meeting the U channel value of pixel of first condition in the first area, and the corresponding V in the first area is logical
Road average value is the average value for meeting the V channel value of pixel of first condition in the first area.
False colour correction module, for leading to the U of first pixel according to corresponding first weight in the first area
U channel value after image median filter in road value and the first area is weighted and averaged, and obtains the first pixel U
The false colour corrected value in channel, to the V after the image median filter in the V channel value and the first area of first pixel
Channel value is weighted and averaged, and obtains the false colour corrected value in the channel the first pixel V;Wherein, described image median filtering
U channel value and V channel value afterwards is obtained according to the channel U of first pixel and the false colour precorrection value in the channel V.
Color noise suppression module, for carrying out color to first pixel according to the pixel in the second area
Noise suppressed obtains U channel value and V channel value after the first pixel color noise inhibits.
Composed correction module, for the U channel value according to the second weight, after inhibiting to the first pixel color noise
It is weighted and averaged with the channel U false colour corrected value, V channel value and the channel V after inhibiting to the first pixel color noise
False colour corrected value is weighted and averaged, the U channel value and V channel value after obtaining the first pixel correction.
Image processing apparatus provided by the embodiments of the present application further includes overcorrect protective module, and overcorrect protective module is used
In:
After obtaining the U channel value and V channel value after the first pixel correction, execute:
If the U channel value after median filtering subtracts the obtained difference of U channel value and described first when saturation degree is zero
The U channel value of pixel subtracts the obtained difference of value in the channel U when saturation degree is zero, is all larger than zero or less than zero, then by institute
The U channel value for stating the first pixel is corrected to the U channel value after the first pixel correction, otherwise, by first pixel
The U channel value of point is set as the value in the channel U when saturation degree is zero.
If the V channel value after median filtering subtracts the obtained difference of V channel value and described first when saturation degree is zero
The V channel value of pixel subtracts the obtained difference of value in the channel V when saturation degree is zero, is all larger than zero or less than zero, then by institute
The V channel value for stating the first pixel is corrected to the V channel value after the first pixel correction, otherwise, by first pixel
The V channel value of point is set as the value in the channel V when saturation degree is zero.
In another image processing apparatus provided by the embodiments of the present application, false colour correction can also be only carried out, it is specific to fill
Setting can be not repeated herein with aforementioned.
In above-described embodiment of the application, the first weight can be determined according to the pixel to be processed in image to be processed, into
And the false colour precorrection value and false colour corrected value in the available channel image U to be processed and the channel V, can also to second area into
Row color noise inhibits, and finally mixes corrected value, more efficiently carries out image procossing, reduce logic redundancy.
Detailed description of the invention
Fig. 1 is the image processing method flow diagram that the embodiment of the present application is applicable in;
Fig. 2 is the image slide window schematic diagram being applicable in the embodiment of the present application;
Fig. 3 is a kind of color noise suppressing method flow diagram provided by the embodiments of the present application;
Fig. 4 is image processing apparatus schematic diagram provided by the embodiments of the present application.
Specific embodiment
Image processing method provided by the embodiments of the present application is handled image in YUV color space.In YUV color
In space, Y indicates brightness (Luminance or Luma), that is, grayscale value;What U and V was indicated is then coloration
(Chrominance or Chroma) effect is the color and saturation degree for describing image, the color for specified pixel.YUV color
The luminance signal Y and carrier chrominance signal U, V in space are separation.
It represents U signal component using the channel U in the application embodiment below, represent V signal component with the channel V.
The embodiment of the present application is described in detail with reference to the accompanying drawing.
Under normal circumstances, false colour is present in image border, in this kind of high-frequency region of texture, and it is flat that color noise is present in image
False color in blocks is presented in smooth low frequency region and on image.Based on the feature, using different big in the embodiment of the present application
Small region is handled respectively.
The process that false colour correction and color noise inhibition are carried out to image to be processed is described in process shown in FIG. 1.It should
Process can be executed by image processing apparatus, which perhaps by software realization or can pass through software and hardware by hardware realization
The mode combined is realized.As shown, this method can include:
Step 101: determine the first pixel to be processed in image to be processed and centered on the first pixel
One region and second area.
In the step, place can also be treated respectively using each pixel in image to be processed as pixel to be processed
False colour region in reason image is identified, selects pixel to be processed in the false colour region identified.
Wherein, the first area can be the block of pixels of M*M, and the second area can be the block of pixels of N*N, M and N
It is the integer greater than 1, M is less than N.In order to preferably remove false colour, M and N can be the odd number greater than 1 with value.If passed through
Image slide window is operated, and will cause the translation of certain distance on image with even number window, (image is moved integrally to a direction
Certain distance), and odd number window is not in this phenomenon.
When it is implemented, the image slide window of settable M*M pixel, extends to the outside M/2 pixel for image to be processed, such as
Shown in Fig. 2.The abducent part shadow representation of image to be processed, most intermediate box indicate to choose the image of M*M pixel
Selectable pixel to be processed when sliding window.Specifically, the mode that pixel mirror image can be used is extended, for example, in Fig. 2
The pixel A ' of expansion be in image to be processed pixel A along the mirror image of edge x.By the image slide window with a pixel
To be slided in the image of step-length after expansion, several first areas can be chosen in this way, the pixel in the first area
Pixel as to be processed.
If carrying out false colour region recognition to image to be processed, false colour region is obtained, then image slide can be used at this
Pixel and first area and second area centered on the pixel to be processed to be processed are chosen in false colour region.
Step 102: U channel value and V channel value based on the pixel in first area calculate first in first area
Corresponding first weight of pixel.Specifically, it is determined that meet the pixel of first condition in first area, according to meeting first
The average value of difference between the saturation infromation and preset threshold of the pixel of part determines corresponding first power of the first pixel
Weight.
Specifically, it is determined that meeting the set of the pixel of first condition in the first area;For in the set
Each pixel calculates the saturation infromation of the pixel, the difference between the saturation infromation and preset threshold of all pixels point
Value cumulative and, the difference value between the saturation infromation and the preset threshold is equal to the preset threshold and subtracts saturation degree
The difference that information obtains;According to it is described cumulative and and the set in pixel quantity, determine that the first pixel is corresponding
The first weight.
Wherein, the saturation infromation of a pixel can be used for characterizing between the saturation degree of the pixel and zero saturation degree
Distance.The saturation infromation of one pixel can obtain in the following way: take the absolute value of the channel U saturation difference and V logical
Maximum value among the absolute value of road saturation difference, it is zero that the channel U saturation difference, which is equal to U channel value to subtract saturation degree,
When U channel value, the channel V saturation difference be equal to V channel value subtract V channel value when saturation degree is zero.Above-mentioned determination
Method can be indicated with following equation 1:
Diff=MAX (abs (inDataM*M (i, j) -128), abs (refDataM*M (i, j) -128)) ... 1
Wherein, DataM*M (i, j) indicates coordinate is (i, j) pixel, which is in the first area of M*M size
Centre coordinate point, inDataM*M (i, j) indicates the U channel value of the pixel, and refDataM*M (i, j) indicates the pixel
V channel value, U channel value and V channel value when saturation degree is zero are respectively 128.MAX () expression takes the larger value, and diff indicates to sit
It is designated as the saturation infromation of (i, j) pixel.
Wherein, the pixel for meeting first condition is pixel of the saturation infromation less than preset threshold.The default threshold
The value range of value is [0,128], and preferred preset threshold is 10.
It, can be for the first pixel (such as regional center in a first area or the first area in the step
The pixel of position) determine that corresponding first weight, the weight can be used in subsequent false colour correction course using.First weight
It can be calculated according to following equation 2:
Wherein, wt indicates corresponding first weight of the first pixel, and difference_sum indicates to meet in first area
(thr1-diff) value of the pixel of first condition it is cumulative and, (thr1-diff) value of a pixel subtracts for preset threshold
The obtained difference of the saturation infromation of the pixel;Num indicates the quantity for meeting the pixel of first condition in first area.
Step 103: according to corresponding first weight of the first pixel determined in step 102 and the first pixel
Color Channel, to the first pixel carry out false colour precorrection.Specifically, right according to corresponding first weight of the first pixel
The corresponding channel the U average value of the U channel value of first pixel and first area is weighted and averaged, and obtains the U of the first pixel
The false colour precorrection value in channel is weighted the corresponding channel the V average value of the V channel value of the first pixel and first area flat
, the false colour precorrection value in the channel V of the first pixel is obtained.
In the step, the U channel value to the first pixel and V channel value false colour precorrection can be carried out respectively.
For the channel U of the first pixel, following procedure can be used and carry out false colour precorrection: it is corresponding to calculate first area
The channel U average value, the value are the average value for meeting the U channel value of pixel of first condition in first area;By to first
The corresponding channel the U average value of the U channel value of pixel and first area is weighted and averaged, and obtains the channel U of the first pixel
False colour precorrection value, can specifically be calculated according to following equation 3:
Mean_u_cor=(wt_global*cur_u+ (1-wt_global) * mean_u) ... formula 3
Wherein, mean_u_cor indicates the false colour precorrection value in the channel U of the first pixel, and wt_global indicates first
Corresponding first weight of pixel, cur_u indicate the U channel value of the first pixel, and mean_u indicates that the corresponding U in first area is logical
Road average value.
For the channel V of the first pixel, following procedure can be used and carry out false colour precorrection: it is corresponding to calculate first area
The channel V average value, the value are the average value for meeting the V channel value of pixel of first condition in first area;By to first
The corresponding channel the V average value of the V channel value of pixel and first area is weighted and averaged, and obtains the channel V of the first pixel
False colour precorrection value, can specifically be calculated according to following equation 4:
Mean_v_cor=(wt_global*cur_v+ (1-wt_global) * mean_v) ... formula 4
Wherein, mean_v_cor indicates the false colour precorrection value in the channel V of the first pixel, and cur_v indicates the first pixel
The V channel value of point, mean_v indicate the corresponding channel the V average value in the corresponding first area of the first pixel.
Step 104: according to corresponding first weight of the first pixel determined in step 102 and the first pixel
Color Channel and median-filtered result, to the first pixel carry out false colour precorrection.Specifically, according to the first pixel pair
The first weight answered adds the U channel value after the image median filter in the U channel value of the first pixel and first area
Weight average obtains the false colour corrected value in the first channel pixel U, to the figure in the V channel value of the first pixel and first area
As the V channel value after median filtering is weighted and averaged, the false colour corrected value in the first channel pixel V is obtained.
Wherein, the U channel value after described image median filtering and V channel value are logical according to the channel U of the first pixel and V
What the false colour precorrection value in road obtained.
Specifically, the image intermediate value in the U channel value and the first area of the first pixel is filtered according to following equation 5
U channel value after wave is weighted and averaged:
Fcc_u=(wt_global*cur_u+ (total-wt_global) * med_u)/total ... formula 5
Wherein, fcc_u indicates that the false colour corrected value in the first channel pixel U, cur_u indicate the channel U of the first pixel
Value, wt_global indicates corresponding first weight of the first pixel, after med_u indicates the image median filter in first area
U channel value.
According to following equation 6 to the channel V after the image median filter in the V channel value of the first pixel and first area
Value is weighted and averaged:
Fcc_v=(wt_global*cur_v+ (total-wt_global) * med_v)/total ... formula 6
Wherein, fcc_v indicates that the false colour corrected value in the first channel pixel V, cur_v indicate the channel V of the first pixel
Value, med_v indicate the V channel value after the image median filter in first area.
Step 105: color noise inhibition being carried out to the first pixel according to the pixel in second area, obtains the first picture
U channel value and V channel value after the inhibition of vegetarian refreshments color noise.
The embodiment of the present application can be used multiple color noise suppressing method, the embodiment of the present application to this with no restriction.In order to
Preferable color noise inhibitory effect is obtained, a kind of color noise inhibition side used by the embodiment of the present application has been illustrated below
Method:
The image in first area is layered using gaussian pyramid technology, is obtained from low frequency region to high-frequency region
Multiple figure layers;According to the sequence from low frequency region to high-frequency region, color noise inhibition is carried out to a figure layer, and according to face
Figure layer after coloured noise inhibits reconstructs to obtain the next stage figure layer of the figure layer, until reconstruct obtains the figure layer of lowest frequency, according to this
The Color Channel for reconstructing pixel corresponding with the first vegetarian refreshments position in the figure layer of obtained lowest frequency, can be obtained first picture
Color Channel after the inhibition of vegetarian refreshments color noise.One example of the above method can be as shown in Figure 3.
As shown in figure 3, the process can include:
S301: the image in first area is layered, and may include according to the sequence from high-frequency region to low frequency region
First to N figure layer.
S302: setting K value is 1, is transferred to S303;
S303: carrying out color noise filtering to k-th figure layer, reconstructs the K+1 figure layer with filtered k-th figure layer,
It is transferred to S304;
Wherein, the method that bilateral filtering can be used carries out color noise filtering to k-th figure layer.For example, if k-th figure
The size of layer is L ﹡ L pixel, can calculate separately the intensity weight and object of each pixel and central pixel point in k-th figure layer
Distance weighting is managed, the channel U of k-th figure layer and the channel V are carried out respectively according to intensity weight and physical distance weight bilateral
Filtering, wherein carrying out bilateral filtering to the channel U can carry out according to following formula 7, and the U channel layer color for obtaining k-th figure layer is made an uproar
Sound suppression result cnr_u_L*L:
Wherein, σdAnd σrIt can be that σ is arranged in different figure layers according to picture noise level for pre- calibrating parametersdAnd σrTake
Value.D (k, l) indicates that coordinate is that the pixel of (k, l) and the physical distance of the central pixel point of the figure layer are weighed in k-th figure layer
Weight, r (k, l) indicate k-th figure layer in coordinate be (k, l) pixel and the figure layer central pixel point intensity weight,
InData_uL*L (L/2, L/2) indicates U channel value of the coordinate for the pixel of (L/2, L/2), inData_ in k-th figure layer
UL*L (k, l) indicates that coordinate is the U channel value of the pixel of (k, l) in k-th figure layer.
Carrying out bilateral filtering to the channel U can carry out according to following formula 8, obtain the V channel layer color noise of k-th figure layer
Suppression result cnr_v_L*L:
Wherein, wherein σdAnd σrIt can be that σ is arranged in different figure layers according to picture noise level for pre- calibrating parametersdAnd σr
Value.D (k, l) indicates that coordinate is the physical distance of the pixel of (k, l) and the central pixel point of the figure layer in k-th figure layer
Weight, r (k, l) indicate k-th figure layer in coordinate be (k, l) pixel and the figure layer central pixel point intensity weight,
InData_vL*L (L/2, L/2) indicates V channel value of the coordinate for the pixel of (L/2, L/2), inData_ in k-th figure layer
VL*L (k, l) indicates that coordinate is the V channel value of the pixel of (k, l) in k-th figure layer.
S304: carrying out the value of K incremental, judges whether the value of K reaches N, if not up to, being transferred to S303, otherwise,
It is transferred to S305;
S305: will in the obtained n-th figure layer of reconstruct the U channel value of pixel corresponding with pixel position to be processed and
V channel value, U channel value and V channel value after inhibiting as pixel color noise to be processed.
Step 106: according to the second weight, and based on the channel value and false colour corrected value after color noise inhibition, determining most
Whole channel correcting value.Specifically, can be according to the second weight, the U channel value and U after inhibiting to the first pixel color noise are logical
Road false colour corrected value is weighted and averaged, and the U channel value after obtaining the correction of the first pixel presses down the first pixel color noise
V channel value and the channel V false colour corrected value after system are weighted and averaged, the V channel value after obtaining the correction of the first pixel.
Wherein, the second weight can be preset.The value range of second weight can be (0~1).The value of second weight
It is related to ambient brightness.
When it is implemented, following formula, which can be used, calculates final U channel correcting value:
Output_u=alpha*cnr_u+ (1-alpha) * fcc_u ... formula 9
Following formula can be used and calculate final V channel correcting value:
Output_v=alpha*cnr_v+ (1-alpha) * fcc_v ... formula 10
Wherein, fcc_u indicates that the false colour corrected value in the channel U, fcc_v indicate that the false colour corrected value in the channel V, cnr_u indicate
U channel value after color noise inhibition, cnr_v indicate the V channel value after color noise inhibition, and alpha indicates the second weight.
Based on above-mentioned formula 9 and formula 10, under normal circumstances, environment is darker, and noise is more serious, therefore can set alpha
It is set to the larger value;Conversely, environment is brighter, noise is smaller, then can set smaller value for alpha.
Based on above-mentioned process, false colour correction and color noise suppression can be carried out for each pixel in image to be processed
System, or false colour correction and color noise inhibition are carried out for each pixel in the false colour region in image to be processed.
After carrying out false colour correction and color noise inhibition through the foregoing embodiment, it is possible to produce be corrected the U of pixel
The case where people having a common goal's value or V channel value cross over 128 (saturation degree 0), i.e., become another color from a kind of color, such as becomes from red
Au bleu, such case are known as overcorrect.In order to avoid this overcorrect, the embodiment of the present application provides overcorrect protection side
The value of its respective channel can be corrected to 128 for the pixel that the channel U or the overcorrect of the channel V occurs by case.
Specifically, following steps can be executed after above-mentioned steps 106:
Step 107: for the first pixel after correction, judging the U channel value of the first pixel respectively and V channel value is
U channel value is corrected to 128, otherwise keeps the value in the channel U not by no generation overcorrect if overcorrect occurs for U channel value
Become, if overcorrect occurs for V channel value, V channel value is corrected to 128, otherwise keeps the value in the channel V constant.
Wherein, it can judge that U of first pixel after above-mentioned correction process in first area is logical in the following way
Whether road value occurs overcorrect: if it is zero that the U channel value after the median filtering of the pixel in the first area, which subtracts saturation degree,
When U channel value (128) obtained difference and first pixel correction before U channel value subtract U when saturation degree is zero
Channel value (i.e. 128) obtained difference, is all larger than zero or less than zero, then the U channel value after first pixel correction is not sent out
Raw overcorrect, otherwise overcorrect occurs for the U channel value after first pixel correction.
Similarly, V of first pixel after above-mentioned correction process in first area can also be judged according to the method described above
Whether channel value occurs overcorrect: being if the V channel value after the median filtering of the pixel in the first area subtracts saturation degree
It is zero that V channel value before the obtained difference of V channel value (128) and first pixel correct when zero, which subtracts saturation degree,
When V channel value (128) obtained difference, be all larger than zero or less than zero, then the V channel value after first pixel correction is not
Overcorrect occurs, otherwise overcorrect occurs for the V channel value after first pixel correction.
In conclusion image processing method provided in the embodiment of the present application is according to the picture to be processed in image to be processed
Vegetarian refreshments determines the first weight, and then the false colour precorrection value and false colour in the available channel image U to be processed and the channel V correct
Value can also carry out color noise inhibition to second area, finally mix corrected value, more efficiently carry out image procossing,
Reduce logic redundancy.
In above-described embodiment, false colour correction had not only been realized by step 101 to step 106 but also has realized color noise suppression
System can also only carry out false colour correction in a further embodiment, specific method can same previous embodiment, be not repeated herein.
Based on the same technical idea, the embodiment of the present application also provides a kind of device, and it is real which can be performed the above method
Apply example.As shown in figure 4, the image processing apparatus includes:
First pixel determining module 401, for determining the first pixel in image to be processed and with described first
First area and second area centered on pixel, the first area are less than the second area;
Weight determination module 402, for determining the pixel for meeting first condition in the first area, according to the symbol
The average value for closing the difference between the saturation infromation and preset threshold of the pixel of first condition, determines the first area pair
The first weight answered;Wherein, the pixel for meeting first condition is the pixel that saturation infromation is less than the preset threshold
The saturation infromation of point, a pixel is equal to the absolute value of the channel U saturation difference and the absolute value of the channel V saturation difference
Among maximum value, the channel U saturation difference is equal to U channel value and subtracts U channel value when saturation degree is zero, and the V is logical
Road saturation difference is equal to V channel value and subtracts V channel value when saturation degree is zero;
False colour precorrection module 403 is used for according to corresponding first weight in the first area, to first pixel
The corresponding channel the U average value of U channel value and the first area be weighted and averaged, the U for obtaining first pixel is logical
The false colour precorrection value in road, the corresponding channel the V average value of V channel value and the first area to first pixel carry out
Weighted average, obtains the false colour precorrection value in the channel V of first pixel;Wherein, the corresponding channel U in the first area
Average value is the average value for meeting the U channel value of pixel of first condition in the first area, and the first area is corresponding
The channel V average value be the first area in meet first condition pixel V channel value average value;
False colour correction module 404 is used for according to corresponding first weight in the first area, to first pixel
U channel value after image median filter in U channel value and the first area is weighted and averaged, and obtains first pixel
The false colour corrected value in the channel point U, after the image median filter in the V channel value and the first area of first pixel
V channel value be weighted and averaged, obtain the false colour corrected value in the channel the first pixel V;Wherein, described image intermediate value is filtered
U channel value and V channel value after wave are obtained according to the channel U of first pixel and the false colour precorrection value in the channel V;
Color noise suppression module 405, for being carried out according to the pixel in the second area to first pixel
Color noise inhibits, and obtains U channel value and V channel value after the first pixel color noise inhibits;
Composed correction module 406, for according to the second weight, the U after inhibiting to the first pixel color noise to be logical
Road value and the channel U false colour corrected value are weighted and averaged, V channel value and V after inhibiting to the first pixel color noise
Channel false colour corrected value is weighted and averaged, the U channel value and V channel value after obtaining the first pixel correction.
Image processing apparatus provided by the embodiments of the present application further includes overcorrect protective module, and overcorrect protective module is used
In:
After obtaining the U channel value and V channel value after the first pixel correction, execute:
If the U channel value after median filtering subtracts the obtained difference of U channel value and described first when saturation degree is zero
The U channel value of pixel subtracts the obtained difference of value in the channel U when saturation degree is zero, is all larger than zero or less than zero, then by institute
The U channel value for stating the first pixel is corrected to the U channel value after the first pixel correction, otherwise, by first pixel
The U channel value of point is set as the value in the channel U when saturation degree is zero;
If the V channel value after median filtering subtracts the obtained difference of V channel value and described first when saturation degree is zero
The V channel value of pixel subtracts the obtained difference of value in the channel V when saturation degree is zero, is all larger than zero or less than zero, then by institute
The V channel value for stating the first pixel is corrected to the V channel value after the first pixel correction, otherwise, by first pixel
The V channel value of point is set as the value in the channel V when saturation degree is zero.
Wherein, weight determination module 402 is specifically used for:
Determine the set for meeting the pixel of first condition in the first area;
Determine the tired of the difference value between the saturation infromation and the preset threshold of all pixels point in the set
Adduction, the difference value between the saturation infromation and the preset threshold subtract saturation infromation equal to the preset threshold and obtain
The difference arrived;
According to it is described cumulative and and the set in pixel quantity, determine the first area corresponding first
Weight.
Wherein, color noise suppression module 405 is specifically used for:
It is image layered according to the pixel progress in the second area, K tomographic image from low to high is obtained, K is
Integer greater than 1;
Following steps are executed since the image of low frequency: color noise inhibition being carried out to image, after noise suppressed
Image reconstruction obtains the image of higher frequency, and arrives the sequence of high frequency, is filtered to each layer using a bilateral filtering realization.
Wherein, the U after composed correction module 406 inhibits the first pixel color noise according to above-mentioned formula 9 is logical
Road value and the channel U false colour corrected value are weighted and averaged.
V channel value and the channel V false colour after inhibiting according to above-mentioned formula 10 to the first pixel color noise correct
Value is weighted and averaged.
In a further embodiment, can also only carry out false colour correction, specific device can same previous embodiment, herein no longer
It repeats.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of the application has been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the application range.
Obviously, those skilled in the art can carry out various modification and variations without departing from the essence of the application to the application
Mind and range.In this way, if these modifications and variations of the application belong to the range of the claim of this application and its equivalent technologies
Within, then the application is also intended to include these modifications and variations.
Claims (24)
1. a kind of image processing method characterized by comprising
Determine the first pixel to be processed in image to be processed and first area centered on first pixel and
Second area, the first area are less than the second area;
The pixel for meeting first condition in the first area is determined, according to the saturation of the pixel for meeting first condition
The average value for spending the difference between information and preset threshold, determines corresponding first weight in the first area;Wherein, the symbol
The pixel for closing first condition is pixel of the saturation infromation less than the preset threshold, the saturation infromation of a pixel
Equal to the maximum value among the absolute value of the channel U saturation difference and the absolute value of the channel V saturation difference, the channel U is full
It is equal to U channel value with degree difference and subtracts U channel value when saturation degree is zero, the channel V saturation difference is equal to V channel value and subtracts
V channel value when desaturation degree is zero;
U channel value and the first area pair according to corresponding first weight in the first area, to first pixel
The channel the U average value answered is weighted and averaged, and obtains the false colour precorrection value in the channel U of first pixel, to described
The corresponding channel the V average value of the V channel value of one pixel and the first area is weighted and averaged, and obtains first pixel
The false colour precorrection value in the channel V of point;Wherein, the corresponding channel the U average value in the first area is to accord in the first area
The average value of the U channel value of the pixel of first condition is closed, the corresponding channel the V average value in the first area is firstth area
Meet the average value of the V channel value of the pixel of first condition in domain;
According to corresponding first weight in the first area, in the U channel value and the first area of first pixel
Image median filter after U channel value be weighted and averaged, obtain the false colour corrected value in the channel the first pixel U, it is right
The V channel value after image median filter in the V channel value and the first area of first pixel is weighted and averaged,
Obtain the false colour corrected value in the channel the first pixel V;Wherein, the U channel value and V channel value after described image median filtering
It is to be obtained according to the channel U of first pixel and the false colour precorrection value in the channel V;
Color noise inhibition is carried out to first pixel according to the pixel in the second area, obtains first pixel
U channel value and V channel value after point color noise inhibition;
According to the second weight, U channel value and the channel U false colour corrected value after inhibiting to the first pixel color noise are carried out
Weighted average, V channel value and the channel V false colour corrected value after inhibiting to the first pixel color noise are weighted flat
, U channel value and V channel value after obtaining the first pixel correction.
2. the method as described in claim 1, which is characterized in that further include:
After obtaining the U channel value and V channel value after the first pixel correction, execute:
If the U channel value after median filtering subtracts the obtained difference of U channel value and first pixel when saturation degree is zero
The U channel value of point subtracts the obtained difference of value in the channel U when saturation degree is zero, is all larger than zero or less than zero, then by described the
The U channel value of one pixel is corrected to the U channel value after the first pixel correction, otherwise, by the U of first pixel
Channel value is set as the value in the channel U when saturation degree is zero;
If the V channel value after median filtering subtracts the obtained difference of V channel value and first pixel when saturation degree is zero
The V channel value of point subtracts the obtained difference of value in the channel V when saturation degree is zero, is all larger than zero or less than zero, then by described the
The V channel value of one pixel is corrected to the V channel value after the first pixel correction, otherwise, by the V of first pixel
Channel value is set as the value in the channel V when saturation degree is zero.
3. the method as described in claim 1, which is characterized in that full according to the channel U of the pixel for meeting first condition
The average value of difference between degree information and preset threshold and the channel the V saturation degree of the pixel for meeting first condition
The average value of difference between information and the preset threshold determines corresponding first weight in the first area, specifically includes:
Determine the set for meeting the pixel of first condition in the first area;
Determine the cumulative of the difference value between the saturation infromation and the preset threshold of all pixels point in the set and,
Difference value between the saturation infromation and the preset threshold is equal to the preset threshold and subtracts what saturation infromation obtained
Difference;
According to it is described cumulative and and the set in pixel quantity, determine corresponding first power in the first area
Weight.
4. the method as described in claim 1, which is characterized in that according to following formula to the U channel value of first pixel
The channel U corresponding with first area average value is weighted and averaged:
Mean_u_cor=(wt_global*cur_u+ (1-wt_global) * mean_u)
Wherein, mean_u_cor indicates the false colour precorrection value in the channel U of first pixel, described in wt_global expression
Corresponding first weight in first area, cur_u indicate the U channel value of first pixel, and mean_u indicates firstth area
The corresponding channel the U average value in domain;
The corresponding channel the V average value of the V channel value of first pixel and the first area is carried out according to following formula
Weighted average:
Mean_v_cor=(wt_global*cur_v+ (1-wt_global) * mean_v)
Wherein, mean_v_cor indicates the false colour precorrection value in the channel V of first pixel, and cur_v indicates described first
The V channel value of pixel, mean_v indicate the corresponding channel the V average value in the first area.
5. the method as described in claim 1, which is characterized in that according to following formula to the U channel value of first pixel
It is weighted and averaged with the U channel value after the image median filter in the first area:
Fcc_u=(wt_global*cur_u+ (total_u-wt_global) * med_u)/total_u
Wherein, fcc_u indicates that the false colour corrected value in the channel the first pixel U, cur_u indicate the U of first pixel
Channel value, wt_global indicate corresponding first weight in the first area, and med_u indicates the image in the first area
U channel value after median filtering, total_u indicate weight shared by the U channel value of first pixel and the first area
In image median filter after U channel value shared by the sum of weight;
According to following formula to the V after the image median filter in the V channel value and the first area of first pixel
Channel value is weighted and averaged:
Fcc_v=(wt_global*cur_v+ (total_v-wt_global) * med_v)/total_v
Wherein, fcc_v indicates that the false colour corrected value in the channel the first pixel V, cur_v indicate the V of first pixel
Channel value, med_v indicate the V channel value after the image median filter in the first area, and total_v indicates first picture
The sum of weight shared by weight shared by the V channel value of vegetarian refreshments and the V channel value after the image median filter in the first area.
6. the method as described in claim 1, which is characterized in that according to the pixel in the second area to described to be processed
Pixel carries out color noise inhibition, specifically includes:
It is image layered according to the pixel progress in the second area, K tomographic image from low to high is obtained, K is greater than 1
Integer;
Following steps are executed since the image of low frequency: color noise inhibition being carried out to image, according to the image after noise suppressed
Reconstruct obtains the image of higher frequency, and arrives the sequence of high frequency, is filtered to each layer using a bilateral filtering realization.
7. the method as described in claim 1, which is characterized in that press down according to following formula to the first pixel color noise
U channel value and the channel U false colour corrected value after system are weighted and averaged:
Output_u=alpha*cnr_u+ (1-alpha) * fcc_u
Wherein, output_u indicates the U channel value after the first pixel correction, and alpha indicates second weight, cnr_
U indicates the U channel value after the first pixel color noise inhibition, and fcc_u indicates the channel U false colour corrected value;
V channel value and the channel V false colour corrected value after inhibiting according to following formula to the first pixel color noise carry out
Weighted average:
Output_v=alpha*cnr_v+ (1-alpha) * fcc_v
Wherein, output_v indicates the V channel value after the first pixel correction, and cnr_v indicates the first pixel face
V channel value after coloured noise inhibition, fcc_v indicate the channel V false colour corrected value.
8. the method as described in claim 1, which is characterized in that the first pixel in the determination image to be processed, comprising:
Identification obtains the false colour region in the image to be processed;
The first pixel is selected in the false colour region identified.
9. such as method described in any item of the claim 1 to 8, which is characterized in that the first area is the block of pixels of M*M,
The second area is the block of pixels of N*N, and M and N are the odd number greater than 1, and M is less than N.
10. a kind of image processing method characterized by comprising
Determine the first pixel in image to be processed and the first area centered on first pixel;
The pixel for meeting first condition in the first area is determined, according to the saturation of the pixel for meeting first condition
The average value for spending the difference between information and preset threshold, determines corresponding first weight in the first area;Wherein, the symbol
The pixel for closing first condition is pixel of the saturation infromation less than the preset threshold, the saturation infromation of a pixel
Equal to the maximum value among the absolute value of the channel U saturation difference and the absolute value of the channel V saturation difference, the channel U is full
It is equal to U channel value with degree difference and subtracts U channel value when saturation degree is zero, the channel V saturation difference is equal to V channel value and subtracts
V channel value when desaturation degree is zero;
U channel value and the first area pair according to corresponding first weight in the first area, to first pixel
The channel the U average value answered is weighted and averaged, and obtains the false colour precorrection value in the channel U of first pixel, to described
The corresponding channel the V average value of the V channel value of one pixel and the first area is weighted and averaged, and obtains first pixel
The false colour precorrection value in the channel V of point;Wherein, the corresponding channel the U average value in the first area is to accord in the first area
The average value of the U channel value of the pixel of first condition is closed, the corresponding channel the V average value in the first area is firstth area
Meet the average value of the V channel value of the pixel of first condition in domain;
According to corresponding first weight in the first area, in the U channel value and the first area of first pixel
Image median filter after U channel value be weighted and averaged, obtain the false colour corrected value in the channel the first pixel U, it is right
The V channel value after image median filter in the V channel value and the first area of first pixel is weighted and averaged,
Obtain the false colour corrected value in the channel the first pixel V;Wherein, the U channel value and V channel value after described image median filtering
It is to be obtained according to the channel U of first pixel and the false colour precorrection value in the channel V.
11. method as claimed in claim 10, which is characterized in that further include:
After obtaining the U channel value and V channel value after the first pixel correction, execute:
If the U channel value after median filtering subtracts the obtained difference of U channel value and first pixel when saturation degree is zero
The U channel value of point subtracts the obtained difference of value in the channel U when saturation degree is zero, is all larger than zero or less than zero, then by described the
The U channel value of one pixel is corrected to the U channel value after the first pixel correction, otherwise, by the U of first pixel
Channel value is set as the value in the channel U when saturation degree is zero;
If the V channel value after median filtering subtracts the obtained difference of V channel value and first pixel when saturation degree is zero
The V channel value of point subtracts the obtained difference of value in the channel V when saturation degree is zero, is all larger than zero or less than zero, then by described the
The V channel value of one pixel is corrected to the V channel value after the first pixel correction, otherwise, by the V of first pixel
Channel value is set as the value in the channel V when saturation degree is zero.
12. method as claimed in claim 10, which is characterized in that according to the channel U of the pixel for meeting first condition
The channel V of the average value of difference between saturation infromation and preset threshold and the pixel for meeting first condition saturation
The average value for spending the difference between information and the preset threshold, determines corresponding first weight in the first area, specific to wrap
It includes:
Determine the set for meeting the pixel of first condition in the first area;
Determine the cumulative of the difference value between the saturation infromation and the preset threshold of all pixels point in the set and,
Difference value between the saturation infromation and the preset threshold is equal to the preset threshold and subtracts what saturation infromation obtained
Difference;
According to it is described cumulative and and the set in pixel quantity, determine corresponding first power in the first area
Weight.
13. method as claimed in claim 10, which is characterized in that according to following formula to the channel U of first pixel
The corresponding channel the U average value of value and the first area is weighted and averaged:
Mean_u_cor=(wt_global*cur_u+ (1-wt_global) * mean_u)
Wherein, mean_u_cor indicates the false colour precorrection value in the channel U of first pixel, described in wt_global expression
Corresponding first weight in first area, cur_u indicate the U channel value of first pixel, and mean_u indicates firstth area
The corresponding channel the U average value in domain;
The corresponding channel the V average value of the V channel value of first pixel and the first area is carried out according to following formula
Weighted average:
Mean_v_cor=(wt_global*cur_v+ (1-wt_global) * mean_v)
Wherein, mean_v_cor indicates the false colour precorrection value in the channel V of first pixel, and cur_v indicates described first
The V channel value of pixel, mean_v indicate the corresponding channel the V average value in the first area.
14. method as claimed in claim 10, which is characterized in that according to following formula to the channel U of first pixel
U channel value after image median filter in value and the first area is weighted and averaged:
Fcc_u=(wt_global*cur_u+ (total_u-wt_global) * med_u)/total_u
Wherein, fcc_u indicates that the false colour corrected value in the channel the first pixel U, cur_u indicate the U of first pixel
Channel value, wt_global indicate corresponding first weight in the first area, and med_u indicates the image in the first area
U channel value after median filtering, total_u indicate weight shared by the U channel value of first pixel and the first area
In image median filter after U channel value shared by the sum of weight;
According to following formula to the image median filter in the V channel value and the first area of the pixel to be processed after
V channel value is weighted and averaged:
Fcc_v=(wt_global*cur_v+ (total_v-wt_global) * med_v)/total_v
Wherein, fcc_v indicates that the false colour corrected value in the channel pixel V to be processed, cur_v indicate first pixel
V channel value, med_v indicate the V channel value after the image median filter in the first area, and total_v indicates described first
The sum of weight shared by weight shared by the V channel value of pixel and the V channel value after the image median filter in the first area.
15. a kind of image processing apparatus characterized by comprising
First pixel determining module, for determining the first pixel in image to be processed and with first pixel being
The first area at center and second area, the first area are less than the second area;
Weight determination module meets first according to described for determining the pixel for meeting first condition in the first area
The average value of difference between the saturation infromation and preset threshold of the pixel of condition determines the first area corresponding
One weight;Wherein, pixel of the pixel for meeting first condition for saturation infromation less than the preset threshold, one
The saturation infromation of pixel is equal among the absolute value of the channel U saturation difference and the absolute value of the channel V saturation difference
Maximum value, the channel U saturation difference are equal to U channel value and subtract U channel value when saturation degree is zero, the channel the V saturation
Degree difference is equal to V channel value and subtracts V channel value when saturation degree is zero;
False colour precorrection module is used for according to corresponding first weight in the first area, to the channel U of first pixel
The corresponding channel the U average value of value and the first area is weighted and averaged, and obtains the false colour in the channel U of first pixel
Precorrection value, the corresponding channel the V average value of V channel value and the first area to first pixel are weighted flat
, the false colour precorrection value in the channel V of first pixel is obtained;Wherein, the corresponding channel the U average value in the first area
For meet in the first area first condition pixel U channel value average value, the corresponding channel V in the first area
Average value is the average value for meeting the V channel value of pixel of first condition in the first area;
False colour correction module is used for according to corresponding first weight in the first area, to the U channel value of first pixel
It is weighted and averaged with the U channel value after the image median filter in the first area, obtains the channel the first pixel U
False colour corrected value, to the channel V after the image median filter in the V channel value and the first area of first pixel
Value is weighted and averaged, and obtains the false colour corrected value in the channel the first pixel V;Wherein, the U after described image median filtering
Channel value and V channel value are obtained according to the channel U of first pixel and the false colour precorrection value in the channel V;
Color noise suppression module, for carrying out color noise to first pixel according to the pixel in the second area
Inhibit, obtains U channel value and V channel value after the first pixel color noise inhibits;
Composed correction module, for the U channel value and U according to the second weight, after inhibiting to the first pixel color noise
Channel false colour corrected value is weighted and averaged, the V channel value and the channel V false colour after inhibiting to the first pixel color noise
Corrected value is weighted and averaged, the U channel value and V channel value after obtaining the first pixel correction.
16. device as claimed in claim 15, which is characterized in that it further include overcorrect protective module, the overcorrect protection
Module is used for:
After obtaining the U channel value and V channel value after the first pixel correction, execute:
If the U channel value after median filtering subtracts the obtained difference of U channel value and first pixel when saturation degree is zero
The U channel value of point subtracts the obtained difference of value in the channel U when saturation degree is zero, is all larger than zero or less than zero, then by described the
The U channel value of one pixel is corrected to the U channel value after the first pixel correction, otherwise, by the U of first pixel
Channel value is set as the value in the channel U when saturation degree is zero;
If the V channel value after median filtering subtracts the obtained difference of V channel value and first pixel when saturation degree is zero
The V channel value of point subtracts the obtained difference of value in the channel V when saturation degree is zero, is all larger than zero or less than zero, then by described the
The V channel value of one pixel is corrected to the V channel value after the first pixel correction, otherwise, by the V of first pixel
Channel value is set as the value in the channel V when saturation degree is zero.
17. device as claimed in claim 15, which is characterized in that the weight determination module is specifically used for:
Determine the set for meeting the pixel of first condition in the first area;
Determine the cumulative of the difference value between the saturation infromation and the preset threshold of all pixels point in the set and,
Difference value between the saturation infromation and the preset threshold is equal to the preset threshold and subtracts what saturation infromation obtained
Difference;
According to it is described cumulative and and the set in pixel quantity, determine corresponding first power in the first area
Weight.
18. device as claimed in claim 15, which is characterized in that the color noise suppression module is specifically used for:
It is image layered according to the pixel progress in the second area, K tomographic image from low to high is obtained, K is greater than 1
Integer;
Following steps are executed since the image of low frequency: color noise inhibition being carried out to image, according to the image after noise suppressed
Reconstruct obtains the image of higher frequency, and arrives the sequence of high frequency, is filtered to each layer using a bilateral filtering realization.
19. device as claimed in claim 15, which is characterized in that the composed correction module is according to following formula to described
U channel value and the channel U false colour corrected value after the inhibition of one pixel color noise are weighted and averaged:
Output_u=alpha*cnr_u+ (1-alpha) * fcc_u
Wherein, output_u indicates the U channel value after the first pixel correction, and alpha indicates second weight, cnr_
U indicates the U channel value after the first pixel color noise inhibition, and fcc_u indicates the channel U false colour corrected value;
V channel value and the channel V false colour corrected value after inhibiting according to following formula to the first pixel color noise carry out
Weighted average:
Output_v=alpha*cnr_v+ (1-alpha) * fcc_v
Wherein, output_v indicates the V channel value after the first pixel correction, and cnr_v indicates the first pixel face
V channel value after coloured noise inhibition, fcc_v indicate the channel V false colour corrected value.
20. a kind of image processing apparatus characterized by comprising
First pixel determining module, for determining the first pixel in image to be processed and with first pixel being
The first area at center;
Weight determination module meets first according to described for determining the pixel for meeting first condition in the first area
The average value of difference between the saturation infromation and preset threshold of the pixel of condition determines the first area corresponding
One weight;Wherein, pixel of the pixel for meeting first condition for saturation infromation less than the preset threshold, one
The saturation infromation of pixel is equal among the absolute value of the channel U saturation difference and the absolute value of the channel V saturation difference
Maximum value, the channel U saturation difference are equal to U channel value and subtract U channel value when saturation degree is zero, the channel the V saturation
Degree difference is equal to V channel value and subtracts V channel value when saturation degree is zero;
False colour precorrection module is used for according to corresponding first weight in the first area, to the channel U of first pixel
The corresponding channel the U average value of value and the first area is weighted and averaged, and obtains the false colour in the channel U of first pixel
Precorrection value, the corresponding channel the V average value of V channel value and the first area to first pixel are weighted flat
, the false colour precorrection value in the channel V of first pixel is obtained;Wherein, the corresponding channel the U average value in the first area
For meet in the first area first condition pixel U channel value average value, the corresponding channel V in the first area
Average value is the average value for meeting the V channel value of pixel of first condition in the first area;
False colour correction module is used for according to corresponding first weight in the first area, to the U channel value of first pixel
It is weighted and averaged with the U channel value after the image median filter in the first area, obtains the channel the first pixel U
False colour corrected value, to the channel V after the image median filter in the V channel value and the first area of first pixel
Value is weighted and averaged, and obtains the false colour corrected value in the channel the first pixel V;Wherein, the U after described image median filtering
Channel value and V channel value are obtained according to the channel U of first pixel and the false colour precorrection value in the channel V.
21. device as claimed in claim 20, which is characterized in that it further include overcorrect protective module, the overcorrect protection
Module is used for:
After obtaining the U channel value and V channel value after the first pixel correction, execute:
If the U channel value after median filtering subtracts the obtained difference of U channel value and first pixel when saturation degree is zero
The U channel value of point subtracts the obtained difference of value in the channel U when saturation degree is zero, is all larger than zero or less than zero, then by described the
The U channel value of one pixel is corrected to the U channel value after the first pixel correction, otherwise, by the U of first pixel
Channel value is set as the value in the channel U when saturation degree is zero;
If the V channel value after median filtering subtracts the obtained difference of V channel value and first pixel when saturation degree is zero
The V channel value of point subtracts the obtained difference of value in the channel V when saturation degree is zero, is all larger than zero or less than zero, then by described the
The V channel value of one pixel is corrected to the V channel value after the first pixel correction, otherwise, by the V of first pixel
Channel value is set as the value in the channel V when saturation degree is zero.
22. device as claimed in claim 20, which is characterized in that the weight determination module is specifically used for:
Determine the set for meeting the pixel of first condition in the first area;
Determine the cumulative of the difference value between the saturation infromation and the preset threshold of all pixels point in the set and,
Difference value between the saturation infromation and the preset threshold is equal to the preset threshold and subtracts what saturation infromation obtained
Difference;
According to it is described cumulative and and the set in pixel quantity, determine corresponding first power in the first area
Weight.
23. device as claimed in claim 20, which is characterized in that the false colour precorrection module is according to following formula to described
The corresponding channel the U average value of the U channel value of first pixel and the first area is weighted and averaged:
Mean_u_cor=(wt_global*cur_u+ (1-wt_global) * mean_u)
Wherein, mean_u_cor indicates the false colour precorrection value in the channel U of first pixel, described in wt_global expression
Corresponding first weight in first area, cur_u indicate the U channel value of first pixel, and mean_u indicates firstth area
The corresponding channel the U average value in domain;
The corresponding channel the V average value of the V channel value of first pixel and the first area is carried out according to following formula
Weighted average:
Mean_v_cor=(wt_global*cur_v+ (1-wt_global) * mean_v)
Wherein, mean_v_cor indicates the false colour precorrection value in the channel V of first pixel, and cur_v indicates described first
The V channel value of pixel, mean_v indicate the corresponding channel the V average value in the first area.
24. device as claimed in claim 20, which is characterized in that the false colour correction module is according to following formula to described
The U channel value after image median filter in the U channel value and the first area of one pixel is weighted and averaged:
Fcc_u=(wt_global*cur_u+ (total_u-wt_global) * med_u)/total_u
Wherein, fcc_u indicates that the false colour corrected value in the channel the first pixel U, cur_u indicate the U of first pixel
Channel value, wt_global indicate corresponding first weight in the first area, and med_u indicates the image in the first area
U channel value after median filtering, total_u indicate weight shared by the U channel value of first pixel and the first area
In image median filter after U channel value shared by the sum of weight;
According to following formula to the V after the image median filter in the V channel value and the first area of first pixel
Channel value is weighted and averaged:
Fcc_v=(wt_global*cur_v+ (total_v-wt_global) * med_v)/total_v
Wherein, fcc_v indicates that the false colour corrected value in the channel the first pixel V, cur_v indicate the V of first pixel
Channel value, med_v indicate the V channel value after the image median filter in the first area, and total_v indicates first picture
The sum of weight shared by weight shared by the V channel value of vegetarian refreshments and the V channel value after the image median filter in the first area.
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711352453.0A CN108124141B (en) | 2017-12-15 | 2017-12-15 | A kind of image processing method and device |
EP18868765.1A EP3688981B1 (en) | 2017-10-19 | 2018-10-16 | Methods and devices for processing images |
PCT/CN2018/110341 WO2019076278A1 (en) | 2017-10-19 | 2018-10-16 | Methods and devices for processing images |
US16/852,575 US11399167B2 (en) | 2017-10-19 | 2020-04-20 | Methods and devices for processing images |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711352453.0A CN108124141B (en) | 2017-12-15 | 2017-12-15 | A kind of image processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108124141A CN108124141A (en) | 2018-06-05 |
CN108124141B true CN108124141B (en) | 2019-09-17 |
Family
ID=62229139
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711352453.0A Active CN108124141B (en) | 2017-10-19 | 2017-12-15 | A kind of image processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108124141B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019076278A1 (en) * | 2017-10-19 | 2019-04-25 | Zhejiang Dahua Technology Co., Ltd. | Methods and devices for processing images |
CN109493307B (en) * | 2018-10-16 | 2021-10-15 | 西安邮电大学 | Image Alpha mixing method based on floating point pixel data |
CN111340894B (en) * | 2019-09-27 | 2023-07-14 | 杭州海康慧影科技有限公司 | Image processing method, device and computer equipment |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02100494A (en) * | 1988-10-07 | 1990-04-12 | Fuji Photo Film Co Ltd | Regenerative device for fm modulated video signal |
JP4946581B2 (en) * | 2007-04-05 | 2012-06-06 | ソニー株式会社 | Image processing device |
US8131072B2 (en) * | 2007-11-26 | 2012-03-06 | Aptina Imaging Corporation | Method and apparatus for reducing image artifacts based on aperture-driven color kill with color saturation assessment |
CN101478687B (en) * | 2008-01-04 | 2010-12-08 | 华晶科技股份有限公司 | Correcting method for pseudo color pixel in digital image |
JP5677040B2 (en) * | 2010-11-08 | 2015-02-25 | キヤノン株式会社 | Image processing apparatus and control method thereof |
TWI524729B (en) * | 2013-11-19 | 2016-03-01 | 瑞昱半導體股份有限公司 | A real-time false color reduction system and method for color interpolation |
CN103747222B (en) * | 2013-12-27 | 2016-04-06 | 上海富瀚微电子股份有限公司 | A kind of method that color artifact of image suppresses and device |
CN106303483B (en) * | 2015-05-20 | 2019-05-24 | 浙江大华技术股份有限公司 | A kind of image processing method and device |
CN105809644B (en) * | 2016-03-15 | 2018-05-15 | 深圳英飞拓科技股份有限公司 | Image border fake color inhibition method and device |
-
2017
- 2017-12-15 CN CN201711352453.0A patent/CN108124141B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN108124141A (en) | 2018-06-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108124141B (en) | A kind of image processing method and device | |
CN104809694B (en) | Digital image processing method and device | |
TWI407800B (en) | Improved processing of mosaic images | |
TWI511559B (en) | Image processing method | |
US20130064448A1 (en) | Image chroma noise reduction | |
US7649653B2 (en) | Processing apparatus and method for enhancing image color | |
Jang et al. | Adaptive color enhancement based on multi-scaled Retinex using local contrast of the input image | |
CN105205794A (en) | Synchronous enhancement de-noising method of low-illumination image | |
CN106485674A (en) | A kind of low light image Enhancement Method based on integration technology | |
Gautam et al. | Efficient color image contrast enhancement using range limited bi-histogram equalization with adaptive gamma correction | |
CN107169942B (en) | Underwater image enhancement method based on fish retina mechanism | |
KR100888429B1 (en) | Image brightness controlling apparatus and method thereof | |
CN114037641A (en) | Low-illumination image enhancement method, device, equipment and medium | |
Jang et al. | Color correction by estimation of dominant chromaticity in multi-scaled retinex | |
Ulucan et al. | BIO-CC: Biologically inspired color constancy. | |
KR101329136B1 (en) | Methdo and system of immersive enhancement for video sequence displaying | |
TWI520565B (en) | Image processing method and image processing device | |
US7557953B2 (en) | Image processing device and image processing method | |
Rodrigues et al. | Enhancement of underwater images in low-to-high turbidity rivers | |
Ghimire et al. | Nonlinear transfer function-based image detail preserving dynamic range compression for color image enhancement | |
CN109819228B (en) | Color-shifting method | |
EP3688981B1 (en) | Methods and devices for processing images | |
Nakaya et al. | A Reversible Image Processing Method for Color Tone Control Using Data Hiding | |
Hsu et al. | Color Constancy and Color Consistency Using Dynamic Gamut Adjustment | |
Wong et al. | Color image processing system based on color/brightness constancy |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |