CN101511031B - Method for Bayer Data interplation - Google Patents

Method for Bayer Data interplation Download PDF

Info

Publication number
CN101511031B
CN101511031B CN2008101478636A CN200810147863A CN101511031B CN 101511031 B CN101511031 B CN 101511031B CN 2008101478636 A CN2008101478636 A CN 2008101478636A CN 200810147863 A CN200810147863 A CN 200810147863A CN 101511031 B CN101511031 B CN 101511031B
Authority
CN
China
Prior art keywords
component
pixel point
current pixel
disappearance
edge
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
CN2008101478636A
Other languages
Chinese (zh)
Other versions
CN101511031A (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.)
Sichuan Hongwei Technology Co Ltd
Original Assignee
Sichuan Hongwei Technology 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 Sichuan Hongwei Technology Co Ltd filed Critical Sichuan Hongwei Technology Co Ltd
Priority to CN2008101478636A priority Critical patent/CN101511031B/en
Publication of CN101511031A publication Critical patent/CN101511031A/en
Application granted granted Critical
Publication of CN101511031B publication Critical patent/CN101511031B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method used for Bayer Data interpolation which includes steps as follows: calculating gradient value on three directions through R or B component contained by a present pixel point, selecting a pixel point containing G component on one side with minitype edge difference value of two edge direction sides for restoring G component of the present pixel point. The method solves problem of rough edge transition caused by bilinear interpolation. The method can restore lack B or R component in the present pixel point for avoiding color distortion of gradient color bilinear interpolation caused by mistake judgement.

Description

A kind of method that is used for the Baeyer data interpolating
Technical field
The present invention relates to especially color image processing field of electronic image, specifically, relate to a kind of method that is used for the Baeyer data interpolating.
Background technology
The sensing camera can detect with photo in the ray density of pixel correspondence position change.In colour signal sensing camera system, color filter mirror array (CFA) only can any given pixel cell of well-regulated measurement wherein a kind of color, the image of this regular distribution of color is called the Baeyer data, cause the sensing camera can only regularly obtain a kind of color of each pixel in the image, as shown in Figure 1.Therefore, need recover other two kinds of colors of each pixel in the image with the color interpolation technology.
The current camera system can produce three kinds of colors of red, green, blue.Have only a kind of image of color component to revert to three kinds of color pixel points each pixel with the color interpolation technology.Most of color filter mirror arrays (CFA) have only a kind of color signal that higher frequency is arranged, and compare other two kinds of color signals and sample also more.In the RGB image, sort signal is green (G).Green because its higher details frequency and be that the signal that human vision is concentrated is used as luminance signal usually.Therefore present color interpolation technology is general recovers other two kinds of color components after green (G) the component recovery with each pixel of image earlier again.Comparatively typical at present interpolation method has following three kinds:
The bilinear interpolation technology: this technology is at first recovered green (G) component of each pixel of image, and the G component that wherein lacks the pixel of G component obtains by next door pixel bilinear interpolation.Recover other two kinds of components of each pixel then according to nearby principle.
Rim detection interpolation technique: adopt the interpolation method that is different from smooth region in the image border.And this interpolation method mates definite according to the edge and the template of storage in advance.
Gradient interpolation technique: the G component that 1, recovers all pixels of image.Disappearance G component pixel point calculates vertical and horizontal direction gradient respectively, carries out bilinear interpolation with the neighbor pixel that has the G component on the minimum value direction and recovers.2, on the basis that the G component recovers, use bilinear interpolation to recover other two color components of pixel.
Therefore initial bilinear interpolation technology exists transition unsmooth in the image border part owing to just simply recover by the row neighbor pixel, blocking effect occurs.At this deficiency, the interpolation technique that directivity detects has increased the technology of rim detection, and relatively uses different interpolation techniques in the marginal portion by template, but this method calculation of complex.The gradient interpolation technique calculates the gradient of vertical and horizontal direction at above deficiency, uses the pixel of minimal gradient direction to recover current point.Though this technology has solved computation complexity and the edge directionality problem has been handled to some extent, but this technology has only the G component to carry out the gradient calculation of vertical and horizontal direction, on minimum direction, carry out bilinear interpolation then, because the G component has been concentrated the most information of image, therefore the gradient error interpolation causes cross-color, and other two components recover on the basis of G component, therefore cause error diffusion.
Summary of the invention
The objective of the invention is to overcome the deficiency of existing Baeyer data interpolating method, the method that is used for the Baeyer data interpolating that a kind of edge transition is unsmooth, cross-color is little is provided.
To achieve the above object of the invention, the present invention is used for the method for Baeyer data interpolating, comprises recovery and the R of G component pixel point disappearance and the recovery of B component of disappearance G component pixel point, it is characterized in that the recovery of disappearance G component pixel point may further comprise the steps:
(1), use R or B component that current pixel point comprised, in vertical direction, horizontal direction, two diagonals, the compute gradient value selects minimal gradient value direction as edge direction;
(2), the G component that comprises the pixel recovery current pixel point of G component in a side of selection edge, edge direction both sides difference minimum;
(3), current pixel point is lacked the recovery of B or R component.
In an embodiment of the present invention, in the step (3), the recovery of current pixel point disappearance B or R component, on the basis of step (1), the R or the B component that comprise according to edge direction and current pixel point, if edge direction is horizontal or vertical direction, edge calculation direction both sides difference then, select a minimum side, from current pixel point recently and comprise the absolute value of difference of B, the G of two pixels that color component is B that current pixel point lacked or R component or R, G component average after, add that the G component of current pixel point recovers; If edge direction is a diagonal, directly with the absolute value of the difference of B, the G of two pixels of B that current pixel point lacked on this edge direction or R component or R, G component average after, add that the G component of current pixel point recovers.
In another embodiment of the present invention, reverting to of the R of G component pixel point disappearance and B component: the R component of G component pixel point disappearance is asked on average by two horizontal or vertical R components and is obtained, and the B component of G component pixel point disappearance is then asked on average by level or two vertical R components and obtained.
In the present invention, by R or the B component that current pixel point comprised, at three direction calculating Grad, the G component that comprises the pixel recovery current pixel point of G component in a side of selection edge, edge direction both sides difference minimum, solved problems such as edge transition that bilinear interpolation brings is unsmooth, and calculated simple, feasible; Simultaneously, under the prerequisite of judging the texture situation, the recovery of current pixel point disappearance B or R component, on the basis of step (1), the R or the B component that comprise according to edge direction and current pixel point, if edge direction is horizontal or vertical direction, edge calculation direction both sides difference then, select a minimum side, from current pixel point recently and comprise the absolute value of difference of B, the G of two pixels that color component is B that current pixel point lacked or R component or R, G component average after, add that the G component of current pixel point recovers; If edge direction is a diagonal, directly with the absolute value of the difference of B, the G of two pixels of B that current pixel point lacked on this edge direction or R component or R, G component on average after, the G component that adds current pixel point recovers, and can avoid the gradient color bilinear interpolation because the cross-color that error in judgement is brought as far as possible.
Description of drawings
Fig. 1 is a kind of arrangement mode figure of Baeyer data.
Embodiment
For understanding the present invention better, the present invention is more described in detail below in conjunction with the drawings and specific embodiments.In the following description, when perhaps the detailed description of existing prior art can desalinate subject content of the present invention, these were described in here and will be left in the basket.
Fig. 1 is a kind of arrangement mode figure of Baeyer data.Present embodiment describes in conjunction with the arrangement mode of the Baeyer data that Fig. 1 provides.
One, the recovery of disappearance G component pixel point
(1), use R or B component that current pixel point comprised, in vertical direction, horizontal direction, two diagonals, the compute gradient value selects minimal gradient value direction as edge direction.
In the present embodiment, represent the color component value that current pixel point comprises with X, i.e. the value of R or B component, calculate multi-direction Grad:
diff 1=|(X (i-2),j+X (i+2),j)/2-X i,j|(1)
diff 2=|(X i,(j-2)+X i,(j+2))/2-X i,j|(2)
diff 3=|(X (i-2),(j-2)+X (i+2),(j+2))/2-X i,j|(3)
diff 4=|(X (i-2),(j+2)+X (i+2),(j-2))/2-X i,j|(4)
I wherein, j represents the current pixel point coordinate position, X represents the color component value that current pixel point comprises, diff 1, diff 2, diff 3, diff 4Be respectively vertical direction, horizontal direction, the Grad of two diagonals.
(2), the G component that comprises the pixel recovery current pixel point of G component in a side of selection edge, edge direction both sides difference minimum.
In the present embodiment:
1) if diff 1Minimum, vertical direction are carried out the G component as edge direction and are recovered.
If a) | X I, j-X I, j-2|>| X I, j-X I, j+2|, i.e. right side edge difference minimum, the G component G of current pixel point Ij
G i,j=G i,j+1(5)
B) if | X I, j-X I, j-2|≤| X I, j-X I, j+2|, i.e. left side edge difference minimum, the G component G of current pixel point Ij
G i,j=G i,j-1(6)
2) if diff 2Minimum, horizontal direction are carried out the G component as edge direction and are recovered.
A), | X I, j-X I-2, j|>| X I, j-X I+2, j|, i.e. lower edge difference minimum, the G component G ' of current pixel point I, j
G i,j=G i+1,j?(7)
B), | X I, j-X I-2, j|≤| X I, j-X I+2, j|, i.e. upper edge difference minimum, the G component G of current pixel point I, j
G i,j=G i-1,j (8)
3) if diff 3Minimum is tiltedly descended direction to carry out the G component as edge direction and is recovered, and uses the 2nd) a), b) step carries out the G component and recovers.
4) if diff 4Minimum, oblique upper recovers to carry out the G component as edge direction, uses the 1st) a), b) step carries out the G component and recovers.
(3), the recovery of current pixel point disappearance B or R component
The R or the B component that comprise according to edge direction and current pixel point, edge calculation direction both sides difference, select a minimum side, from current pixel point recently and comprise the absolute value of difference of B, the G of two pixels that color component is B that current pixel point lacked or R component or R, G component average after, add that the G component of current pixel point recovers.
At present embodiment,, judge according to calculating multi-direction Grad:
1) if diff 1Minimum, vertical direction lack the recovery of B or R component as edge direction.
A), | X I, j-X I, j-2|>| X I, j-X I, j+2|, i.e. right side edge difference minimum, disappearance Y component is:
Y i,j=(|Y i-1,j+1-G i-1,j+1|+|Y i+1,j+1-G i+1,j+1|)/2+G i,j (9)
B), | X I, j-X I, j-2|≤| X I, j-X I, j+2|, i.e. left side edge difference minimum, disappearance Y component is:
Y i,j=(|Y i-1,j-1-G i-1,j-1|+|Y i+1,j-1-G i+1,j-1|)/2+G i,j (10)
2) if diff 2Minimum, horizontal direction lack the recovery of B or R component as edge direction.
A), | X I, j-X I-2, j|>| X I, j-X I+2, j|, i.e. lower edge difference minimum, disappearance Y component is:
Y i,j=(|Y i+1,j-1-G i+1,j-1|+|Y i+1,j+1-G i+1,j+1|)/2+G i,j (11)
B), | X I, j-X I-2, j|≤| X I, j-X I+2, j|, i.e. upper edge difference minimum, disappearance Y component is:
Y i,j=(|Y i-1,j-1-G i-1,j-1|+|Y i-1,j+1-G i-1,j+1|)/2+G i,j (12)
3) if diff 3Minimum, edge direction is the oblique direction down of diagonal, directly with the absolute value of the difference of B, the G of two pixels of B that current pixel point lacked on this edge direction or R component or R, G component on average after, add that the G component of current pixel point recovers, promptly
Y i,j=(|Y i-1,j-1-G i-1,j-1|+|Y i+1,j+1-G i+1,j+1|)/2+G i,j (13)
4) if diff 4Minimum, edge direction be diagonal oblique upper to, directly with the absolute value of the difference of B, the G of two pixels of B that current pixel point lacked on this edge direction or R component or R, G component on average after, add that the G component of current pixel point recovers, promptly
Y i,j=(|Y i+1,j-1-G i+1,j-1|+|Y i-1,j+1-G i-1,j+1|)/2+G i,j (14)
Wherein X represents the color component of current pixel point, and Y represents current pixel point disappearance B or R color component, and i, j represent the coordinate position of current pixel point.
Two, the R of G component pixel point disappearance and the recovery of B component
The R component of G component pixel point disappearance is asked on average by two horizontal or vertical R components and is obtained, and the B component of G component pixel point disappearance is then asked on average by level or two vertical R components and obtained, that is:
Y I, j=(Y I-1, j+ Y I+1, j)/2 or Y I, j=(Y I, j-1+ Y I, j+1)/2 (15)
Step (1) example
Further the present invention will be described and describe below in conjunction with the concrete arrangement mode of Fig. 1, so that understand method of the present invention.
One, the recovery of disappearance G component pixel point
(1), use R or B component that current pixel point comprised, in vertical direction, horizontal direction, two diagonals, the compute gradient value selects minimal gradient value direction as edge direction.
In this example, with disappearance G component pixel point R 3,4Describe.Calculate multi-direction Grad:
diff 1=|(R 1,4+R 5,4)/2-R 3,4|
diff 2=|(R 3,2+X 3,6)/2-R 3,4|
diff 3=|(R 1,2+R 5,6)/2-R 3,4|
diff 4=|(R 1,6+R 5,2)/2-R 3,4|
(2), the G component that comprises the pixel recovery current pixel point of G component in a side of selection edge, edge direction both sides difference minimum.
1) if diff 1Minimum, vertical direction are carried out the G component as edge direction and are recovered.
If a) | R 3,4-R 3,2|>| R 3,4-R 3,6|, i.e. right side edge difference minimum, the G component G ' of current pixel point 3,4
G 3,4=G 3,5
B) if | R 3,4-R 3,2|≤| R 3,4-R 3,6|, i.e. left side edge difference minimum, the G component G of current pixel point 3,4
G 3,4=G 3,3
2) if diff 2Minimum, horizontal direction are carried out the G component as edge direction and are recovered.
A), | R 3,4-R 1,4|>| R 3,4-R 5,4|, i.e. lower edge difference minimum, the G component G of current pixel point I, jG 3,4=G 4,4
B), | R 3,4-R 1,4|≤| R 3,4-R 5,4|, i.e. upper edge difference minimum, the G component G of current pixel point I, jG 3,4=G 2,4
3) if diff 3Minimum is tiltedly descended direction to carry out the G component as edge direction and is recovered, and uses the 2nd) a, b step carry out the G component and recover.
4) if diff 4Minimum, oblique upper recovers to carry out the G component as edge direction, uses the 1st) a, b step carry out the G component and recover.
(3), the recovery of current pixel point disappearance B component.
According to calculating multi-direction Grad, judge:
1) if diff 1Minimum, vertical direction lack the recovery of B component as edge direction.
If a) | R 3,4-R 3,2|>| R 3,4-R 3,6|, i.e. right side edge difference minimum, disappearance B component is:
B 3,4=(|B 2,5-G 2,5|+|B 4,5-G 4,5|)/2+G 3,4
B) if | R 3,4-R 3,2|≤| R 3,4-R 3,6|, i.e. left side edge difference minimum, disappearance B component is:
B 3,4=(|B 2,3-G 2,3|+|B 4,3-G 4,3|)/2+G 3,4
2) if diff 2Minimum, horizontal direction lack the recovery of B component as edge direction.
A), | R 3,4-R 1,4|>| R 3,4-R 5,4|, i.e. lower edge difference minimum, disappearance B component is:
B 3,4=(|B 4,3-G 4,3|+|B 4,5-G 4,5|)/2+G 3,4
B), | R 3,4-R 1,4|≤| R 3,4-R 5,4|, i.e. upper edge difference minimum, disappearance B component is:
B 3,4=(|B 2,3-G 2,3|+|B 2,5-G 2,5|)/2+G 3,4
3) if diff 3Minimum, edge direction is the oblique direction down of diagonal, directly with the absolute value of the difference of B, the G of two pixels of B that current pixel point lacked on this edge direction or R component or R, G component on average after, add that the G component of current pixel point recovers, promptly
B 3,4=(|B 2,3-G 2,3|+|B 4,5-G 4,5|)/2+G 3,4
4) if diff 4Minimum, edge direction be diagonal oblique upper to, directly with the absolute value of the difference of B, the G of two pixels of B that current pixel point lacked on this edge direction or R component or R, G component on average after, add that the G component of current pixel point recovers, promptly
B 3,4=(|B 4,3-G 4,3|+|B 2,5-G 2,5|)/2+G 3,4
Wherein X represents the color component of current pixel point, and Y represents current pixel point disappearance color component, and i, j represent the coordinate position of current pixel point.
Two, the R of G component pixel point disappearance and the recovery of B component
The R component of G component pixel point disappearance is asked on average by two horizontal or vertical R components and is obtained, and the B component of G component pixel point disappearance is then asked on average by level or two vertical R components and obtained, in this example, and with G 3,3Be example:
B 3,3=(B 2,3+ B 4,3)/2 or R 3,3=(R 3,2+ R 3,4)/2
Although above the illustrative embodiment of the present invention is described; but should be understood that; the invention is not restricted to the scope of embodiment; to those skilled in the art; as long as various variations appended claim limit and the spirit and scope of the present invention determined in; these variations are conspicuous, and all utilize innovation and creation that the present invention conceives all at the row of protection.

Claims (3)

1. a method that is used for the Baeyer data interpolating comprises recovery and the R of G component pixel point disappearance and the recovery of B component of disappearance G component pixel point, it is characterized in that the recovery of disappearance G component pixel point may further comprise the steps:
(1) use R or the B component that current pixel point comprised, in vertical direction, horizontal direction, two diagonals, the compute gradient value selects minimal gradient value direction as edge direction;
(2) pixel of selecting a side of edge difference minimum to comprise the G component in the edge direction both sides recovers the G component of current pixel point;
(3) to the recovery of current pixel point disappearance B or R component.
2. the method that is used for the Baeyer data interpolating according to claim 1 is characterized in that, described the reverting to current pixel point disappearance B or R component of step (3):
On the basis of step (1), the R or the B component that comprise according to edge direction and current pixel point, if edge direction is horizontal or vertical direction, edge calculation direction both sides difference then, select a minimum side, from current pixel point recently and comprise the absolute value of difference of B, the G of two pixels that color component is B that current pixel point lacked or R component or R, G component average after, add that the G component of current pixel point recovers; If edge direction is a diagonal, directly with the absolute value of the difference of B, the G of two pixels of B that current pixel point lacked on this edge direction or R component or R, G component average after, add that the G component of current pixel point recovers.
3. the method that is used for the Baeyer data interpolating according to claim 1 is characterized in that, the reverting to of the R of described G component pixel point disappearance and B component:
The R component of G component pixel point disappearance is asked on average by two horizontal or vertical R components and is obtained, and the B component of G component pixel point disappearance is then asked on average by level or two vertical R components and obtained.
CN2008101478636A 2008-12-15 2008-12-15 Method for Bayer Data interplation Expired - Fee Related CN101511031B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101478636A CN101511031B (en) 2008-12-15 2008-12-15 Method for Bayer Data interplation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101478636A CN101511031B (en) 2008-12-15 2008-12-15 Method for Bayer Data interplation

Publications (2)

Publication Number Publication Date
CN101511031A CN101511031A (en) 2009-08-19
CN101511031B true CN101511031B (en) 2010-07-14

Family

ID=41003261

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101478636A Expired - Fee Related CN101511031B (en) 2008-12-15 2008-12-15 Method for Bayer Data interplation

Country Status (1)

Country Link
CN (1) CN101511031B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2523162B1 (en) * 2010-01-06 2019-05-08 Nec Corporation Learning device, identification device, learning identification system and learning identification device
CN101917629B (en) * 2010-08-10 2012-03-07 浙江大学 Green component and color difference space-based Bayer format color interpolation method
CN102625133B (en) * 2011-01-31 2014-11-05 英属开曼群岛商恒景科技股份有限公司 Detection method of image sensing of bad pixel
CN102630019B (en) * 2012-03-27 2014-09-10 上海算芯微电子有限公司 Demosaicking method and device
CN102938843B (en) 2012-11-22 2014-12-03 华为技术有限公司 Image processing method, image processing device and imaging device
CN103248907B (en) * 2013-04-22 2015-07-22 雷欧尼斯(北京)信息技术有限公司 Three-dimensional image reduction method
CN103313066B (en) * 2013-05-08 2015-07-08 华为技术有限公司 Interpolation method and device
CN103716606B (en) * 2013-12-30 2015-10-14 上海富瀚微电子股份有限公司 A kind of method of Bayer area image down-sampling, device and picture pick-up device
CN105577981A (en) * 2015-12-22 2016-05-11 深圳大学 Edge self-adaptive color restoration method and system
CN105578160A (en) * 2015-12-23 2016-05-11 天津天地伟业数码科技有限公司 Fine definition demosaicking interpolation method based on FPGA platform
CN105959657A (en) * 2016-05-27 2016-09-21 乐视控股(北京)有限公司 Image processing method and system
CN108024100A (en) * 2017-12-15 2018-05-11 上海交通大学 Based on the Bayer format image interpolation method for improving edge guiding
CN111340693B (en) * 2019-08-29 2023-12-01 杭州海康慧影科技有限公司 Interpolation method and device of Bayer image and electronic equipment
CN112788310B (en) * 2019-11-05 2022-11-01 瑞昱半导体股份有限公司 Image processing method and related image processing circuit

Also Published As

Publication number Publication date
CN101511031A (en) 2009-08-19

Similar Documents

Publication Publication Date Title
CN101511031B (en) Method for Bayer Data interplation
KR100782812B1 (en) Method and apparatus for edge adaptive color interpolation
US7825965B2 (en) Method and apparatus for interpolating missing colors in a color filter array
US10565681B2 (en) System and method for image demosaicing
KR100818447B1 (en) Method of interpolating color detected using color filter
JP4054184B2 (en) Defective pixel correction device
CN102959958B (en) Color imaging device
CN101917629B (en) Green component and color difference space-based Bayer format color interpolation method
US7995840B2 (en) Image processing apparatus, image processing method, and program for attaining image processing
JP4253655B2 (en) Color interpolation method for digital camera
US9111365B2 (en) Edge-adaptive interpolation and noise filtering method, computer-readable recording medium, and portable terminal
US7653240B1 (en) Color filter array and method
US9030579B2 (en) Image processing apparatus and control method that corrects a signal level of a defective pixel
US20130077858A1 (en) Image processing module and image processing method
US8606016B2 (en) Edge detection apparatus and computing circuit employed in edge detection apparatus
US8045826B2 (en) Detecting edges in a digital images
WO1997048231A1 (en) Method and system for reconstructing missing chrominance values with interpolation for a single-sensor color imaging systems
CN103384334A (en) Image processing apparatus, image processing method and program
KR101327790B1 (en) Image interpolation method and apparatus
CN115471420A (en) Image processing device, imaging apparatus, method, electronic apparatus, and storage medium
CN116416126A (en) Method for solving pseudo-color problem in Bayer image interpolation algorithm
CN103313066A (en) Interpolation method and device
KR100776385B1 (en) Color interpolation apparatus for edge enhancement and noise removal
CN104506784A (en) Bell format image broken line eliminating method based on directional interpolation correction
CN110544210B (en) Bayer CFA image recovery method based on fuzzy boundary interpolation

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100714

Termination date: 20151215

EXPY Termination of patent right or utility model