CN101815220B - Method for correcting image color distortion - Google Patents

Method for correcting image color distortion Download PDF

Info

Publication number
CN101815220B
CN101815220B CN2009100076584A CN200910007658A CN101815220B CN 101815220 B CN101815220 B CN 101815220B CN 2009100076584 A CN2009100076584 A CN 2009100076584A CN 200910007658 A CN200910007658 A CN 200910007658A CN 101815220 B CN101815220 B CN 101815220B
Authority
CN
China
Prior art keywords
color
value
group
interpolation
correction
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.)
Expired - Fee Related
Application number
CN2009100076584A
Other languages
Chinese (zh)
Other versions
CN101815220A (en
Inventor
庄哲纶
林哲弘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Altek Corp
Original Assignee
Altek Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Altek Corp filed Critical Altek Corp
Priority to CN2009100076584A priority Critical patent/CN101815220B/en
Publication of CN101815220A publication Critical patent/CN101815220A/en
Application granted granted Critical
Publication of CN101815220B publication Critical patent/CN101815220B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

The invention discloses a method for correcting image color distortion, which is applied to a digital photographic device for utilizing a color filter array to reproduce the pixel color of a digital image. The method for correcting the image color distortion comprises the following steps: selecting a shielding window from the color filter array and setting the central pixel of the shielding window as a target pixel; performing interpolation calculation on other pixels by using the target pixel so as to solve a group of interpolation color values; executing a difference value calculation program to calculate difference values between the chroma of the target pixel and the chroma of the other pixels, and obtaining a maximum difference value; when the maximum different value is greater than a basic threshold, judging that the interpolation color value has a color distortion phenomenon; and executing a color correction program, correcting the interpolation color value by using a mixed color correction matrix generated by performing a weighted average method on a predetermined color correction matrix and a unit matrix so as to obtain a first color correction value. By using the method, the problem of image color distortion caused by processing an image edge by using a color interpolation method can be reduced.

Description

Correcting image color distortion
Technical field
The present invention relates to a kind of bearing calibration of digitized video, particularly a kind of correcting image color distortion.
Background technology
Generally speaking, digital photographic device for utilizing color filter array (Color Filter Array, CFA) obtain in the color signal process of digitized video, adopt the color filter array to obtain digitized video via one of sampling redness, blue and green three kinds of hue components resulting color array.Wherein the color array is that each pixel is stored the single color composition that it comprises.Because digital photographic device is ignored other two kinds of hue components of each pixel, therefore, for each pixel, the original sense data that digital photographic device obtained just comprises less color sampling.So before the image of being retrieved was further processed or shows, the hue component that each pixel lacked just must be rebuild earlier so that each pixel comprises three kinds of all hue components.Existing digital photographic device for utilizing color interpolation method (interpolation) is estimated two kinds of hue components that each pixel lacks, the color interpolation method according to each wait to rebuild pixel around information that partly pixel provided calculate.When color filter array when being known, two kinds of hue components that then each pixel lacked just can be rebuild out via using the information that neighbor provided.The color interpolation method can cause color distortion (color aliasing) average (being low-pass filtering operation) that image edge carries out pixel value, as sawtooth effect (zipper effect), pseudo-chromatic effect (false color) or fuzzy edge or the like image problem.
In addition, the 6th, 804, No. 392 U.S. patent application case discloses the method that removes the color distortion effect in a kind of color digital image, and its English name is " Removing color aliasing artifacts from colordigital images ".Can learn that from its summary disclosed technology is: provide brightness and chroma signals from the color digital image, according to the brightness of center pixel and surrounding pixel and the degree of chroma decision color distortion, and then the phenomenon of minimizing color distortion.Yet said method is when solving the problem of image color distortion, can't reduce image color distortion effectively, and can exceedingly revise and cause color compensation excessive, and, can cause producing muted color (neutral color) phenomenon of the neutral gray that does not have color at the color compensation of the gray pixels of image and black picture element part.
Summary of the invention
Technical problem to be solved by this invention provides a kind of correcting image color distortion, to proofread and correct the problem that causes image color distortion because of the colour filter matrix.
To achieve these goals, the invention provides a kind of correcting image color distortion, be applied to digital photographic device for utilizing color filter array (Color Filter Array, CFA) pixel color of reproduction digitized video.Bearing calibration comprises: the color filter array is divided into the shielding of a plurality of array shapes window (maskwindow), and the center pixel in each shielding window is set at object pixel, and all the other colored pixels around the object pixel are defined as a plurality of contrast pixels; With object pixel to the contrast pixel carry out interpolation calculate (CFA interpolation, CFAi), to obtain the one group of interpolation color value that comprises object pixel; Carry out the difference value calculation procedure, calculate the individual difference value of chroma between the chroma (chrominance) that respectively contrasts pixel and object pixel respectively, and obtain the maximum different value in the difference value; Provide default color correction matrix (OriginalColor Correction Matrix, CCM); Set basic threshold, for comparing,, then judge the color distortion phenomenon of interpolation color value when maximum different value during greater than basic threshold with maximum different value; And execution color correction program, when judging interpolation color value coloured silk distortion phenomenon, the mixed color correction matrix that then uses default color correction matrix and unit matrix institute weighted average to produce is proofreaied and correct the interpolation color value, to produce the first colour correction value that replaces object pixel.
Technique effect of the present invention is: according to correcting image color distortion provided by the present invention, be applied to the pixel color that digital photographic device for utilizing color filter array is reappeared digitized video, and can be by the color distortion of software correcting digital image.And then minimizing is by the problem of color interpolation method image color distortion that causes when image edge is handled.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Description of drawings
Fig. 1 is the correcting image color distortion flow chart of one embodiment of the invention;
Fig. 2 is the correcting process figure of the image achromatization distortion phenomenon of one embodiment of the invention.
Embodiment
Below in conjunction with accompanying drawing structural principle of the present invention and operation principle are done concrete description:
According to correcting image color distortion of the present invention, be applied to have the electronic installation of video search function.This method can be realized according to correcting image color distortion of the present invention by the processor execution of electronic installation built-in software or firmware program collocation video search function by being built in the storage device of electronic installation in software or the firmware program again.Electronic installation can be the computer (Computer) of tool video search function, the mobile phone (Mobile Phone) of tool video search function or personal digital assistant (the Personal Digital Assistant of tool video search function, but be not limited to above-mentioned electronic installation PDA) etc..
For convenience of description, following examples describe with the shielding window of 3 * 5 sizes.Please refer to shown in " table 1 ", it is that (wherein R, G and B represent redness, green and blue three kinds of colors respectively for Color Filter Array, part array CFA) for the color filter array of colored pixels, the coordinate of its subscript remarked pixel position is for example at the G of central point colored pixels position 12Only there is green pixel originally in expression.
R 00 G 01 R 02 G 03 R 04
G 10 B 11 G 12 B 13 G 14
R 20 G 21 R 22 G 23 R 24
Table 1
Fig. 1 is the correcting image color distortion flow chart of one embodiment of the invention, may further comprise the steps:
S100: obtain the shielding window (mask window) of one 3 * 5 matrix size in the color filter array, and the center pixel that will shield in the window is set at object pixel, and with object pixel G 1214 colored pixels of on every side all the other are defined as contrast pixel S={R 00, G 01, R 02, G 03, R 04, G 10, B 11, B 13, G 14, R 20, G 21, R 22, G 23, R 24;
S200: with object pixel G 12Contrast pixel S is carried out interpolation calculating, and (CFA interpolation CFAi), comprises object pixel G to obtain 12One group of interpolation color value (A, B, C);
S300: carry out the difference value calculation procedure, calculate the chroma (chrominance) and object pixel G of each contrast pixel S respectively 12Between the individual difference value of chroma, and obtain maximum different value Max_Diff in these difference value;
S400: a default color correction matrix M is provided;
S500: set basic threshold Δ T;
S600: compare basic threshold Δ T and maximum different value Max_Diff;
S700: when maximum different value Max_Diff>basic threshold Δ T, judge that then interpolation color value (A, B, C) has the phenomenon of color distortion; And
S800: carry out color correction program, when judging that interpolation color value (A, B, C) is when having the phenomenon of color distortion, then use default color correction matrix M and unit matrix I weighted average to produce a mixed color correction matrix M ', utilize this mixed color correction matrix M ' that interpolation color value (A, B, C) is proofreaied and correct, replace object pixel G to produce 12One group of first colour correction value (α, β, γ).
Wherein, above-mentioned object pixel G 12Describe with green, but be not limited thereto.When the center pixel in the shielding window was red pixel, then object pixel can be redness.When the center pixel in the shielding window was blue pixel, then object pixel can be blueness.In addition, the color of interpolation color value (A, B, C) and the first colour correction value (α, β, γ) serve as reasons green, red and group that blueness is formed.
The above-mentioned first colour correction value (α, β, γ) is mixed color correction matrix M ' and the matrix product of interpolation color value (A, B, C), and wherein the first colour correction value can utilize following formula to calculate:
α β γ = M ′ A B C
M ′ = ( a 1 a 1 + a 2 × I + a 2 a 1 + a 2 × M )
a 1=Max_Diff
a 2=256-Max_Diff。
In this calculating formula, α is that the first correction of color value, the β that the first colour correction value is had is that the second correction of color value, the γ that the first colour correction value is had is that the 3rd correction of color value, the M that the first colour correction value is had is that unit matrix, A are that the first primitive color value, the B that the interpolation color value is had is that the second primitive color value, the C that the interpolation color value is had is that the 3rd primitive color value, the Max_Diff that the interpolation color value is had is maximum different value, a for default color correction matrix, M ' for mixed color correction matrix, I 1Weighted value, a for unit matrix 2Weighted value, a for default color correction matrix 1With a 2Be positive number and a 1+ a 2=256.
In addition, above-mentioned object pixel can be first, second, third primitive color value one of them.
Fig. 2 is the correcting process figure of the image achromatization distortion phenomenon of one embodiment of the invention.After the step of step S600, can comprise following implementation step:
S710: when maximum different value Max_Diff≤basic threshold, then judge object pixel G 12The achromatization distortion phenomenon; And
S810: carry out color correction program, use default color correction matrix M that interpolation color value (A, B, C) is proofreaied and correct, and produce one group of second colour correction value (α ', β ', γ ').
Wherein, above-mentioned object pixel G 12Be to describe, but be not limited thereto with green.When the center pixel in the shielding window was red pixel, then object pixel can be redness.When the center pixel in the shielding window was blue pixel, then object pixel can be blueness.In addition, the color of the interpolation color value (A, B, C) and the second colour correction value (α ', β ', γ ') serve as reasons green, red and group that blueness is formed.
The above-mentioned second colour correction value (α ', β ', γ ') is the matrix product of default color correction matrix M with interpolation color value (A, B, C), and wherein the second colour correction value is utilized following formula calculating gained:
α ′ β ′ γ ′ = M A B C .
In this calculating formula, α ' is that the first correction of color value, the β ' that the second colour correction value is had is that the second correction of color value, the γ ' that the second colour correction value is had is that the 3rd correction of color value, the M that the second colour correction value is had is that the first primitive color value, the B that the interpolation color value is had is that the second primitive color value, the C that the interpolation color value is had is the 3rd primitive color value that the interpolation color value is had for default color correction matrix, A.
According to correcting image color distortion provided by the present invention, be applied to digital photographic device for utilizing color filter array and reappear the pixel color of digitized video, can be by the whether distortion of color of judging image, and according to the color distortion of judged result use mixed color correction matrix correcting digital image.And then reduce image problem by color interpolation method color distortion that causes when image edge is handled, as sawtooth effect, pseudo-chromatic effect or fuzzy edge, and can exceedingly not revise and cause color compensation excessive.Also can avoid the generation of muted color of the neutral gray of image.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.

Claims (7)

1. a correcting image color distortion is applied to the pixel color that digital photographic device for utilizing one color filter array is reappeared a digitized video, it is characterized in that this bearing calibration comprises:
This color filter array is divided into the shielding of a plurality of array shapes window, and respectively the center pixel in this shielding window is set at an object pixel, and all the other colored pixels around this object pixel are defined as a plurality of contrast pixels;
This object pixel is carried out interpolation to these contrast pixels calculate, to obtain the one group of interpolation color value that comprises this object pixel;
Carry out a difference value calculation procedure, calculate respectively respectively should the contrast pixel chroma and this object pixel between the individual difference value of chroma, and obtain a maximum different value in these difference value;
One default color correction matrix is provided;
Set a basic threshold, for comparing,, then judge the color distortion phenomenon of this group interpolation color value when this maximum different value during greater than this basic threshold with this maximum different value; And
Carry out a colour correction program, when judging this group interpolation color value coloured silk distortion phenomenon, a mixed color correction matrix that then uses this default color correction matrix and unit matrix institute weighted average to produce is proofreaied and correct this group interpolation color value, to produce one group of first colour correction value that replaces this object pixel;
The weight coefficient of this unit matrix is a maximum different value, and the weight coefficient sum of this default color correction matrix and this unit matrix is 256, and described this group first colour correction value is the matrix product of this group mixed color correction matrix and this group interpolation color value.
2. correcting image color distortion as claimed in claim 1, it is characterized in that, described object pixel be selected from green, red and blue three primary colors one of them, and this group interpolation color value and this color of organizing the first colour correction value serve as reasons green, redness and group that blueness is formed.
3. correcting image color distortion as claimed in claim 1 is characterized in that, described this group first colour correction value is to utilize following formula to calculate:
α β γ = M ′ A B C
M ′ = ( a 1 a 1 + a 2 × I + a 2 a 1 + a 2 × M )
a 1=Max_Diff
a 2=256-Max_Diff
Wherein, the one first correction of color value that had for this first colour correction value of α, the one second correction of color value that β is had for this first colour correction value, one the 3rd correction of color value that γ is had for this first colour correction value, M was for presetting color correction matrix, M ' is this mixed color correction matrix, I is this unit matrix, the one first primitive color value that A is had for this group interpolation color value, the one second primitive color value that B is had for this group interpolation color value, one the 3rd primitive color value that C is had for this group interpolation color value, Max_Diff is this maximum different value, a 1Weighted value, a for this unit matrix 2Weighted value, a for this default color correction matrix 1With a 2Be positive number and a 1+ a 2=256.
4. correcting image color distortion as claimed in claim 3 is characterized in that, described object pixel be this first, second, third primitive color value one of them.
5. correcting image color distortion as claimed in claim 1, it is characterized in that, when this maximum different value is not more than this basic threshold, then judge this object pixel achromatization distortion phenomenon, in the step of carrying out this color correction program, then use and default color correction matrix to be proofreaied and correct by this group interpolation color value, and produce one group of second colour correction value;
Described this group second colour correction value is tried to achieve by the matrix product of the default color correction matrix of this group and this group interpolation color value.
6. correcting image color distortion as claimed in claim 5, it is characterized in that, described object pixel be selected from green, red and blue three primary colors one of them, and this group interpolation color value and this color of organizing the second colour correction value group that green, redness and blueness are formed that serves as reasons.
7. correcting image color distortion as claimed in claim 1 is characterized in that, described respectively this shielding window is respectively 3 * 5 matrix.
CN2009100076584A 2009-02-20 2009-02-20 Method for correcting image color distortion Expired - Fee Related CN101815220B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100076584A CN101815220B (en) 2009-02-20 2009-02-20 Method for correcting image color distortion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100076584A CN101815220B (en) 2009-02-20 2009-02-20 Method for correcting image color distortion

Publications (2)

Publication Number Publication Date
CN101815220A CN101815220A (en) 2010-08-25
CN101815220B true CN101815220B (en) 2011-08-10

Family

ID=42622320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100076584A Expired - Fee Related CN101815220B (en) 2009-02-20 2009-02-20 Method for correcting image color distortion

Country Status (1)

Country Link
CN (1) CN101815220B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103974043B (en) * 2013-01-24 2016-02-10 瑞昱半导体股份有限公司 Image processor and image treatment method
CN110830778B (en) * 2018-08-14 2021-05-14 杭州海康威视数字技术股份有限公司 Imaging device color correction method, imaging device color correction device, electronic device and storage medium
US11100628B2 (en) 2019-02-07 2021-08-24 Applied Materials, Inc. Thickness measurement of substrate using color metrology
CN113891053B (en) * 2020-12-23 2023-07-25 深圳市火乐科技发展有限公司 Projection equipment control method and device, medium and electronic equipment
CN113870146A (en) * 2021-10-15 2021-12-31 中国大恒(集团)有限公司北京图像视觉技术分公司 Method for correcting false color of image edge of color camera

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6804392B1 (en) * 2000-10-16 2004-10-12 Eastman Kodak Company Removing color aliasing artifacts from color digital images
CN1988591A (en) * 2005-12-21 2007-06-27 比亚迪股份有限公司 Color interpolation method for realizing abnormal point numerical value correction
CN1992909A (en) * 2005-12-29 2007-07-04 华晶科技股份有限公司 Reconstruction method of picture-element color information

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6804392B1 (en) * 2000-10-16 2004-10-12 Eastman Kodak Company Removing color aliasing artifacts from color digital images
CN1988591A (en) * 2005-12-21 2007-06-27 比亚迪股份有限公司 Color interpolation method for realizing abnormal point numerical value correction
CN1992909A (en) * 2005-12-29 2007-07-04 华晶科技股份有限公司 Reconstruction method of picture-element color information

Also Published As

Publication number Publication date
CN101815220A (en) 2010-08-25

Similar Documents

Publication Publication Date Title
US8890974B2 (en) Methods and systems for automatic white balance
US8295595B2 (en) Generating full color images by demosaicing noise removed pixels from images
JP5672776B2 (en) Image processing apparatus, image processing method, and program
CN101815220B (en) Method for correcting image color distortion
US20050249417A1 (en) Edge detecting method
CN103733608B (en) Image processing apparatus and control method therefor
TWI395468B (en) The method of eliminating the color dislocation of digital images
CN113112424A (en) Image processing method, image processing device, computer equipment and storage medium
CN110852953B (en) Image interpolation method and device, storage medium, image signal processor and terminal
CN1655626B (en) System and method for clipping values of pixels
CN106507066B (en) Suppress the method, apparatus of false color of image
CN103489427B (en) YUV converts the method and system that RGB and RGB converts YUV to
US8861850B2 (en) Digital image color correction
CN101827273B (en) A color rendition method of image
CN105791710A (en) Signal lamp image enhancement processing method
CN102903091B (en) Method for stitching image in digital image processing apparatus
CN107615760A (en) Image processing apparatus, image processing method, image-forming component and imaging device
CN112581403B (en) Fisheye image correction method, fisheye image correction system and fisheye image correction medium
US7145573B2 (en) Method and system to combine a digital graphics object and a digital picture
WO2017183273A1 (en) Image processing device
WO2008036850A2 (en) Chroma supression features
CN109600596B (en) Nonlinear colorless constant white balance method
JP6413210B2 (en) Image processing apparatus, imaging apparatus, and program
CN107305685A (en) Image comparison Enhancement Method and its device
CN107886550B (en) Image editing propagation method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110810

Termination date: 20190220