CN100366054C - Interpolation processing method during image processing - Google Patents

Interpolation processing method during image processing Download PDF

Info

Publication number
CN100366054C
CN100366054C CNB2005101261279A CN200510126127A CN100366054C CN 100366054 C CN100366054 C CN 100366054C CN B2005101261279 A CNB2005101261279 A CN B2005101261279A CN 200510126127 A CN200510126127 A CN 200510126127A CN 100366054 C CN100366054 C CN 100366054C
Authority
CN
China
Prior art keywords
component values
component
pixel
values
pixel points
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
CNB2005101261279A
Other languages
Chinese (zh)
Other versions
CN1889632A (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.)
Beijing Superpix Micro Technology Co Ltd
Original Assignee
Beijing Shixinyuan Science & Technology Development Co Ltd
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 Beijing Shixinyuan Science & Technology Development Co Ltd filed Critical Beijing Shixinyuan Science & Technology Development Co Ltd
Priority to CNB2005101261279A priority Critical patent/CN100366054C/en
Publication of CN1889632A publication Critical patent/CN1889632A/en
Application granted granted Critical
Publication of CN100366054C publication Critical patent/CN100366054C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

An interpolation processing method in image processing course includes carrying out contour identification by utilizing color component with maximum effective information in pixel then calculating and confirming each mean value of three components in pixel according contour identification result.

Description

Interpolation processing method in image processing process
Technical Field
The invention relates to the technical field of image processing, in particular to an interpolation processing method for realizing contour identification and smoothing in image processing.
Background
In the image processing process, in order to obtain a high-quality image, it is desirable to use three CCDs (charge coupled devices) to receive three kinds of parameter information, i.e., red, green, and blue, respectively. Therefore, if the image processing apparatus is not implemented by a three-CCD scheme in terms of size and cost, it is not usually possible to implement the image processing apparatus. Instead, a CMOS (complementary metal oxide semiconductor) color sensor is used to capture one color component at each pixel, and the other two components are interpolated from the captured color component and the components surrounding the color component. Many interpolation algorithms can be used, and the interpolation algorithms can be widely applied to field interpolation, linear interpolation, convolution interpolation and the like.
As is well known, in a filter array, each pixel to be interpolated has four adjacent pixels, and based on the adjacent pixels, the interpolation methods respectively include:
(1) The color component of any one of the pixels can be generally selected as the interpolation result, and the method is called a neighborhood interpolation method;
(2) The principle of linear interpolation is to use the average value of the same color components in the neighborhood of a pixel as the color component of the pixel;
(3) Convolution interpolation is the interpolation of neighboring pixels.
Although the interpolation algorithms can remove some interference components to a certain extent, the blurring of the contour is inevitably brought about at the same time. This necessarily causes a large increase in the influence of noise on the image, thereby degrading the quality of the image.
Disclosure of Invention
The invention aims to provide an interpolation processing method in an image processing process, so that contour recognition and smoothing processing aiming at an image can be realized, the influence of noise on the image is reduced, and the quality of the image can be effectively improved.
The purpose of the invention is realized by the following technical scheme:
the invention provides an interpolation processing method in an image processing process, which comprises the following steps:
calculating two lines of pixel component values of the color according to three lines of color pixel components to obtain five lines of pixel component values of the color;
obtaining five sets of pixel component values for the color from the five row pixel component values;
the component values in the five groups of pixel component values are subjected to pairwise difference taking and absolute value taking, and then are summed respectively to obtain a valve value;
and judging whether the pixel points are contours or not according to the threshold and the diagonal difference values in the five groups of pixel component values, if so, calculating all component values of the corresponding pixel points, and otherwise, respectively calculating the average value of the known component sum of the pixel points and respectively using the average value as all component values of the corresponding pixel points.
The method for judging whether the pixel points are outlines comprises the following steps:
and when any one of the two diagonal difference values in each group is larger than the threshold value, the pixel point is an outline, otherwise, the pixel point is not the outline.
The method for judging whether the pixel points are outlines further comprises the following steps:
and respectively recording the outline judgment results of each group aiming at the five groups of component values, judging the corresponding pixel points to be the outlines when the judgment results aiming at the current group are the outlines and at least three of the five judgment results corresponding to the five groups are the outlines, and otherwise, judging the corresponding pixel points not to be the outlines.
The color is green.
The component values include: a green G component value, a red R component value, and a blue B component value.
The interpolation processing method includes:
in three rows of known pixel points, calculating the G component value of the corresponding pixel point according to the values of all the G components, calculating the R component value of the corresponding pixel point according to the values of all the R components, and calculating the B component value of the corresponding pixel point according to the values of all the B components.
It can be seen from the above technical solutions that, in order to reduce the blurring of the contour and the influence of noise on the image, the present invention first identifies the contour, and then smoothes the part which is not the contour, so that not only can the blurring problem of the image edge caused by the normal linear interpolation method be reduced, thereby keeping the definition of the contour, but also the influence of noise on the image can be reduced, i.e. more obvious color distortion can be reduced. Thus, the implementation of the present invention can greatly improve the quality of the image, i.e., a higher quality interpolated image can be obtained.
Drawings
FIG. 1 is a schematic diagram of a specific implementation process of the method of the present invention;
fig. 2 to 5 are schematic diagrams of pixel matrices in the present invention, respectively.
Detailed Description
The invention provides a method for solving the problem that noise affects an image and identifies a contour, in particular provides an interpolation algorithm for realizing contour identification and smoothness, and the interpolation algorithm provided by the invention comprises the following steps: firstly, the color component with the largest effective information amount in the pixel is used for identifying the contour, and then, each mean value of three components in the pixel is calculated and determined according to the contour identification result.
Specifically, in the present invention, fifty percent of green color in a filter array of a Bayer color filter is used to identify the contour, and certainly, if the effective information amount of other colors is more, other colors may be used to identify the contour.
In summary, in the contour identification process: firstly, estimating G components of upper and lower lines through each response value of three lines of color filters, then carrying out upper and lower and left and right contour judgment on each G component, and further identifying the contour part of the G component when judging that two or more directions have contours. After the contour is identified, further interpolation is carried out on the contour part, and mean value smoothing processing is carried out on three components of the non-contour part.
That is, the present invention mainly performs the contour recognition by responding to the largest green among three colors of RGB (red, green and blue) in the implementation process. The corresponding processing procedure comprises the following steps:
(1) Firstly, estimating the G components of the upper and lower lines through each response value of three lines to obtain a 5 multiplied by 5 array;
(2) Then, in the 5 × 5 array, the vertical and horizontal contour determination is performed for each G component, and when it is determined that there is a contour in two or more directions, the G component further identifies the contour portion.
(3) After the contour is identified, further interpolation is carried out on the contour part, and smoothing processing is carried out on three components of the non-contour part.
The object of the present invention can be achieved by the above-mentioned treatments (1) to (3).
For further understanding of the present invention, a specific implementation of the interpolation processing method in the image processing process according to the present invention will be described in detail below.
As shown in fig. 1, the corresponding processing procedure specifically includes:
step 11: calculating green pixel components of five lines from the green pixel components of three lines;
as shown in fig. 2, the following parameters are first calculated:
G12=(G21+G23)/2;G14=(G23+G25)/2;
G52=(G41+G43)/2;G54=(G43+G45)/2;
the values of G12 and G14 of the first row in fig. 2 and the values of G52 and G54 of the fifth row are obtained through the above calculation, so that the G components of the five rows are estimated from the G components (G21, G23, G25, G41, G4, G45) of the middle three rows in fig. 2.
Step 12: five groups of green component values are obtained according to the five-element green components obtained through calculation, and particularly, five groups of corresponding values can be obtained in the middle, east, south, west and north directions in fig. 2;
from the 5 × 5 matrix shown in fig. 2, one can obtain: five groups of values of G23G32G43G34, G23G43G25G45, G32G34G54G52, G21G23G41G43, and G12G14G32G 34.
Step 13: calculating a threshold value for judging whether the contour is the contour or not according to the five groups of values;
and respectively subtracting every two of the four components in the five groups of values, taking absolute values, and then respectively summing the two absolute values to respectively obtain a threshold value for judging whether the value is the contour, namely facs (i), i (1: 5), which comprises the following steps:
facs(i)=fac_a*fac(i),(0≤fac_a≤1);
Figure C20051012612700081
wherein facs (i) is a threshold value for judging whether the contour is in each group; fac _ a is a contour adjustment coefficient, typically 0.5, th is a control coefficient, and typically 16 may be taken.
Step 14: calculating the diagonal difference of each component in the five groups of component values, and calculating two diagonal difference values according to four component values in each group of components;
in the step, it is further required to determine whether the component is a contour, specifically, it is determined whether the component is a contour by subtracting the diagonal angles of each group of components in G23G32G43G3, G12G14G32G34, G23G43G25G45, G32G34G54G52, G21G23G41G 43;
step 15: determining each temp (i) value according to the calculation result of the diagonal difference;
the method specifically comprises the following steps: and judging whether a difference value larger than facs (i) exists in the result obtained by calculation, namely temp (i) =1 when one of two difference values in each group of components is larger than facs (i). Otherwise, temp (i) =0, and step 16 is performed.
Step 16: judging whether the current point is a contour or not according to each temp (i) value;
specifically, when temp (1) =1 and temp (2) + temp (3) + temp (4) + temp (5) > 2, the current point (i.e. the center point of the 5 × 5 matrix) is the contour, and step 17 is performed, otherwise, the point is not the contour, and step 18 is performed.
And step 17: calculating values of the R component, the G component and the B component according to the contour judgment result;
(1) Calculating R component
Red component R = (R31 + R33+ R35)/3;
(2) Calculating the G component
In the middle region G23G32G43G34, when the difference in absolute value of the corresponding diagonal difference is greater than facs (1), then the value of the green component G is:
Figure C20051012612700091
otherwise, when (G23 + G32-G34-G43) > facsd, (facsd = facs (1) × m,0 < m < 1), then:
dv = | r1-r2| + | r3-r2| r1, r2, r3 are the sum of each row of the middle 3 × 3 matrix.
dh = | c1-c2| + | c3-c2| c1, c2, c3 are the sums for each column of the middle 3 × 3 matrix.
When dv > dh, then G = (G32 + G34)/2;
when dv < dh, G = (G23 + G43)/2;
when dv = dh, G = (G23 + G43+ G32+ G34)/4;
otherwise, if (G12 + G32-G34-G43) is less than or equal to facsd, G = (G23 + G43+ G32+ G34)/4;
(3) Calculating a component B;
as also shown in fig. 2, in the four small triangles G21B22G23G32, G23B 24G25G34, G41B42G43G32, G45B44G43G34 around G32 and G34,
1. when | G21-B22| is > | G23-B22| and | G23-B22| is > | G32-B22|,
tmpg22= G32, tmpg22 being an intermediate correlation quantity of G;
2. when | G21-B22| is > | G23-B22| and | G23-B22| is ≦ | G32-B22|,
tmpg22=G23;
3. when | G21-B22| ≦ | G23-B22| and | G21-B22| > | G32-B22 |;
tmpg22=G32;
4. if the conditions are not met, tmpg22= G21;
tmpg22=tmpg22-B22。
the other correlation values tmpg42, tmpg24, and tmpg44 are obtained in the same manner based on the order of arrangement of the small triangles, and thus the value of the B component can be calculated as:
B=G-(tmpg22+tmpg42+tmpg24+tmpg44)/4;
step 18: when the point is judged not to be the contour, the three components of the point are obtained by the mean value of the components of the middle 3 multiplied by 5 matrix;
for example, when temp (1) =1 and temp (2) + temp (3) + temp (4) + temp (5) > 2 are not satisfied, the point is a non-contour, G = (G21 + G23+ G25+ G32+ G34+ G41+ G43+ G45)/8, and similarly, the calculation method of the B, R component is not described again.
The following describes a specific implementation process of the method according to the present invention, with reference to fig. 3 as an example.
In fig. 3, G13= (G22 + G24)/2; g53= (G42 + G44)/2;
five sets of values were obtained from fig. 3: G22G24G42G44, G33G42G31G22, G24G35G 44G33, G33G44G53G42 and G13G24G33G22, and whether G33 is the contour is judged according to the five groups of values, wherein the specific judging method is described above and is not described in detail herein.
When the contour is judged to be the contour,
Figure C20051012612700111
wherein G (i) is each of the intermediate 3 × 5G components; 0 < fac _ g < 64, generally 18; g _ th (j) is the correlation quantity of each G component of the middle 3 × 5; g = G33+ G _ th, G _ th being the average of all G _ th (i);
tmpg32=(G22+G31+G42+G33)/4;
tmpg34=(G24+G35+G44+G33)/4;
R=G-(tmpg32+tmpg34-R32-R34)/2;
the corresponding solution for the B component is as follows:
tmpb32=(B21+B41+B43+B23)/4;
tmpb34=(B23+B43+B45+B25)/4;
in the two surrounding small triangles G22B23G24G33 and G42B43G44G33,
1. tmpg23= G33 when | G22-B23| > | G24-B23| and | G24-B23| > | G33-B23 |;
2. tmpg23= G24 when | G22-B23| > | G24-B23| and | G24-B23| ≦ | G33-B23 |;
3. tmpg23= G33 when | G22-B23| ≦ | G24-B23| and | G22-B23| > | G33-B23 |;
4. when none of the above conditions is met, tmpg23= G22.
tmpg23=tmpg23-B23;
Obtaining tmpg43 according to the arrangement sequence of the small triangles;
tmpkb32=tmpg32-tmpb32;
tmpkb23=tmpg23-B23;
tmpkb34=tmpg34-tmpb34;
tmpkb43=tmpg43-B43;
then, B = G- (tmpkb 23+ tmpkb43+ tmpkb32+ tmpkb 34)/4.
Similarly, when the point is determined not to be a contour, the three components of the point are obtained from the mean of the components of the middle 3 × 5 matrix.
In addition, since the positions of the G components in fig. 2 and fig. 5, and fig. 3 and fig. 4 are the same, the calculation method of the G component is the same, and the calculation methods of the B component and the R component can be obtained by corresponding exchange, so that detailed description is not repeated here.
In summary, the present invention can perform denoising and interpolation operations simultaneously, thereby reducing the blurring of the image edge caused by the conventional linear interpolation method, and reducing more obvious color distortion. The method can obtain interpolation images with higher quality.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. An interpolation processing method in an image processing process is characterized by comprising the following steps:
calculating two lines of pixel component values of the color according to three lines of color pixel components to obtain five lines of pixel component values of the color;
obtaining five sets of pixel component values for the color from the five-row pixel component values;
calculating differences of every two of the component values in the five groups of pixel component values, taking absolute values, and then summing the differences to obtain a valve value;
and judging whether the pixel points are contours or not according to the threshold and diagonal difference values in the five groups of pixel component values, if so, calculating all component values of the corresponding pixel points, otherwise, respectively calculating the average value of the known component sum of the pixel points and respectively using the average value as all component values of the corresponding pixel points.
2. The interpolation processing method in the image processing process according to claim 1, wherein the method for determining whether the pixel points are contours comprises:
and when any one of the two diagonal difference values in each group is larger than the threshold value, the pixel point is an outline, otherwise, the pixel point is not the outline.
3. The interpolation processing method in the image processing process according to claim 2, wherein the method for determining whether the pixel points are contours further comprises:
and respectively recording the outline judgment results of each group aiming at the five groups of component values, judging the corresponding pixel points to be the outlines when the judgment results aiming at the current group are the outlines and at least three of the five judgment results corresponding to the five groups are the outlines, and otherwise, judging the corresponding pixel points not to be the outlines.
4. The interpolation processing method in the image processing process according to claim 1, wherein the color is green.
5. The interpolation processing method in the image processing process according to claim 1, wherein the component values include:
a green G component value, a red R component value, and a blue B component value.
6. The interpolation processing method in the image processing process according to claim 5, wherein the interpolation processing method includes:
in three rows of known pixel points, calculating G component values of corresponding pixel points according to all the G component values, calculating R component values of corresponding pixel points according to all the R component values, and calculating B component values of corresponding pixel points according to all the B component values.
CNB2005101261279A 2005-11-30 2005-11-30 Interpolation processing method during image processing Expired - Fee Related CN100366054C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101261279A CN100366054C (en) 2005-11-30 2005-11-30 Interpolation processing method during image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101261279A CN100366054C (en) 2005-11-30 2005-11-30 Interpolation processing method during image processing

Publications (2)

Publication Number Publication Date
CN1889632A CN1889632A (en) 2007-01-03
CN100366054C true CN100366054C (en) 2008-01-30

Family

ID=37578889

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101261279A Expired - Fee Related CN100366054C (en) 2005-11-30 2005-11-30 Interpolation processing method during image processing

Country Status (1)

Country Link
CN (1) CN100366054C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109104595B (en) * 2018-06-07 2019-09-20 中国科学院西安光学精密机械研究所 The FPGA implementation method of Hamilton adaptive-interpolation in scan picture

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1094209A (en) * 1993-01-14 1994-10-26 三星电子株式会社 The interpolation method of digital image data and circuit thereof
CN1329435A (en) * 2000-06-12 2002-01-02 三星电子株式会社 Marginal information based 2-D nonlinear interplotation system and 2-D mixed interplotation system
CN1512774A (en) * 2002-12-13 2004-07-14 ���ܿ���ϵͳ���޹�˾ High grade edge self adaption interpolation method and system for interleave to inching change
CN1571476A (en) * 2004-04-29 2005-01-26 上海交通大学 Method of color interpolation in digital camera
US20050157943A1 (en) * 2004-01-16 2005-07-21 Enuclia Semiconductor, Inc. Image processing system and method with dynamically controlled pixel processing
CN1658667A (en) * 2004-02-18 2005-08-24 华亚微电子(上海)有限公司 Image edge smoothing system and method based on directional interpolation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1094209A (en) * 1993-01-14 1994-10-26 三星电子株式会社 The interpolation method of digital image data and circuit thereof
CN1329435A (en) * 2000-06-12 2002-01-02 三星电子株式会社 Marginal information based 2-D nonlinear interplotation system and 2-D mixed interplotation system
CN1512774A (en) * 2002-12-13 2004-07-14 ���ܿ���ϵͳ���޹�˾ High grade edge self adaption interpolation method and system for interleave to inching change
US20050157943A1 (en) * 2004-01-16 2005-07-21 Enuclia Semiconductor, Inc. Image processing system and method with dynamically controlled pixel processing
CN1658667A (en) * 2004-02-18 2005-08-24 华亚微电子(上海)有限公司 Image edge smoothing system and method based on directional interpolation
CN1571476A (en) * 2004-04-29 2005-01-26 上海交通大学 Method of color interpolation in digital camera

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于统计特征的彩色图像快速插值算法. 刘晓松,杨新,汪进.电子学报,第32卷第1期. 2004 *

Also Published As

Publication number Publication date
CN1889632A (en) 2007-01-03

Similar Documents

Publication Publication Date Title
US7907791B2 (en) Processing of mosaic images
KR101665137B1 (en) Apparatus and method for reducing noise from image sensor
US7995868B2 (en) Image processing method and image processing device
WO2011152174A1 (en) Image processing device, image processing method and program
JP4863505B2 (en) Image processing device
US20090116750A1 (en) Color interpolation method and device
CN101399996B (en) Color filter lens array interpolation method
CN103733608B (en) Image processing apparatus and control method therefor
JP2004153823A (en) Image processing system using local linear regression
CN1988591A (en) Color interpolation method for realizing abnormal point numerical value correction
CN110730336A (en) Demosaicing method and device
CN100568913C (en) Edge crispening color interpolation method based on gradient
CN111539893A (en) Bayer image joint demosaicing denoising method based on guided filtering
US7471842B2 (en) Method and apparatus for dynamically detecting pixel values
JP5398667B2 (en) Image processing device
US6847396B1 (en) Interpolation method for producing full color images in using a single-chip color sensor
CN101562692A (en) Apparatus and method for noise reduction
US8655058B2 (en) Method and apparatus for spatial noise adaptive filtering for digital image and video capture systems
CN100366054C (en) Interpolation processing method during image processing
US20120127347A1 (en) Image processing apparatus and system
CN101815220B (en) Method for correcting image color distortion
KR100839922B1 (en) Color artifact reduction Apparatus and Method using adaptive-mean filter
US6795586B1 (en) Noise cleaning and interpolating sparsely populated color digital image
KR100826215B1 (en) Color Interpolation Method and Device Considering Edge Direction and Cross Stripe Noise
US8068145B1 (en) Method, systems, and computer program product for demosaicing images

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: BEIJING SUPERPIX MICRO TECHNOLOGY LIMITED

Free format text: FORMER OWNER: BEIJING SHIXINYUAN SCIENCE + TECHNOLOGY DEVELOPMENT CO., LTD.

Effective date: 20110812

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20110812

Address after: 100085 Beijing city Haidian District on the five Street No. 7 building two Room 201 Hao Hai

Patentee after: Beijing SuperPix Micro Technology Limited

Address before: 100085, D, building 2, Pioneer Road, 412 information road, Beijing, Haidian District

Patentee before: Beijing Shixinyuan Science & Technology Development Co., Ltd.

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: 20080130

Termination date: 20171130