Summary of the invention
The objective of the invention is to utilize the linear model of cfa interpolation in the camera imaging process, by adopting covariance matrix that the cfa interpolation coefficient is carried out statistical estimate, reduction is to the evaluated error of cfa interpolation coefficient, and optimize the cfa interpolation coefficient of estimation as feature with SFFS (Sequential Floating Feature Selection) feature selection approach, use support vector machine as sorter, come the camera source of digital picture is detected and collected evidence.
Technical scheme of the present invention is as follows:
1. the linear model of cfa interpolation in the camera imaging process
The imaging of digital camera will be experienced sensitization, imaging and three main processes of post-processed.The be taken photon of scenery reflection of the external world enters camera by camera lens, is formed the electric current of varying strength after the sensitization of sensor devices institute.Because existing sensor devices CCD or CMOS are monochromatic electronic component, can only respond to intensity of illumination, and can not differentiate color.Therefore, to write down real coloured image in theory, need place three monochromatic filters, filter out the light of R, G and three kinds of colors of B respectively, and on a pixel, write down the intensity level of three kinds of colors with three sensor devices at the sensor devices front end.But such design not only needs accurate manufacturing, more makes the camera cost be multiplied.In practice, people's sensor devices front end of being everlasting is placed a CFA, as Fig. 1, makes each pixel only write down a kind of color component with a sensor devices.Because sensor devices has only been gathered a kind of color data on each pixel, so imaging process correspondingly just must be introduced cfa interpolation to obtain true color image.The basic thought of cfa interpolation is the linear combination that utilizes color dropout vertex neighborhood pixel, estimates the disappearance color-values of this point.
Typical C FA interpolation method has bilinear interpolation (bilinear), bicubic interpolation (bicubic), medium filtering interpolation (Median Filter), level and smooth tone interpolation (Smooth Hue), based on gradient interpolation (Gradient-Based) and self-adaptation Color plane interpolation (Adaptive Color Plane) etc.Although the realization approach of these methods has nothing in common with each other, each is variant for performance, and the thought that it is basic all is to utilize interpolation point some pixels of neighborhood on every side, and the mode of carrying out linear or similar linear combination obtains the estimation to this interpolation point pixel value.To be example based on bilinear interpolation method, the present invention represents its implementation procedure with following formula.
R
x,y=r
x,y (1)
G
x,y=(g
x-1,y+g
x,y-1+g
x+1,y+g
x,y+1)/4 (2)
B
x,y=(b
x-1,y-1+b
x-1y+1+b
x+1,y-1+b
x+1,y+1)/4 (3)
Wherein, the value representation on all equation the right is by the pixel value size of sensor devices physical record, and R
X, y, G
X, yAnd B
X, yExpression is through (x, y) last pixel value behind the cfa interpolation respectively.
Therefore, for the convenience of calculating and deriving, adopt linear model to come the interpolation process of CFA is described among the present invention.This linear model can be expressed as with equation:
Wherein, y represents the pixel value of interpolation pixel, and x
i(i ∈ [1, n
2-1]) expression is the n * n neighborhood territory pixel value of this Color Channel at center with y, α
i(i ∈ [1, n
2-1]) for interpolation coefficient to be estimated, ε then is the sum of the deviations that the accuracy error the when influence between other Color Channel, interpolation and the possible afterwards operations such as JPEG lossy compression method of image cause in picture noise, the interpolation algorithm.
In theory, select 48 just can set up system of equations with the passage pixel and find the solution and obtain 48 all interpolation coefficients.But because the diversity of picture material, and have error term, make such solving result certainly exist bigger coefficient estimation error.For the cfa interpolation coefficient being estimated more exactly the applicant has adopted covariance matrix to carry out statistical estimate.
2. utilize covariance to estimate the cfa interpolation coefficient
Interpolation process will inevitably be introduced the correlativity between the pixel, and error ε can think and picture signal stochastic process independently.Therefore, the applicant utilizes covariance matrix to come the linear model in (4) formula is found the solution, to obtain to stablize believable estimated result.
Wherein,
Represent the vector that all are formed with the similar pixel of passage, and
Then represent the n that its neighborhood fixed position pixel value is formed respectively
2-1 vector.According to the linear characteristic of covariance matrix, (5) formula is equivalent to:
Because ε is independent of
Therefore have
It is as follows to obtain the final equations expression formula thus:
Set up n according to (7) formula
2-1 equation is formed n
2-1 yuan of linear function group is found the solution and can be obtained all n
2-1 interpolation coefficient a
i(i ∈ [1, n
2-1]).According to the neighborhood size that cfa interpolation algorithm commonly used is adopted, get n=7 in the method for the invention, promptly select 7 neighborhoods of central point pixel to calculate, form 48 yuan of linear function groups accordingly and find the solution.
Queueing discipline according to Bayer CFA commonly used among Fig. 1, among the Bayer CFA in each elementary cell of 2 * 2 pixel of interpolation have 4 * 2=8, be respectively the G (green) and B (blueness) value of R (redness) sampled point, the R of the R of two G sampled points and B value and B sampled point and G value.The present invention falls into 5 types 8 pixels of interpolation in each elementary cell of 2 * 2, and the G value that is R and B sampled point respectively is a class, and the R value of two G sampled points respectively is respectively a class, and the B value of two G sampled points respectively is respectively a class.To the pixel of each class, the present invention all utilizes formula (7) to set up system of equations, and solves 48 cfa interpolation coefficients of corresponding such pixel.Therefore, the applicant can find the solution altogether and obtain 48 * 5=240 interpolation coefficient in the method.
Utilize detection and the characteristic of division of these 240 interpolation coefficients, can realize accurate detection and evidence obtaining the image camera source as digital picture camera source.
3.SFFS characteristic optimization is selected and the svm classifier device
In most of interpolation algorithm, be not that 48 all neighborhood territory pixel values all are used to carry out interpolation calculation, the used neighborhood territory pixel point of different interpolation algorithms is different.Therefore, in 48 pixels of used 7 * 7 neighborhoods of cfa interpolation, some pixel is less important even invalid for the contribution of cfa interpolation, can be by analyzing the influence of different characteristic combination to classification accuracy, come the optimized choice characteristic of division, reduce the feature space dimension.Method of the present invention has been selected the SFFS feature selecting algorithm for use, and all 240 interpolation coefficient features finding the solution acquisition are optimized selection.The basic thought of SFFS method is by increase or reduce feature in the subclass of characteristic set, travel through different character subsets, and characteristic set is optimized selects ordering, delete invalid feature, and then seek the minimum preferred feature subclass of training accuracy rate under stablizing.The number of features of optimized choice is 36 among the present invention.
Because the cfa interpolation coefficient characteristics does not often possess linear separability, therefore, the sorter among the present invention has adopted support vector machine SVM.The core concept of SVM is exactly the popularization to the optimal classification face, promptly realize different classes of between the maximization of class interval.In order to address this problem, SVM often adopts the nonlinear transformation of inner product function definition that the input space is transformed into higher-dimension, make originally the inseparable problem of the lower dimensional space neutral line higher-dimension linear separability that becomes, in this higher dimensional space, find the solution the Generalized optimal classifying face then, promptly find the solution the optimization problem that satisfies constraint condition (8):
Here establish sample set (x
i, y
i), i=1 ... n, x ∈ R
d, {+1 ,-1}, classifying face equation are wx+b=0 to y ∈, and ξ guarantees that equation has lax that separates, and C then is control experience risk and the parameter of putting the trade wind danger, i.e. minimum wrong sample and the maximum class interval divided considered in compromise.The classification function that obtains thus is:
W wherein
*And b
*Be to use the Lagrange multiplier method to find the solution the optimum lineoid parameter that formula (8) obtains, K (z
i, z
j) be the kernel function that realizes nonlinear transformation, z
iAnd z
jThen represent the eigenwert of i and j sample respectively.Adopt the sorter of linear R BF (Radial Basis Function) kernel function C-SVC (C-SupportVector Classification) as algorithm among the present invention, this kernel function is defined as:
K(z
i,z
j)=exp(-γ‖z
i-z
j‖
2) (10)
Parameters C in the classification function and γ value obtain optimal value by the cross check of lattice shape search, and the scope of its search is set to { 2 respectively
-4, 2
-3..., 2
15And { 2
-14, 2
-4..., 2
5.
In sum, the present invention the camera of digital picture source is detected and the concrete steps of collecting evidence as follows:
At first obtain the image pattern that some different brands different model digital cameras are taken, as the training sample that detects sorter.
The image in these known camera sources is sampled according to the pattern of Bayer CFA, obtain the pixel value of corresponding sampling points and 5 class interpolation points respectively.Set up the cfa interpolation coefficient estimation system of equations of every width of cloth training image 5 class interpolation points respectively according to formula (7), and find the solution 240 all interpolation coefficients.
240 interpolation coefficients that all training images of every kind of camera are found the solution are input in the svm classifier device and train as other characteristic of division of this camera-type, and use the SFFS method to select 36 optimal characteristics under the training accuracy rate stable condition.These 36 optimal characteristics as characteristic of division, are re-entered in the svm classifier device and trained, obtain disaggregated model and parameter, finish the training process of detecting device.
When the unknown digital picture in camera source being detected and collects evidence, at first equally this digital picture is sampled according to the pattern of Bayer CFA, obtain the pixel value of corresponding sampling points and 5 class interpolation points respectively, and set up cfa interpolation coefficient estimation system of equations according to formula (7), find the solution 240 all interpolation coefficients.Pick out the optimal characteristics of 36 correspondences then according to the sequence number of optimal characteristics, and classify in the input svm classifier device, its classification results is the detection in this image camera source and evidence obtaining result.
Specific implementation step of the present invention as shown in Figure 2.
Effect benefit of the present invention is:
A ring important in the judicial evidence chain is exactly the evidence obtaining and the judgement in the source of evidence.Camera source evidence forensics to digital picture, can be by the means of data analysis, under the situation that does not obtain other prioris, only by existing data model and view data to be collected evidence, detect and judge the camera source of this image, supervise chain for the evidence of judicial department effective technical guarantee is provided.
On the other hand, in existing criminal investigation system, usually can run into anonymous photo, extort situations such as photo.By digital picture source evidence forensics and authentication technique, can analyze and detect the camera source of these digital pictures, and then, dwindle the scope of investigation and search for criminal investigation department provides certain clue, improve case handling efficiency.
The present invention is applicable to information security field, can be effectively to the digital picture in unknown camera source, and its camera source of detecting and collect evidence.