CN102254301B - Demosaicing method for CFA (color filter array) images based on edge-direction interpolation - Google Patents

Demosaicing method for CFA (color filter array) images based on edge-direction interpolation Download PDF

Info

Publication number
CN102254301B
CN102254301B CN 201110207617 CN201110207617A CN102254301B CN 102254301 B CN102254301 B CN 102254301B CN 201110207617 CN201110207617 CN 201110207617 CN 201110207617 A CN201110207617 A CN 201110207617A CN 102254301 B CN102254301 B CN 102254301B
Authority
CN
China
Prior art keywords
pixel
image
value
delta
interpolation
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
CN 201110207617
Other languages
Chinese (zh)
Other versions
CN102254301A (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.)
Xidian University
Original Assignee
Xidian University
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 Xidian University filed Critical Xidian University
Priority to CN 201110207617 priority Critical patent/CN102254301B/en
Publication of CN102254301A publication Critical patent/CN102254301A/en
Application granted granted Critical
Publication of CN102254301B publication Critical patent/CN102254301B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a demosaicing method for CFA (color filter array) images based on edge-direction interpolation. The demosaicing method for CFA images mainly solves the problems that the interpolation effect of the high-frequency part of an image is not good, and the false color effect is serious in the traditional demosaicing method. The demosaicing method for CFA images comprises the steps of: (1) inputting a CFA image to be demosaiced; (2) estimating the brightness; (3) interpolating a green channel; (4) respectively carrying out dual linear interpolation on a red channel and a blue channel; (5) respectively correcting the red channel, a green channel and the blue channel; and (6) outputting a colorful image. The demosaicing method for CFA images has the advantages of capability of better maintaining high-frequency information of the image, inhibiting the false color effect effectively and improving the visual effect of the demosaiced CFA image has short running time.

Description

CFA image demosaicing method based on the edge direction interpolation
Technical field
The invention belongs to technical field of image processing, further relate to the CFA image demosaicing method based on the edge direction interpolation in image-recovery technique field.The present invention carries out interpolation to the CFA image that mosaic effect is arranged, to obtain to have the coloured image of three passage full details of red, green, blue.The present invention can be used in the patrilineal line of descent with only one son in each generation sense camera, processes as the CFA image that post-processing algorithm is caught CCD or cmos sensor, recovers complete digital color image, thereby remedies owing to reducing losing of image color information that the camera hardware cost brings.
Background technology
Digital color image represents color value with the red, green, blue three primary colours usually.For cost consideration, what present most of camera adopted is single CCD or cmos sensor, by add a color filter array (color filer array, CFA) before sensor, only represents coloured image with a matrix.Only have a color value on each pixel, two other color value then comes interpolation according to its neighborhood information, and this interpolation technique is called as " demosaicing " (demosaicking).CFA image demosaicing is in fact an ill-condition problem, and namely the information by known former Fig. 1/3 recovers whole information.The CFA of Bayer (Bayer) pattern is owing to simply and efficiently, being be most widely used at present a kind of.In the CFA of Bayer pattern, there are two pixels to only have green value in every four adjacent pixels, other two are only had respectively red value, blue valve.
Existing CFA image demosaicing technology can be divided into linear interpolation techniques and non-linear interpolation technology simply.Linear interpolation is the simplest also the most representative bilinear interpolation and two cube interpolation.The advantage of bilinear interpolation and two cube interpolation techniques is that its realization is simple, and speed is fast; But its shortcoming also is apparent: in image, can produce serious artificial trace (such as color fringing, i.e. false colour effect), and especially more outstanding at the HFS of image.Compare linear interpolation techniques, the non-linear interpolation technology is more complicated, owing to having considered the interchannel correlativity of RGB, its interpolation successful is better than linear interpolation techniques.This class technology has a lot, for example, S.Pei and I.Tam are at article " Effective color interpolation in CCD color filter array using signal correlation " (Proc.Int.Conf.Image Process., Sep.2000, PP.488-491) the middle efficient interpolation technique that utilizes signal correction that proposes.The non-linear interpolation technology comprises that also some are based on the demosaicing technology of iterative algorithm, such as B.Gunturk, Deng people " Color plane interpolation using alternating projections " (IEEE Trans.Image Process. in article, vol.11, no.9, pp.997-1013, Sep.2002) the alternating projection method that proposes in, Wenmain Lu and Yap-peng Tan " Color filter array demosaicing:new method and performance measures " (IEEE Trans.Image Process. in article and for example, vol.12, no.10, pp.1194-1210, Oct.2003) the middle demosaicing method that proposes.A kind of coloured image demosaicing technology based on rarefaction representation has been proposed in recent years, such as people such as Julien Mairal at article " Sparse representation for color image restoration " (IEEE Trans.Image Process., vol.17, no.1, Jan.2008) the middle method of describing.Corresponding sparse dictionary be learnt and be trained to this method need to mass data, and then according to dictionary reconstruct coloured image, algorithm is more complicated.In a word, although the non-linear interpolation technology can obtain the high-quality color image, its complexity is high, and calculation cost is large.
The patented claim that Microsoft proposes " high-quality gradient that is used for the coloured image demosaicing is proofreaied and correct the linear interpolation " (applying date: on 03 15th, 2005, application number: 200510055929.5, publication number: disclose a kind of gradient calibration linear interpolation method and system for the coloured image demosaicing CN1722852).The value of required color is at first estimated by the method and system with existing linear interpolation techniques such as bilinear interpolation technology, then come the calculation correction item by the gradient of calculating required color on the current pixel, last this interpolation of linear combination and correction term are omitted color-values to produce on the pixel.The method directly affects with gradient and proofreaies and correct by the color-values that has the interpolation technique estimation now.The weak point of the method is: only utilized gradient to proofread and correct the result of bilinear interpolation, although than bilinear interpolation certain improvement has been arranged, still not ideal to image detail section processes effect, false colour effect is still serious.
The people such as Zhang are at article " Color demosaicking via directional linear minimum mean square-error estimation " (IEEE Trans.Image Process., vol.14, no.12, pp.2167-2178, Dec.2005.) a kind of demosaicing method based on direction linear sowing square estimation of error of middle proposition.The method utilizes linear sowing square estimation of error (LMMSE) that red green and bluish-green difference signal is estimated from level and vertical both direction, then to each pixel with two green estimated value optimization fusions so that the variance of itself and neighborhood territory pixel is minimum, at last by difference signal linear sowing square estimation of error being reconstructed the full detail of three passages.The weak point of the method is: the method need to repeatedly be estimated and merge, although the treatment of details of image is made moderate progress, algorithm complex is high, and program runtime is long.
Summary of the invention
The present invention is directed to existing demosaicing algorithm to the defective of the HFS interpolation poor effect of image, a kind of CFA image demosaicing method based on the edge direction interpolation has been proposed, by take the brightness of accurate estimation as instructing the correction of green channel after edge direction interpolation and the interpolation, so that the interpolation result of the HFS of image is significantly improved, establishment false colour effect.
For achieving the above object, the present invention includes following key step:
(1) input one width of cloth is treated the CFA image of demosaicing;
(2) estimated brightness
2a) 9 * 9 wave filter Γ of design 1With 5 * 5 wave filter Γ 2
2b) use respectively wave filter Γ 1And Γ 2To input CFA image filtering, obtain and input image I after the filtering of the same size of CFA image Γ 1And I Γ 2, two width of cloth image co-registration are obtained a width of cloth luminance picture
Figure BSA00000543555000031
(3) to the green channel interpolation
3a) calculate luminance picture
Figure BSA00000543555000032
Gradient delta H on the horizontal and vertical directions, Δ V;
3b) relatively Δ H and Δ V are big or small, obtain the matrix of edge E of horizontal and vertical direction hAnd E v
3c) according to horizontal and vertical direction matrix of edge E hAnd E vJudge the interpolation direction and to the green channel interpolation;
(4) red and blue channel are carried out respectively bilinear interpolation;
(5) respectively the red, green, blue passage is revised;
(6) output coloured image.
The present invention has the following advantages compared with prior art:
The first, the present invention is by revising after edge direction interpolation and interpolation green channel as instructing take the brightness of accurate estimation so that the interpolation effect of the HFS of image is significantly improved, good visual effect, establishment false colour effect;
The second, interpolation of the present invention adopts linear method, and calculated amount is little, and travelling speed is fast, compares with some existing iterative algorithms based on the algorithm of linear sowing square estimation of error with prior art, and working time is short, has shortened the camera imaging time.
Description of drawings
Fig. 1 is process flow diagram of the present invention;
Fig. 2 is prior art demosaicing design sketch;
Fig. 3 is demosaicing design sketch of the present invention.
Embodiment
Below in conjunction with accompanying drawing 1, the step that the present invention is realized is described in further detail:
Step 1 is inputted the CFA image I that a width of cloth is treated demosaicing s
The CFA image for the treatment of demosaicing is the CFA image of Bayer (Bayer) pattern, and each pixel only has a color value in the three primary colours known in this image, all the other two color value the unknowns; In four pixels of every adjacent 2 * 2 image blocks of CFA image two known green values of pixel are arranged, two other pixel is known red value, blue valve respectively.
Step 2, estimated brightness
2a) according to 9 * 9 wave filter Γ of following formula design 1With 5 * 5 wave filter Γ 2
Γ = A ( H T σ - 1 H + λ 1 M 1 T M 1 + λ 2 M 2 T M 2 ) - 1 H T σ - 1
Wherein, Γ is the wave filter of required design, A is the transition matrix that the RGB coloured image is converted into brightness space, H is the decimation factor that the RGB color picture sampling becomes Bayer form A FA image, T is matrix transpose operator, and-1 is the matrix inversion operation symbol, and σ is noise variance, σ=0.00001, constant λ 1=0.0008, λ 2=0.02, M 1And M 2Be filtering matrix,
Figure BSA00000543555000042
I 3Be 3 * 3 unit matrixs, S 1Be Hi-pass filter, Expression Kronecker (Kronecker) operator, M 2By Hi-pass filter S 2Obtain by the following formula computing:
M 2 = 1.547 - 0.577 - 0.577 - 0.577 1.547 - 0.577 - 0.577 - 0.577 1.547 ⊗ S 2
The matrix A size is got 81 * 243 unit matrixs in the following formula, and the matrix H size is taken as 81 * 243, calculates 81 * 81 matrixes according to formula, and this matrix the 41st row is taken out, and is arranged in 9 * 9 matrixes, i.e. wave filter Γ 1
The matrix A size is taken as 75 * 25 unit matrixs in the following formula, and the matrix H size is taken as 25 * 75, calculates 25 * 25 matrixes according to formula.This matrix the 13rd row is taken out, be arranged in 5 * 5 matrixes, i.e. wave filter Γ 2
2b) use respectively wave filter Γ 1And Γ 2To image I sFiltering.
With the CFA image I sRespectively with wave filter Γ 1And Γ 2Carry out two-dimensional convolution, obtain two width of cloth and image I sImage I of the same size Γ 1And I Γ 2Two width of cloth image co-registration are obtained a width of cloth luminance picture
Figure BSA00000543555000045
Fusion rule is as follows: when location of pixels index i and j are odd number or are even number,
Figure BSA00000543555000046
Be the brightness value of pixel (i, j), I Γ 1(i, j) is image I Γ 1The value of middle pixel (i, j), otherwise,
Figure BSA00000543555000051
I Γ 2(i, j) is image I Γ 2The value of middle pixel (i, j) has obtained a width of cloth luminance picture thus
Figure BSA00000543555000052
Step 3 is to the green channel interpolation
3a) calculate luminance picture
Figure BSA00000543555000053
Gradient delta H on the horizontal and vertical directions, Δ V, computing formula is as follows:
ΔH ( i , j ) = D h ( i , j ) + 1 2 D h ( i , j - 1 ) + 1 2 D h ( i , j + 1 ) ΔV ( i , j ) = D v ( i , j ) + 1 2 D v ( i - 1 , j ) + 1 2 D v ( i + 1 , j )
D h ( i , j ) = | L ^ ( i , j ) - L ^ ( i , j - 1 ) | + | L ^ ( i , j ) - L ^ ( i , j + 1 ) | + | 2 L ^ ( i , j ) - L ^ ( i , j - 2 ) - L ^ ( i , j + 2 ) | D v ( i , . j ) = | L ^ ( i , j ) - L ^ ( i - 1 , j ) | + | L ^ ( i , j ) - L ^ ( i + 1 , j ) | + | 2 L ^ ( i , j ) - L ^ ( i - 2 , j ) - L ^ ( i + 2 , j ) |
Wherein, the location index of (i, j) expression pixel, namely this pixel is positioned at the capable j row of i, and Δ H (i, j) is the horizontal gradient of pixel (i, j), D hBe the horizontal gradient operator, Δ V (i, j) is the VG (vertical gradient) of pixel (i, j), D vBe the VG (vertical gradient) operator,
Figure BSA00000543555000056
Be the brightness value of pixel (i, j), | * | the expression signed magnitude arithmetic(al).
3b) relatively Δ H and Δ V are big or small, obtain the matrix of edge E of horizontal and vertical direction according to following formula hAnd E v:
e h ( i , j ) = 1 , &Delta;H ( i , j ) < &Delta;V ( i , j ) 0.5 , &Delta;H ( i , j ) = &Delta;V ( i , j ) 0 , &Delta;H ( i , j ) > &Delta;V ( i , j ) , e v ( i , j ) = 1 , &Delta;H ( i , j ) > &Delta;V ( i , j ) 0.5 , &Delta;H ( i , j ) = &Delta;V ( i , j ) 0 , &Delta;H ( i , j ) < &Delta;V ( i , j ) ,
E h ( i , j ) = e h ( i , j - 2 ) + e h ( i , j ) + e h ( i , j - 2 ) E v ( i , j ) = e v ( i - 2 , j ) + e v ( i , j ) + e v ( i - 2 , j )
Wherein, e h(i, j) is the horizontal edge quantized value of pixel (i, j), and Δ H is horizontal gradient, and Δ V is VG (vertical gradient), e v(i, j) is the vertical edge quantized value of pixel (i, j), E h(i, j) is the terminal level rim value of pixel (i, j), E v(i, j) is the final vertical edge value of pixel (i, j).
3c) according to horizontal and vertical direction matrix of edge E hAnd E vJudge the interpolation direction and to the green channel interpolation, circular is as follows:
When matrix E hThe capable j column element of i E hThe value of (i, j) is more than or equal to 2.5 o'clock, the green estimated value of pixel (i, j) Calculated by following formula:
G ^ ( i , j ) = L ^ ( i , j ) - &Sigma; n &PlusMinus; 1 ( L ^ ( i , j + n ) - c ( i , j + n ) ) 2 - 2 ( L ^ ( i , j ) - c ( i , j ) ) - &Sigma; l = &PlusMinus; 2 ( L ^ ( i , j + l ) - c ( i , j + l ) ) 4
Wherein, Be the green estimated value of pixel (i, j),
Figure BSA00000543555000064
Be the brightness value of pixel (i, j), the known color value of c (i, j) expression pixel (i, j), n and l are constant, ∑ represents accumulating operation;
When matrix E vThe capable j column element of i E vThe value of (i, j) is more than or equal to 2.5 o'clock, the green estimated value of pixel (i, j)
Figure BSA00000543555000065
Calculated by following formula:
G ^ ( i , j ) = L ^ ( i , j ) - &Sigma; m = &PlusMinus; 1 ( L ^ ( i + m , j ) - c ( i + m , j ) ) 2 - 2 ( L ^ ( i , j ) - c ( i , j ) ) - &Sigma; k = &PlusMinus; 2 ( L ^ ( i + k , j ) - c ( i + k , j ) ) 4
Wherein,
Figure BSA00000543555000067
Be the green estimated value of pixel (i, j), Be the brightness value of pixel (i, j), the known color value of c (i, j) expression pixel (i, j), m and k are constant, ∑ represents accumulating operation;
Other situation, the green estimated value of pixel (i, j)
Figure BSA00000543555000069
Calculated by following formula:
G ^ ( i , j ) = L ^ ( i , j ) - &Sigma; m = &PlusMinus; 1 , n = &PlusMinus; 1 ( L ^ ( i + m , j + n ) - c ( i + m , j + n ) ) 4 - 2 ( L ^ ( i , j ) - c ( i , j ) ) - &Sigma; k = &PlusMinus; 2 , l = &PlusMinus; 2 ( L ^ ( i + k , j + l ) - c ( i + k , j + l ) ) 8
Wherein,
Figure BSA000005435550000611
Be the green estimated value of pixel (i, j),
Figure BSA000005435550000612
Be the brightness value of pixel (i, j), the known color value of c (i, j) expression pixel (i, j), m, n, k and l are constant, ∑ represents accumulating operation.
Obtained thus a green channel image that all has green value in all pixel position.
Step 4 is carried out respectively bilinear interpolation to red and blue channel
4a) for the pixel (i, j) of known green value, the red estimated value of this pixel
Figure BSA000005435550000613
Calculated by following formula:
R ^ b ( i , j ) = G ^ ( i , j ) - 1 4 &Sigma; m , n &Element; { 1 , - 1 } [ G ^ ( i + m , j + n ) - r ( i + m , j + n ) ]
Wherein,
Figure BSA000005435550000615
Be the red estimated value of pixel (i, j),
Figure BSA000005435550000616
Be the green value after pixel (i, the j) interpolation, m and n are integer, and r (i+m, j+n) is the known red value of pixel (i+m, j+n).
4b) for the pixel (i, j) that is positioned at known green value, the pixel (i, j-1) about this pixel and (i, j+1) are the pixel of known green value, their red estimated value
Figure BSA000005435550000617
Calculated by following formula:
R ^ g 1 ( i , j ) = g ( i , j ) - 1 2 &Sigma; n &Element; { 1 , - 1 } [ G ^ ( i , j + n ) - r ( i , j + n ) ]
Wherein,
Figure BSA00000543555000072
Be the red estimated value of pixel (i, j),
Figure BSA00000543555000073
Be the green value after pixel (i, the j) interpolation, n is integer, and r (i, j+n) is the known red value of pixel (i, j+n).
4c) for the pixel (i, j) that is positioned at known red value, this pixel pixel (i-1, j) and (i+1, j) up and down is the pixel of known green value, their red estimated value
Figure BSA00000543555000074
Calculated by following formula:
R ^ g 2 ( i , j ) = g ( i , j ) - 1 2 &Sigma; m &Element; { 1 , - 1 } [ G ^ ( i + m , j ) - r ( i + m , j ) ]
Wherein, Be the red estimated value of pixel (i, j), m is integer,
Figure BSA00000543555000077
Be the green value after pixel (i+m, the j) interpolation, r (i+m, j) is the known red value of pixel (i+m, j).
Obtained thus a width of cloth all has red value in all pixel position red channel image.
4d) for the pixel (i, j) of known red value, the blue estimated value of this pixel Calculated by following formula:
B ^ r ( i , j ) = G ^ ( i , j ) - 1 4 &Sigma; m , n &Element; { 1 , - 1 } [ G ^ ( i + m , j + n ) - b ( i + m , j + n ) ]
Wherein,
Figure BSA000005435550000710
Be the blue estimated value of pixel (i, j), m and n are integer,
Figure BSA000005435550000711
Be the green value after pixel (i+m, the j+n) interpolation, b (i+m, j+n) is the known blue valve of pixel (i+m, j+n).
4e) for the pixel (i, j) that is positioned at known green value, the pixel (i, j-1) about this pixel and (i, j+1) are the pixel of known green value, their blue estimated value
Figure BSA000005435550000712
Calculated by following formula:
B ^ g 2 ( i , j ) = g ( i , j ) - 1 2 &Sigma; n &Element; { 1 , - 1 } [ G ^ ( i , j + n ) - b ( i , j + n ) ]
Wherein, Be the blue estimated value of pixel (i, j), n is integer,
Figure BSA000005435550000715
For pixel (i, j+n) is inserted
Green value after the value, b (i, j+n) are the known red value of pixel (i, j+n).
4f) for the pixel (i, j) that is positioned at known red value, this pixel pixel (i-1, j) and (i+1, j) up and down is the pixel of known green value, their red estimated value Calculated by following formula:
B ^ g 1 ( i , j ) = g ( i , j ) - 1 2 &Sigma; m &Element; { 1 , - 1 } [ G ^ ( i + m , j ) - b ( i + m , j ) ]
Wherein,
Figure BSA000005435550000718
Be the blue estimated value of pixel (i, j), m is integer,
Figure BSA000005435550000719
Be the green value after pixel (i+m, the j) interpolation, b (i+m, j) is the known blue valve of pixel (i+m, j).
Obtained thus a width of cloth all has red value in all pixel position blue channel image.
4b) for the pixel (i, j) of known R component, the estimated value of this pixel B component
Figure BSA00000543555000081
Calculated by following formula.
B ^ r ( i , j ) = G ^ ( i , j ) - 1 4 &Sigma; m , n &Element; { 1 , - 1 } [ G ^ ( i + m , j + n ) - b ( i + m , j + n ) ]
For the pixel (i, j) that is positioned at known B component, the pixel (i, j-1) about this pixel and (i, j+1) are the pixel of known G component, then their B component estimated value
Figure BSA00000543555000083
Calculated by following formula
B ^ g 2 ( i , j ) = g ( i , j ) - 1 2 &Sigma; n &Element; { 1 , - 1 } [ G ^ ( i , j + n ) - b ( i , j + n ) ]
For the pixel (i, j) that is positioned at known B component, this pixel pixel (i, j-1) and (i, j+1) up and down is the pixel of known G component, then the estimated value of their B component
Figure BSA00000543555000085
Calculated by following formula.
B ^ g 1 ( i , j ) = g ( i , j ) - 1 2 &Sigma; m &Element; { 1 , - 1 } [ G ^ ( i + m , j ) - b ( i + m , j ) ]
Obtained thus a B component image that all has the B component information in all pixel position
Figure BSA00000543555000087
Step 5 is revised the red, green, blue passage respectively
5a) calculate the horizontal and vertical gradient of green channel after the interpolation according to following formula:
&Delta;H g ( i , j ) = | G ( i , j - 1 ) - G ( i , j + 1 ) | + 1 2 | 2 G ( i , j ) - G ( i , j - 1 ) - G ( i , j + 1 ) | &Delta;V g ( i , j ) = | G ( i - 1 , j ) - G ( i + 1 , j ) | + 1 2 | 2 G ( i , j ) - G ( i - 1 , j ) - G ( i + 1 , j ) |
Wherein, Δ H g(i, j) is green channel pixel (i, j) horizontal gradient value after the interpolation, and G (i, j) is green channel pixel (i, j) green value after the interpolation, Δ V g(i, j) is green channel pixel (i, j) VG (vertical gradient) value after the interpolation;
To calculate according to following formula to the correction of known red value pixel in the green channel after the interpolation 5b):
G ~ ( i , j ) = r ( i , j ) + w 2 ( g ( i - 1 , j ) - R ( i - 1 , j ) ) + w 7 ( g ( i + 1 , j ) - R ( i + 1 , j ) ) w 2 + w 7 , &Delta;H g ( i , j ) > &Delta; V g ( i , j ) w 4 ( g ( i , j - 1 ) - R ( i , j - 1 ) ) + w 5 ( g ( i , j + 1 ) - R ( i , j + 1 ) ) w 4 + w 5 , &Delta;H g ( i , j ) < &Delta;V g ( i , j ) &Sigma; k = 1 8 w k ( g ( i + m k , j + n k ) - R ( i + m k , j + n k ) ) &Sigma; k = 1 8 w k , &Delta;H g ( i , j ) = &Delta;V g ( i , j )
w k = 1 [ 1 + ( r ( i , j ) - r ( i + m k , j + n k ) ) 2 ] 1 / 2
m k∈{-2,-2,-2,0,0,2,2,2},n k∈{-2,0,2,-2,2,-2,0,2},k=1,2...8
Wherein,
Figure BSA00000543555000093
Be the revised green value of pixel (i, j), r (i, j) is pixel (i, j) known red value, g (i-1, j) are the known green value of pixel (i-1, j), red value after R (i-1, j) pixel (i-1, the j) interpolation, w kBe weights, m kAnd n kBe integer;
To calculate according to following formula to the correction of known blue valve pixel in the green channel after the interpolation 5c):
G ~ ( i , j ) = b ( i , j ) + w 2 ( g ( i - 1 , j ) - B ( i - 1 , j ) ) + w 7 ( g ( i + 1 , j ) - B ( i + 1 , j ) ) w 2 + w 7 , &Delta;H g ( i , j ) > &Delta; V g ( i , j ) w 4 ( g ( i , j - 1 ) - B ( i , j - 1 ) ) + w 5 ( g ( i , j + 1 ) - B ( i , j + 1 ) ) w 4 + w 5 , &Delta;H g ( i , j ) < &Delta;V g ( i , j ) &Sigma; k = 1 8 w k ( g ( i + m k , j + n k ) - B ( i + m k , j + n k ) ) &Sigma; k = 1 8 w k , &Delta;H g ( i , j ) = &Delta;V g ( i , j )
w k = 1 [ 1 + ( b ( i , j ) - b ( i + m k , j + n k ) ) 2 ] 1 / 2
m k∈{-2,-2,-2,0,0,2,2,2},n k∈{-2,0,2,-2,2,-2,0,2},k=1,2...8
Wherein,
Figure BSA00000543555000096
Be the revised green value of pixel (i, j), b (i, j) is pixel (i, j) known red value, g (i-1, j) are the known green value of pixel (i-1, j), red value after B (i-1, j) pixel (i-1, the j) interpolation, w kBe weights, m kAnd n kBe integer.
To calculate according to following formula to the red channel correction after the interpolation 5d):
R ~ ( i , j ) = G ~ ( i , j ) + &Sigma; k = 1 8 w k ( R ( i + m k , j + n k ) - G ~ ( i + m k , j + n k ) ) &Sigma; k = 1 8 w k
w k = 1 [ 1 + ( G ~ ( i , j ) - G ~ ( i + m k , j + n k ) ) 2 ] 1 / 2
m k∈{-2,-2,-2,0,0,2,2,2},n k∈{-2,0,2,-2,2,-2,0,2},k=1,2...8
Wherein,
Figure BSA00000543555000103
Be the revised red value of pixel (i, j),
Figure BSA00000543555000104
Be the revised green value of pixel (i, j), w kBe weights, m kAnd n kBe integer, R (i+m k, j+n k) be pixel (i+m after the interpolation k, j+n k) red value.
To calculate according to following formula to the blue channel correction after the interpolation 5e):
B ~ ( i , j ) = G ~ ( i , j ) + &Sigma; k = 1 8 w k ( B ( i + m k , j + n k ) - G ~ ( i + m k , j + n k ) ) &Sigma; k = 1 8 w k
w k = 1 [ 1 + ( G ~ ( i , j ) - G ~ ( i + m k , j + n k ) ) 2 ] 1 / 2
m k∈{-2,-2,-2,0,0,2,2,2},n k∈{-2,0,2,-2,2,-2,0,2},k=1,2...8
Wherein, Be the revised blue valve of pixel (i, j),
Figure BSA00000543555000108
Be the revised green value of pixel (i, j), w kBe weights, m kAnd n kBe integer, B (i+m k, j+n k) be pixel (i+m after the interpolation k, j+n k) blue valve.
Step 6, the output coloured image.
Will
Figure BSA00000543555000109
As three passages of RGB coloured image, obtain a width of cloth coloured image, Output rusults respectively.
Be described further below in conjunction with accompanying drawing 2,3 pairs of effects of the present invention of accompanying drawing.
Accompanying drawing 2 is demosaicing design sketchs of the prior art, and wherein, accompanying drawing 2 (a) is bilinear interpolation technology demosaicing design sketch; Accompanying drawing 2 (b) is alternating projection method demosaicing design sketch; Accompanying drawing 2 (c) is alternating projection method demosaicing design sketch; Accompanying drawing 2 (c) is iteration demosaicing method design sketch; Accompanying drawing 2 (d) is the method demosaicing design sketch that art is estimated based on the direction least mean-square error; Accompanying drawing 2 (e) is the method demosaicing design sketch of estimating continuously; Accompanying drawing 2 (f) is regularization method demosaicing design sketch.
The image of accompanying drawing 2 (b) derive from document " B.Gunturk; Y.Altunbasak; and R.Mersereau; " Color plane interpolation using alternating projections; " IEEE Trans.Image Process., vol.11, no.9, pp.997-1013, Sep.2002. ".
The image of accompanying drawing 2 (c) derive from document " Wenmain Lu and Yap-peng Tan; " Color filter array demosaicing:new method and performance measures; " IEEE Trans.Image Process., vol.12, no.10, pp.1194-1210, Oct.2003. ".
The image of accompanying drawing 2 (d) derive from document " L.Zhang and X.Wu; " Color demosaicking via directional linear minimum mean square-error estimation; " IEEE Trans.Image Process., vol.14, no.12, pp.2167-2178, Dec.2005. ".
The image of accompanying drawing 2 (e) derives from document " X.Li, " Demosaicing by successive approximation, " IEEE Trans.Image Process., vol.14, no.3, pp.370-379, Mar.2005. ".
Accompanying drawing 2 (f) is existing regularization method demosaicing design sketch, the method derive from document " D.Menon; G.Calvagno; " Regularization approaches to demosaicking; " IEEE Trans.Image Process., vol.18, no.10, Oct.2009 ".
Accompanying drawing 3 (d) is demosaicing design sketch of the present invention.
Contrast accompanying drawing 2 and accompanying drawing 3, the as a result figure that can find out the bilinear interpolation technology is the poorest, the false color that occurs is maximum, the false color that the as a result figure of alternating projection method and iteration demosaicing method occurs is also a lot, less based on the false color that the as a result figure of direction least mean-square error method of estimation and regularization method occurs, the false color that test findings figure of the present invention occurs is considerably less; Very approaching with the result of direction minimum mean square error method, but two width of cloth images carefully contrasted, can find out that residual false color of the present invention is less, visual effect of the present invention is better than other several method.

Claims (7)

1. the CFA image demosaicing method based on the edge direction interpolation comprises the steps:
(1) input one width of cloth is treated the CFA image of demosaicing;
(2) estimated brightness
2a) 9 * 9 wave filter Γ of design 1With 5 * 5 wave filter Γ 2
2b) use respectively wave filter Γ 1And Γ 2To input CFA image filtering, obtain and input image I after the filtering of the same size of CFA image Γ 1And I Γ 2, two width of cloth image co-registration are obtained a width of cloth luminance picture
Figure FSA00000543554900011
(3) to the green channel interpolation
3a) calculate luminance picture
Figure FSA00000543554900012
Gradient delta H on the horizontal and vertical directions, Δ V;
3b) relatively Δ H and Δ V are big or small, obtain the matrix of edge E of horizontal and vertical direction hAnd E v
3c) according to horizontal and vertical direction matrix of edge E hAnd E vJudge the interpolation direction and to the green channel interpolation;
(4) red and blue channel are carried out respectively bilinear interpolation;
(5) respectively the red, green, blue passage is revised;
(6) output coloured image.
2. the CFA image demosaicing method based on the edge direction interpolation according to claim 1, it is characterized in that: the wave filter step 2a) obtains according to following formula design:
&Gamma; = A ( H T &sigma; - 1 H + &lambda; 1 M 1 T M 1 + &lambda; 2 M 2 T M 2 ) - 1 H T &sigma; - 1
Wherein, Γ is the wave filter of required design, A is the transition matrix that the RGB coloured image is converted into brightness space, H is the decimation factor that the RGB color picture sampling becomes Bayer form A FA image, T is matrix transpose operator, and-1 is the matrix inversion operation symbol, and σ is noise variance, σ=0.00001, constant λ 1=0.0008, λ 2=0.02, M 1And M 2Be filtering matrix,
Figure FSA00000543554900014
I 3Be 3 * 3 unit matrixs, S 1Be Hi-pass filter,
Figure FSA00000543554900015
Expression Kronecker (Kronecker) operator, M 2By Hi-pass filter S 2Obtain by the following formula computing:
M 2 = 1.547 - 0.577 - 0.577 - 0.577 1.547 - 0.577 - 0.577 - 0.577 1.547 &CircleTimes; S 2
3. the CFA image demosaicing method based on the edge direction interpolation according to claim 1, it is characterized in that: the Image Fusion Rule step 2b) is as follows: when location of pixels index i and j are odd number or are even number,
Figure FSA00000543554900021
Figure FSA00000543554900022
Be the brightness value of pixel (i, j), I Γ 1(i, j) is image I Γ 1The value of middle pixel (i, j), otherwise,
Figure FSA00000543554900023
I Γ 2(i, j) is image I Γ 2The value of middle pixel (i, j).
4. the CFA image demosaicing method based on the edge direction interpolation according to claim 1, it is characterized in that: the gradient calculation formula on the direction of horizontal and vertical step 3a) is as follows:
&Delta;H ( i , j ) = D h ( i , j ) + 1 2 D h ( i , j - 1 ) + 1 2 D h ( i , j + 1 ) &Delta;V ( i , j ) = D v ( i , j ) + 1 2 D v ( i - 1 , j ) + 1 2 D v ( i + 1 , j )
D h ( i , j ) = | L ^ ( i , j ) - L ^ ( i , j - 1 ) | + | L ^ ( i , j ) - L ^ ( i , j + 1 ) | + | 2 L ^ ( i , j ) - L ^ ( i , j - 2 ) - L ^ ( i , j + 2 ) | D v ( i , . j ) = | L ^ ( i , j ) - L ^ ( i - 1 , j ) | + | L ^ ( i , j ) - L ^ ( i + 1 , j ) | + | 2 L ^ ( i , j ) - L ^ ( i - 2 , j ) - L ^ ( i + 2 , j ) |
Wherein, the location index of (i, j) expression pixel, namely this pixel is positioned at the capable j row of i, and Δ H (i, j) is the horizontal gradient of pixel (i, j), D hBe the horizontal gradient operator, Δ V (i, j) is the VG (vertical gradient) of pixel (i, j), D vBe the VG (vertical gradient) operator,
Figure FSA00000543554900026
Be the brightness value of pixel (i, j), | * | the expression signed magnitude arithmetic(al).
5. the CFA image demosaicing method based on the edge direction interpolation according to claim 1 is characterized in that: the matrix of edge E of the horizontal and vertical direction step 3b) hAnd E vObtain according to following formula:
e h ( i , j ) = 1 , &Delta;H ( i , j ) < &Delta;V ( i , j ) 0.5 , &Delta;H ( i , j ) = &Delta;V ( i , j ) 0 , &Delta;H ( i , j ) > &Delta;V ( i , j ) , e v ( i , j ) = 1 , &Delta;H ( i , j ) > &Delta;V ( i , j ) 0.5 , &Delta;H ( i , j ) = &Delta;V ( i , j ) 0 , &Delta;H ( i , j ) < &Delta;V ( i , j )
E h ( i , j ) = e h ( i , j - 2 ) + e h ( i , j ) + e h ( i , j - 2 ) E v ( i , j ) = e v ( i - 2 , j ) + e v ( i , j ) + e v ( i - 2 , j )
Wherein, e h(i, j) is the horizontal edge quantized value of pixel (i, j), and Δ H is horizontal gradient, and Δ V is VG (vertical gradient), e v(i, j) is the vertical edge quantized value of pixel (i, j), E h(i, j) is the terminal level rim value of pixel (i, j), E v(i, j) is the final vertical edge value of pixel (i, j).
6. the CFA image demosaicing method based on the edge direction interpolation according to claim 1 is characterized in that: the interpolation method step 3c): if matrix E hThe capable j column element of i E hThe value of (i, j) was carried out horizontal direction interpolation more than or equal to 2.5 o'clock to pixel (i, j); If matrix E vThe capable j column element of i E vThe value of (i, j) was carried out vertical direction interpolation more than or equal to 2.5 o'clock to pixel (i, j).
7. the CFA image demosaicing method based on the edge direction interpolation according to claim 1, it is characterized in that: the modification method described in the step (5): to pixel difference calculated level and the VG (vertical gradient) of interpolation in the green channel, if horizontal gradient is less than VG (vertical gradient), this pixel green value is carried out horizontal neighbors weighting correction, if horizontal gradient is greater than VG (vertical gradient), this pixel green value is carried out vertical neighborhood weighting correction, if horizontal gradient equals VG (vertical gradient), this pixel green value is carried out horizontal vertical neighborhood weighting correction; Red value and blue valve to interpolating pixel point all carry out horizontal vertical neighborhood weighting correction.
CN 201110207617 2011-07-22 2011-07-22 Demosaicing method for CFA (color filter array) images based on edge-direction interpolation Expired - Fee Related CN102254301B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110207617 CN102254301B (en) 2011-07-22 2011-07-22 Demosaicing method for CFA (color filter array) images based on edge-direction interpolation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110207617 CN102254301B (en) 2011-07-22 2011-07-22 Demosaicing method for CFA (color filter array) images based on edge-direction interpolation

Publications (2)

Publication Number Publication Date
CN102254301A CN102254301A (en) 2011-11-23
CN102254301B true CN102254301B (en) 2013-01-23

Family

ID=44981544

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110207617 Expired - Fee Related CN102254301B (en) 2011-07-22 2011-07-22 Demosaicing method for CFA (color filter array) images based on edge-direction interpolation

Country Status (1)

Country Link
CN (1) CN102254301B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102938843B (en) * 2012-11-22 2014-12-03 华为技术有限公司 Image processing method, image processing device and imaging device
CN103179407B (en) * 2013-03-11 2015-03-11 浙江大学 Implementation device and implementation method for demosaicing algorithm direction interpolation
US9280803B2 (en) 2013-04-25 2016-03-08 Mediatek Inc. Methods of processing mosaicked images
CN104240189B (en) * 2013-06-17 2017-05-24 富士通株式会社 Filtering method and device for restoring anti-aliasing edges
CN103347190B (en) * 2013-07-25 2015-01-21 华北电力大学 Edge-related and color-combined demosaicing and amplifying method
CN103595980B (en) * 2013-10-25 2015-08-05 西安电子科技大学 Based on the color filter array image demosaicing method of outline non-local mean value
CN103595981B (en) * 2013-10-25 2015-09-30 西安电子科技大学 Based on the color filter array image demosaicing method of non-local low rank
CN104038746B (en) * 2014-06-12 2016-06-08 北京英泰智软件技术发展有限公司 A kind of BAYER form view data interpolation method
CN104683767B (en) * 2015-02-10 2018-03-06 浙江宇视科技有限公司 Penetrating Fog image generating method and device
CN106162133B (en) * 2016-06-30 2018-11-09 北京大学 Color interpolation method based on adaptive directed filtering
CN106323947B (en) * 2016-10-08 2019-02-15 浙江全世科技有限公司 A kind of Vertical Observation position fast Optimization being applicable in MPT spectrometer
CN107341779B (en) * 2017-07-10 2020-06-16 西安电子科技大学 Color image demosaicing method based on physical imaging model
CN110246080B (en) * 2018-03-07 2023-03-28 舜宇光学(浙江)研究院有限公司 Demosaicing method and system thereof
CN108769641B (en) * 2018-06-04 2020-12-08 珠海欧比特宇航科技股份有限公司 Bayer color reconstruction method of video satellite image
CN113242389A (en) * 2021-07-12 2021-08-10 深圳市艾为智能有限公司 Multi-frame dynamic range extension method and system for RCCB (Rich communication Circuit Board) image sensor

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8165389B2 (en) * 2004-03-15 2012-04-24 Microsoft Corp. Adaptive interpolation with artifact reduction of images
US7502505B2 (en) * 2004-03-15 2009-03-10 Microsoft Corporation High-quality gradient-corrected linear interpolation for demosaicing of color images
CN101452573B (en) * 2007-12-04 2013-01-30 比亚迪股份有限公司 Image edge enhancing method
CN101227621A (en) * 2008-01-25 2008-07-23 炬力集成电路设计有限公司 Method of performing interpolation for CFA in CMOS sensor and circuit thereof
US7995840B2 (en) * 2008-03-28 2011-08-09 Seiko Epson Corporation Image processing apparatus, image processing method, and program for attaining image processing
CN102034225B (en) * 2010-12-20 2012-05-23 天津大学 Edge mode-based image color component interpolating method

Also Published As

Publication number Publication date
CN102254301A (en) 2011-11-23

Similar Documents

Publication Publication Date Title
CN102254301B (en) Demosaicing method for CFA (color filter array) images based on edge-direction interpolation
CN110119780B (en) Hyper-spectral image super-resolution reconstruction method based on generation countermeasure network
CN111062872B (en) Image super-resolution reconstruction method and system based on edge detection
CN102663719B (en) Bayer-pattern CFA image demosaicking method based on non-local mean
CN109741256B (en) Image super-resolution reconstruction method based on sparse representation and deep learning
CN106683067B (en) Deep learning super-resolution reconstruction method based on residual sub-images
CN112805744B (en) System and method for demosaicing multispectral images
CN109472743B (en) Super-resolution reconstruction method of remote sensing image
CN102663703B (en) Treelet-based Bayer type CFA image denoising method
CN111861902A (en) Deep learning-based Raw domain video denoising method
CN103595980A (en) Method for demosaicing color filtering array image based on outline non-local mean value
CN103595981A (en) Method for demosaicing color filtering array image based on non-local low rank
CN106447632B (en) A kind of RAW image denoising method based on rarefaction representation
CN104751415A (en) Image denoising and enhancing method and device and image processing system
CN112270646B (en) Super-resolution enhancement method based on residual dense jump network
CN104751416A (en) Image denoising method and device and image processing system
Hua et al. Context-aware joint dictionary learning for color image demosaicking
De Lavarène et al. Practical implementation of LMMSE demosaicing using luminance and chrominance spaces
Paul et al. Maximum accurate medical image demosaicing using WRGB based Newton Gregory interpolation method
CN108550111B (en) Residual error example regression super-resolution reconstruction method based on multi-level dictionary learning
CN110675320A (en) Method for sharpening target image under spatial parameter change and complex scene
CN115760638A (en) End-to-end deblurring super-resolution method based on deep learning
Wu et al. Learning to joint remosaic and denoise in quad bayer cfa via universal multi-scale channel attention network
Yang et al. MCFD: A hardware-efficient noniterative multicue fusion demosaicing algorithm
CN108596831B (en) Super-resolution reconstruction method based on AdaBoost example regression

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

Granted publication date: 20130123

Termination date: 20180722