CN103927740A - Method and device for obtaining point spread function of image - Google Patents

Method and device for obtaining point spread function of image Download PDF

Info

Publication number
CN103927740A
CN103927740A CN201410055963.1A CN201410055963A CN103927740A CN 103927740 A CN103927740 A CN 103927740A CN 201410055963 A CN201410055963 A CN 201410055963A CN 103927740 A CN103927740 A CN 103927740A
Authority
CN
China
Prior art keywords
pixel
image
cut
polynomial
spread function
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.)
Granted
Application number
CN201410055963.1A
Other languages
Chinese (zh)
Other versions
CN103927740B (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 XKVISION TECHNOLOGY Co Ltd
Original Assignee
BEIJING XKVISION 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 BEIJING XKVISION TECHNOLOGY Co Ltd filed Critical BEIJING XKVISION TECHNOLOGY Co Ltd
Priority to CN201410055963.1A priority Critical patent/CN103927740B/en
Publication of CN103927740A publication Critical patent/CN103927740A/en
Application granted granted Critical
Publication of CN103927740B publication Critical patent/CN103927740B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a method and a device for obtaining a point spread function of an image. The method comprises the steps of manufacturing multiple cutting lines on the image in the normal vector direction of the image; using an attribute value of each pixel passed by each of multiple cutting lines to form an observation sequence; performing mathematical manipulation on multiple formed observation sequences to obtain multiple polynomials, calculating a greatest common divisor of the polynomials and using the greatest common divisor as the point spread function of the image. The method and the device for obtaining the point spread function of the image has the advantages of forming the cutting line observation sequences based on the normal vector direction of the image, then performing the mathematical manipulation to obtain a PSF, being capable of establishing a non-correlated channel model on the image and accordingly eliminating the influence brought by an non-ideal imaging system during image decoding in a PSF reference mode to some degree.

Description

Obtain the method and apparatus of the point spread function of image
Technical field
The present invention relates to image processing field, especially, relate to a kind of method and apparatus that obtains the point spread function of image.
Background technology
The two-dimensional bar code scanning module that existing market is used is all image-type, so the quality of photographic images just can directly affect the decoding effect of image.Wherein, require the picture quality of shooting better, just higher to the requirement of camera lens, can directly cause the manufacture purchase cost of camera lens to increase.
An important property of camera lens is exactly the point spread function of the image after taking under certain condition.To being explained as follows of point spread function:
A point-like object when ideal image, takies a pixel on captured image, and its pixel and this point is around irrelevant.During actual photographed, this point-like object is the circle of a disperse on captured image, and this some pixel is around subject to the impact of this point and is no longer independently.The function of describing this influence degree is exactly point spread function.
Here provide the mathematical definition of point spread function:
Suppose:
The captured image of ideal image system is f (x, y);
The captured image of actual imaging system is g (x, y);
Between the two, meet following relation:
g ( x , y ) = f ( x , y ) ⊗ PSF + n ( x , y )
PSF(Point-spreadfunction wherein) be point spread function, n (x, y) is noise.
As can be seen here, the yardstick of point spread function is larger, and photographic images is fuzzyyer, and yardstick is less, and photographic images is more clear.And the size of this function and shooting distance also have relation, so the impact of the camera lens depth of field is also very large.
When camera lens quality is very good, and focus when clear, can not consider the impact of point spread function.Can think that imaging system is an idealized system.But unintelligible when focusing, or camera lens is when of poor quality, and the impact of point spread function just be can not ignore, and must pay attention to.
Some current decoding devices have all adopted CMOS and the high-quality camera lens that cost is higher, can ignore the impact of the point spread function under certain condition like this, adopt the advantage of high-quality imaging device to be that Decode engine processing is very convenient, but its cost is that the adaptability of Decode engine is poor, must rely on the imaging device of better quality, and the imaging device of better quality (camera lens for example, CMOS etc.) must increase manufacturing cost, thereby, the in the situation that of balanced economy cost, (situation that camera lens quality is general comprises that micro lens incident angle is greater than 10 degree also to exist some decoding devices to adopt the general equipment of imaging device quality, resolving power is less than 800lw, optical fiber is less than f5.6, adopt roller shutter class shutter rolling, the situation that CMOS quality is general comprises that the pixel size of each imaging is less than 3.0*3.0 micron etc.), consider in the case the adverse effect of large scale point spread function, need to use relevant algorithm to eliminate this adverse effect, and to the elimination of adverse effect, need to depend on the acquisition of point spread function.
In prior art, cannot in decode procedure, estimate PSF in real time and cause decoding effect poor problem not yet solves.
Summary of the invention
Problem to be solved by this invention is cannot in decode procedure, estimate PSF in real time and cause decoding effect poor, and a kind of method and apparatus that obtains the point spread function of image is provided.
In order to address the above problem, the invention provides a kind of method that obtains the point spread function of image.
Wherein, the method comprises:
Normal vector direction along described image is made many lines of cut on described image;
For each line of cut in described many lines of cut, according to this line of cut the property value of each pixel of process form observation sequence;
A plurality of observation sequences that form are carried out to mathematic(al) manipulation and obtain a plurality of polynomial expressions;
Calculate described a plurality of polynomial greatest common factor as the point spread function of described image.
As preferably, before the normal vector direction along described image is made many lines of cut on described image, described method further comprises:
To each pixel in described image, relatively the property value of adjacent two pixels of this pixel, in the situation that comparative result is greater than assign thresholds, determines that this pixel is boundary pixel;
Contrast the property value of described boundary pixel and adjacent a plurality of pixels, obtain the gradient angle of corresponding each boundary pixel;
A plurality of gradient angles that Statistical Comparison obtains, using the gradient angle of probability of occurrence maximum as the normal vector direction of described image.
As preferably, along the normal vector direction of described image, make many lines of cut and comprise:
Select multirow pixel, described multirow pixel separation has pixel column;
For every one-row pixels of the described multirow pixel of selecting, in the centre position of this row pixel, along the normal vector direction of described image, make a line of cut.
As preferably, select multirow pixel for selecting six to ten row pixels;
In described multirow pixel, between adjacent two row pixels, there are at least 30 row pixel columns.
As preferably, according to this line of cut before the property value of each pixel of process forms observation sequence, described method further comprises:
For each line of cut in described many lines of cut each pixel of process, utilize bilinear interpolation to calculate the actual property value of this pixel;
Calculating is positioned at the actual property value perpendicular to a plurality of pixels in the normal vector direction of this pixel;
Using this pixel actual property value be positioned at the property value as this pixel perpendicular to the mean value of the actual property value of a plurality of pixels in the normal vector direction of this pixel.
As preferably, a plurality of observation sequences that form are carried out to mathematic(al) manipulation and obtain described a plurality of polynomial expression and comprise:
A plurality of observation sequences that form are carried out to z conversion and obtain described a plurality of polynomial expression.
As preferably, before calculating the point spread function of described a plurality of polynomial greatest common factors as described image, described method further comprises:
For each boundary pixel, obtain the property value of a plurality of pixels of these boundary pixel both sides;
Calculate the gradient absolute value of the property value of the plurality of pixel, and according to the quantity summation that its gradient absolute value of all continuous appearance is greater than the pixel of a predetermined threshold, determine the rank of described point spread function.
As preferably, calculate described a plurality of polynomial greatest common factor and comprise:
Build a desirable polynomial matrix of coefficients, and build described a plurality of polynomial matrix of coefficients according to the rank of described point spread function and described a plurality of polynomial expression, wherein, described desirable polynomial expression is the polynomial expression that the z conversion of the observation sequence that obtains after the ideal image system imaging that described a plurality of polynomial expression is corresponding obtains;
According to described a plurality of polynomial matrix of coefficients and the polynomial matrix of coefficients of described ideal, utilize polynomial division to calculate described a plurality of polynomial greatest common factor.
As preferably, described property value comprise following one of at least:
Arbitrary value, value of chromatism in gray-scale value, RGB.
The present invention also provides a kind of device that obtains the point spread function of image.
Wherein, this device comprises:
Make module, for the normal vector direction along described image, on described image, make many lines of cut;
Sequence forms module, for each line of cut for described many lines of cut, according to this line of cut the property value of each pixel of process form observation sequence;
Conversion module, obtains a plurality of polynomial expressions for a plurality of observation sequences that form are carried out to mathematic(al) manipulation;
Computing module, for calculating described a plurality of polynomial greatest common factor as the point spread function of described image.Beneficial effect of the present invention is, the normal vector direction of image of take is that basis forms line of cut observation sequence, carry out again mathematical computations and obtain PSF, can on image, build non-correlation channel model, thereby the form with reference to PSF is eliminated the undesirable impact of imaging system in sizable degree when image decoding.
Beneficial effect of the present invention is also, utilizes the irrelevance of code word data between two-dimensional bar code different rows, constructs multichannel model in a sub-picture, regards PSF as signal source, using the code word after two-dimensional bar code ideal image as channel.And utilize the symmetry of PSF, and two-dimensional problems are reduced to the problem of one dimension degree of freedom, can accomplish steadily and surely, solve accurately and fast the object of PSF, thereby it is strong to have noise resisting ability, convergence is fast, the high feature of point spread function precision calculating.
Beneficial effect of the present invention is further, can estimate in real time PSF, avoids with the camera lens of high resolution, reaching the situation of desirable decoding effect, has reduced cost.
Beneficial effect of the present invention is further, can only with an image, build non-correlation channel model.
Beneficial effect of the present invention is further, the method for the calculating PSF that technical scheme of the present invention adopts is sane, and can solve Large Graph picture and large-sized PSF.
Accompanying drawing explanation
Fig. 1 is according to the process flow diagram of the method for the point spread function of the acquisition image of the embodiment of the present invention;
Fig. 2 is the process flow diagram of method of the point spread function of acquisition two-dimensional barcode image according to an embodiment of the invention;
Fig. 3 is the schematic diagram of the image after obtaining line of cut bar code according to one embodiment of present invention.
Embodiment
Below in conjunction with accompanying drawing, to of the present invention, be described in detail.
According to embodiments of the invention, provide a kind of method that obtains the point spread function of image.
As shown in Figure 1, according to the method for the embodiment of the present invention, comprise:
Step S101, along the normal vector direction of image (wherein, the direction that is normal vector perpendicular to the direction at the edge of image, therefore, when image is two-dimensional bar code, image has two normal vector directions, only select in the present invention one of them direction as normal vector direction) on image, make many lines of cut, before this, can be further to each pixel in image according to the method for the embodiment of the present invention, relatively the property value of adjacent two pixels of this pixel (alternatively, property value can comprise gray-scale value, any value in RGB, value of chromatism), in the situation that comparative result is greater than assign thresholds, determine that this pixel is boundary pixel, the property value of contrast boundaries pixel and adjacent a plurality of pixels, obtains the gradient angle of corresponding each boundary pixel, a plurality of gradient angles that Statistical Comparison obtains, using the gradient angle of probability of occurrence maximum as the normal vector direction of image (being the direction at the edge perpendicular to image mentioned above).Particularly, when the normal vector direction along image is carried out the making of many lines of cut, can select multirow pixel, multirow pixel separation has pixel column; For every one-row pixels of the multirow pixel of selecting, in the centre position of this row pixel, along the normal vector direction of image, make a line of cut.As preferably, can select six to ten row pixels, in multirow pixel, between adjacent two row pixels, there are at least 30 row pixel columns, calculated amount and precision that can balance PSF.
Step S103, for each line of cut in many lines of cut, according to this line of cut the property value of each pixel of process form observation sequence, before this, according to the method for the embodiment of the present invention can for each line of cut in many lines of cut each pixel of process, utilize bilinear interpolation to calculate the actual property value of this pixel; And further calculate and be positioned at the actual property value perpendicular to a plurality of pixels in the normal vector direction of this pixel; Using this pixel actual property value be positioned at the property value as this pixel perpendicular to the mean value of the actual property value of a plurality of pixels in the normal vector direction of this pixel, although not shown in literary composition, but in method well known in the art, also comprise that can take the actual property value of the adjacent a plurality of pixels of other direction of this pixel is basis, show that mean value is as the property value of this pixel.
Step S105, a plurality of observation sequences that form are carried out to a plurality of polynomial expressions that mathematic(al) manipulation obtains corresponding the plurality of observation sequence, and preferably, mathematic(al) manipulation is z conversion (z-translation, for discrete series is carried out to mathematic(al) manipulation, so that the signal of dispersion is transformed into frequency domain from time domain);
Step S107, calculates a plurality of polynomial greatest common factors as the point spread function of image, particularly, for each boundary pixel, can obtain the property value of a plurality of pixels of these boundary pixel both sides; Calculate the gradient absolute value (absolute value that also can be called forward direction gradient) of the property value of the plurality of pixel, and according to the quantity summation that its gradient absolute value of all continuous appearance is greater than the pixel of a predetermined threshold, determine the rank of described point spread function.
In addition, when calculating a plurality of polynomial greatest common factor, can build desirable polynomial matrix of coefficients, and build a plurality of polynomial matrix of coefficients according to the rank of point spread function and a plurality of polynomial expression, wherein, desirable polynomial expression be the polynomial expression that obtains of the z conversion of the observation sequence that obtains after the ideal image system imaging that a plurality of polynomial expressions are corresponding (wherein, the polynomial corresponding relation of the polynomial expression that actual imaging obtains and ideal image X can be expressed as: the polynomial expression < convolution >PSF of polynomial expression=ideal image X that actual imaging obtains.Suppose in actual computation, got 6 polynomial expressions that actual imaging obtains, the polynomial expression that has 6 ideal image X correspondingly, an and common PSF.); And utilize polynomial division to calculate a plurality of polynomial greatest common factors according to a plurality of polynomial matrix of coefficients and desirable polynomial matrix of coefficients.
In actual applications, technical scheme of the present invention can be applied in bar code graphics, and take pixel as comprising in actual applications according to making line of cut: in bar code graphics, select multirow code word, for every row code word of choosing, the normal vector direction in this row code word centre position along image is made a line of cut; Because each code word can comprise 15 * 15 pixels, line of cut must be through certain one-row pixels in code word, thereby, when forming observation sequence, be still adopt this line of cut the property value of each pixel of process form observation sequence.
According to one embodiment of present invention, technical scheme of the present invention can be applied to the acquisition of the point spread function of two-dimensional bar code (being also called for short below bar code) image, as shown in Figure 2, process flow diagram for the method for the point spread function of acquisition bar code image according to an embodiment of the invention, comprising:
Step S201, take the image that a pair comprises bar code, , (module represents the homochromy minimum unit in bar code conventionally in the image of this shooting, to comprise a module size, in literary composition also referred to as bar code code word) larger bar code, barcode size can surpass 20 * 20 modules, be bar code in the horizontal direction or in vertical direction, all exist and surpass 20 code words, the pixel quantity that each module of this bar code takies on image is no less than 15 * 15 (being that module width is greater than 15 pixels) and each module size of bar code surpasses 1mm * 1mm, and the content of bar code is random data, do not repeat.In addition, it is clear to print, use high resolution printed equipment to print, further, this bar code on photographic images substantially in center, can guarantee that like this size of each module surpasses the size of point spread function, thus can be by the impact that the one dimension PSF in normal direction is regarded in equivalence as that affects of two-dimentional PSF.
Definition by PSF can find out, this PSF function is the two-dimensional function with centre symmetry and axial symmetry, but its degree of freedom be but one dimension (wherein, degree of freedom, degree of freedom, when calculating a certain statistic, the quantity of variable is the dimension of degree of freedom).When the size of each module of bar code surpasses the size of point spread function, the impact of this two-dimensional function is equivalent to the impact of the one dimension PSF on bar code method vector.The value of this one dimension PSF is exactly any functional value through the line of cut at two-dimentional PSF center.
The full detail that the one dimension PSF that step S201 in Fig. 2 has guaranteed to try to achieve has comprised two-dimentional PSF, due to two-dimentional PSF, to solve calculated amount very large simultaneously, be therefore difficult to realize real-time calculating, and one dimension PSF can be used several different methods to calculate in real time.
Step S203, the normal vector direction of calculating bar code, in bar code region, the distribution of statistical gradient angle, thus the normal vector direction of acquisition bar code comprises:
A. according to surveying bar code region, figure location, that is, near picture centre position, by bar code detection feature, determine bar code scope, this bar code scope is approximate range, comprises bar code main body in scope.Wherein, survey figure and can be understood as the common three or more junior units that are positioned at same position of all bar codes, as shown in Figure 3, demonstrate three detection figures and be positioned at three drift angles, by the detection figure of location bar code, can obtain bar code region roughly, and in technical scheme of the present invention without accurate location bar code;
B. in this bar code region, find all boundary pixels (also can be called frontier point), in the present invention, define being characterized as of boundary pixel: be greater than assign thresholds Th(in unshowned embodiment with the absolute value of the difference of the gray-scale value of top or left neighbor, the method of definition boundary pixel can also be other prior art, for example defining boundary pixel is: be greater than assign thresholds Th etc. with the gray scale difference of below or right-hand consecutive point, can pre-determine Th according to the difference of property value and user's request), meet:
Max(|f(x,y)-f(x-1,y)|,|f(x,y)-f(x,y-1)|)>Th。
C. according to boundary pixel and around adjacent 8 pixels determine the gradient direction of each boundary pixel, this direction represents the fastest direction of this frontier point graded.This gradient direction is used an angle value θ to represent, wherein, the computing formula of θ is:
&theta; ( x , y ) = arctan ( Min ( f ( x , y ) - f ( x - 1 , y ) f ( x , y ) - f ( x , y - 1 ) , f ( x , y ) - f ( x - 1 , y ) f ( x , y ) - f ( x , y + 1 ) ) ) .
D. add up the distribution of θ (x, y), the angle that its probability of occurrence is the highest is the anglec of rotation of bar code, and this angle is the anglec of rotation of bar code border in image coordinate system, the i.e. direction of normal vector.
When statistical distribution, adopt with the following method, first determine that the precision of θ (x, y) is 0.2 angle (take 0.2 angle as step-length, by θ discretize), then can determine that the span of θ (x, y) is [45,45].Because bar code scope is larger, therefore its distribution statistics is comparatively accurate, therefore can obtain the gradient angle that precision is 0.2 degree, under this precision, length is that its head and the tail error of line segment of 1000 pixels is no more than 4 pixels, so precision meets the needs of technical scheme in the present invention completely.
Step S205, along normal vector direction, obtain the line of cut of N bar cutting bar code, be that the direction of line of cut is parallel or perpendicular to the border of bar code, particularly, find the center of a line code word to do line of cut along normal vector direction, and this row code word is no longer done line of cut, be that (a line code word only does a line of cut, in a line or a row code word, only have a line segment, all lines of cut cut different code words), and this line of cut is the center line of this row code word.Within the scope of bar code, N bar line of cut is looked in circulation, can pre-determine the quantity of line of cut, because line of cut quantity is more, result of calculation is more accurate, but computing time is longer, therefore, after considering solving complexity and solving precision, technical scheme of the present invention is compromised to the quantity of line of cut, preferably, generally gets 6~10 lines of cut.
As shown in Figure 3, for obtain the schematic diagram of many lines of cut on bar code image according to embodiments of the invention, in Fig. 3, schematically show 4 lines of cut.
Step S207, determines starting point and the terminal of each line of cut, wherein, according to embodiments of the invention, obtains the center that line of cut need to find code word, then along normal direction, does a line segment, and wherein, starting point and the terminal of this line segment are all positioned on bar code border.
Article one, the starting point of line of cut is a lateral boundaries of bar code code word, and to 1 pixel of border external expansion, i.e. the 2nd border that pixel is bar code after the starting point of line of cut;
Article one, the terminal of line of cut is the opposite side border of bar code code word, and to 1 pixel of border external expansion, i.e. the 2nd border that pixel is bar code before the terminal of line of cut.
After determining the position and length of article one line of cut, article 2, the starting point of line of cut~the N bar line of cut determines that method is identical with article one line of cut, and all only need to determine starting point, and adopt with the line segment of the same length of article one line of cut as line of cut, article one, the length of line of cut is m, therefore, article 2, the length of line of cut~the N bar line of cut is all m, be that m pixel is ending after starting point, and all have interval code line (code line can be understood as the combination of said a plurality of pixel columns above) in every two lines of cut centre.
Step S209, obtain the grey scale pixel value on each line of cut, obtain observation sequence, after obtaining line of cut, the bar code obtaining due to reality is often in heeling condition, so can there is certain inclination angle, therefore, coordinate points on line of cut is not all rounded coordinate point, likely has non-integer coordinates point (being decimal coordinate points), for example, there is coordinate points (2.1,51.2), technical scheme of the present invention adopts the method for bilinear interpolation to obtain the gray-scale value of decimal coordinate points, and its computing formula is:
f(x,y)=f(x 0,y 0)*(1-d x)*(1-d y)+f(x 0+1,y 0)*(d x)*(1-d y)+f(x 0,y 0+1)*(1-d x)*(d y)+f(x 0+1,y 0+1)*(d x)*(d y)
Wherein:
F (x, y) denotation coordination is the gray-scale value of (x, y) pixel.
X 0(for example, x is 2.1 o'clock to the value rounding downwards for coordinate x, x 0be 2).
Y 0(for example, y is 51.2 o'clock to the value rounding downwards for coordinate y, y 0be 51).
d x=x-x 0;d y=y-y 0
Obtaining f (x, y) also need afterwards to obtain on perpendicular to normal vector direction, with f (x, y) gray scale of two pixels of neighbouring each (is f (x, y+1), f (x, y+2), f (x, y-1), f (x, y-2)), using the mean value of these five gray-scale values as the actual grey of this point of this line of cut (in step S103 in Fig. 1: using the mean value of the actual property value of this pixel and actual property value perpendicular to a plurality of pixels in the normal vector direction of this pixel as the property value of this pixel).By getting the mean value (adopting the average mode of multirow) of the property value of a plurality of pixels, can fall low noise impact, make the solution of final SPF equation more sane.
Finally, for n bar line of cut, the gray-scale value of its i the pixel namely computing formula of observed reading is:
f n ( i ) = &Sigma; j = - 2 2 f n &perp; ( i + j ) 5 .
Wherein:
F n(i) represent the gray-scale value of i pixel of n bar line of cut.
represent the grey scale pixel value that i pixel of n bar line of cut is j in the distance perpendicular on normal vector.
Repeating step S207 and S209, obtain the grey scale pixel value of all N bar lines of cut.The gray-scale value of each line of cut forms an observation sequence, and the length of this sequence is m.The length of all observation sequences is identical.So far, the observation sequence of N bar line of cut all obtains.
Step S211, carries out z conversion to each observation sequence,, obtains a polynomial expression that is:
Y n(z)=f n(0)+f n(1)z+f n(2)z 2+f n(3)z 3+…+f n(m-1)z m-1
Wherein: f n(i) represent the value of i element of n observation sequence, it equals the gray-scale value of i pixel of n bar line of cut.Y n(z) represent the polynomial expression after n observation sequence z conversion.
Because this N observation sequence is all limited, so the polynomial expression after z conversion is also limited, and meanwhile, polynomial coefficient is exactly the observed reading that observation sequence is corresponding.
Step S213, after obtaining all N polynomial expression, utilizes bar edges feature to estimate PSF order of a polynomial, comprising:
A. the border of finding black and white to replace on the border of bar code, the black region of this boundaries on either side and white portion (a white portion is a code word, and a black region is also a code word) are all very large, surpass 15 pixels;
B. in the normal orientation on border, obtain the gray scale of each 15 pixels of this boundaries on either side;
C. calculate the absolute value of the forward direction gradient of these 30 gray scale composition sequences;
D. by what occur continuously on each border, the total quantity that absolute value is greater than the forward direction gradient of threshold value A Th is denoted as M;
E. the rank using p=M+2 as point spread function (being the item number of point spread function).
Step S215, sets up point spread function and observation sequence Y n(z) satisfied matrix equation, that is, build matrix model and be used for obtaining point spread function and Y n(z) relational expression, comprising:
A. ignore the impact of noise, draw formula: Y n(z)=PSF (z) * X n(z);
Wherein:
The z conversion that PSF (z) is point spread function.
Y n(z) be n the polynomial expression after observation sequence z conversion.
X n(z) be Y n(z) the z conversion of the observation sequence obtaining after corresponding ideal image system imaging;
B. use X 0(z)~X n-1(z) structure unknown quantity matrix X = x 0 x 1 . . . x N - 1 Wherein, x ifor X i(z) coefficient column vector.For example: if X 0(z)=a 0(0)+a 0(1) z+a 0(2) z 2; X 1(z)=a 1(0)+a 1(1) z+a 1(2) z 2; The unknown quantity matrix being built by these two polynomial expressions is:
X=[a 0(0)?a 0(1)?a 0(2)?a 1(0)?a 1(1)?a 1(2)] T
C. use Y 0(z)~Y n-1(z) structure matrix of coefficients:
F = - F ( y 1 , k ) F ( y 0 , k ) - F ( y 2 , k ) F ( y 0 , k ) . . . . . . . . . . . . . . . . . . - F ( y N - 1 , k ) 0 0 F ( y 0 , k ) - F ( y 2 , k ) F ( y 1 , k ) . . . . . . . . . - F ( y N - 1 , k ) F ( y 1 , k ) . . . . . . . . . - F ( y N - 1 , k ) F ( y N - 2 , k )
Wherein, F (y i, be k) by Y i(z) the k row convolution kernel matrix of coefficients to construct.k=m-p+1。
K is convolution kernel matrix column number, and its meaning is X i(z) rank+1.
The generating mode of convolution kernel matrix is as follows:
F ( y i , k ) = y i ( 0 ) y i ( 1 ) y i ( 0 ) . . . . . . . . . . . . . . . y i ( 0 ) y i ( m + 1 ) y i ( m - 2 ) y i ( m - 2 ) . . . y i ( m - 1 )
Each row of this matrix are Y i(z) coefficient.Total k row.
Here all Y i(z) be all known, so matrix of coefficients F also obtain.
D. set up matrix equation FX=0.
Step S217, solves an equation, and obtains the source polynomial expression that any one observation sequence is corresponding.
Step S219, utilizes polynomial division to obtain the greatest common factor of N observation sequence, and the solution of matrix equation under a constant coefficient is unique.Meanwhile, due to what finally require, be Y i(z) greatest common factor PSF (z), therefore following formula is set up:
PSF ( z ) = Y i ( z ) X i ( z ) , i = 0,1,2,3 . . . N - 1
Wherein, obtain any one X i(z) all can obtain PSF (z).
This algorithm can provide the method for two kinds of different solution FX, and these two kinds of methods cut both ways.
First method is that F is carried out to svd, obtains all singular values, now, because the rank of PSF are limited, if therefore singular value is arranged according to descending order, the situation that there will be singular value to decline rapidly.Now, occurring the number of fast-descending singular value before, is exactly the accurate rank of PSF.The jump of estimating before this exponent number and this algorithm is not very little, more than differ from 2, even if the rank of estimating are before greater than the accurate rank of PSF, due to very little of singular value corresponding to the exponent number exceeding, therefore after final calculating, the coefficient on these rank also can be very little, can in actual computation, ignore.
After svd, this matrix equation is very easy to solve, and can directly obtain any X i(z) coefficient, therefore can accurately estimate PSF (z).
Second method is directly to use gaussian iteration method to solve, and the method for separating algebraic equation solves, and this mode that solves needn't be carried out matrix decomposition, calculates rapidly, only need to calculate X simultaneously 0(z) coefficient, does not need to calculate all solutions.
After trying to achieve the solution of equation, these are separated and have a constant coefficient, and after doing polynomial division, the coefficient of the PSF trying to achieve (z) also has a constant coefficient, and this constant coefficient obtains by following constraint:
&Sigma; i = 0 p - 1 PSF ( i ) = 1
Wherein PSF (i) is i the coefficient of PSF (z), and p is the rank of PSF (z).
In unshowned embodiment, step S215 can also be expressed as following three steps (these three steps and step S215 are not corresponding one by one to step S219) to step S219:
Step 1, for each line segment, set up solving model, this solving model has following characteristics:
A, use an One Dimensional Polynomial f (x) to represent the point spread function that will solve, the value of each element that the coefficient of f (x) is point spread function;
Pixel value on b, each line segment is as target polynomial expression g n(x) coefficient, sets up polynomial expression g n(x), g n(x) length is the length in pixels of line segment, g n(x) gray-scale value of each pixel that every coefficient is line segment, the line segment model of setting up meets: g n(x)=f (x) * M n(x).Wherein, M n(x) polynomial expression of the code word of cutting for this line segment after desirable lens imaging.For desirable camera lens, its point spread function f (x)=1.So f (x) and M n(x) be unknown quantity.
Step 2, for all line segments, can set up a polynomial equation group, this system of equations has following form:
g 0 ( x ) = f ( x ) &times; M 0 ( x ) g 1 ( x ) = f ( x ) &times; M 1 ( x ) . . . g N ( x ) = f ( x ) &times; M N ( x )
Step 3, solve the system of equations that previous step is set up, finally solve f (x); Its solution procedure has following feature:
In a, solution procedure, whole unknown quantitys can be do not solved, only M can be solved 0(x)~M n(x) polynomial expression in and f (x);
In b, solution procedure, setting up equation is system of linear equations, and it has matrix form FX=0, and wherein F is matrix, and X is column vector;
C, F are by g 0(x)~g n(x) coefficient obtains through particular arrangement, according to convolution principle, adopts the arrangement mode of convolution kernel matrix to arrange;
In d, solution procedure, use gaussian iteration method to solve.
E, that solve that the first step obtains is M 0(x)~M n(x) in one;
The M that f, basis solve i(x) utilize polynomial division to calculate f (x), the coefficient of the f obtaining (x) is normalized coefficient.
According to one embodiment of present invention, provide a kind of device that obtains the point spread function of image.
Wherein, according to the device of the embodiment of the present invention, comprise:
Make module, for making many lines of cut according to the normal vector direction of image on described image;
Sequence forms module, for each line of cut for many lines of cut, according to this line of cut the property value of each pixel of process form observation sequence;
Conversion module, obtains a plurality of polynomial expressions for a plurality of observation sequences that form are carried out to mathematic(al) manipulation;
Computing module, for calculating a plurality of polynomial greatest common factors as the point spread function of image.
Above embodiment is only exemplary embodiment of the present invention, is not used in restriction the present invention, and protection scope of the present invention is defined by the claims.Those skilled in the art can make various modifications or be equal to replacement the present invention in essence of the present invention and protection domain, this modification or be equal to replacement and also should be considered as dropping in protection scope of the present invention.

Claims (10)

1. a method that obtains the point spread function of image, is characterized in that, comprising:
Normal vector direction along described image is made many lines of cut on described image;
For each line of cut in described many lines of cut, according to this line of cut the property value of each pixel of process form observation sequence;
A plurality of observation sequences that form are carried out to mathematic(al) manipulation and obtain a plurality of polynomial expressions;
Calculate described a plurality of polynomial greatest common factor as the point spread function of described image.
2. method according to claim 1, is characterized in that, before the normal vector direction along described image is made many lines of cut on described image, described method further comprises:
To each pixel in described image, relatively the property value of adjacent two pixels of this pixel, in the situation that comparative result is greater than assign thresholds, determines that this pixel is boundary pixel;
Contrast the property value of described boundary pixel and adjacent a plurality of pixels, obtain the gradient angle of corresponding each boundary pixel;
A plurality of gradient angles that Statistical Comparison obtains, using the gradient angle of probability of occurrence maximum as the normal vector direction of described image.
3. method according to claim 1, is characterized in that, makes many lines of cut comprise along the normal vector direction of described image:
Select multirow pixel, described multirow pixel separation has pixel column;
For every one-row pixels of the described multirow pixel of selecting, in the centre position of this row pixel, along the normal vector direction of described image, make a line of cut.
4. method according to claim 3, is characterized in that, selects multirow pixel for selecting six to ten row pixels;
In described multirow pixel, between adjacent two row pixels, there are at least 30 row pixel columns.
5. method according to claim 1, is characterized in that, according to this line of cut before the property value of each pixel of process forms observation sequence, described method further comprises:
For each line of cut in described many lines of cut each pixel of process, utilize bilinear interpolation to calculate the actual property value of this pixel;
Calculating is positioned at the actual property value perpendicular to a plurality of pixels in the normal vector direction of this pixel;
Using this pixel actual property value be positioned at the property value as this pixel perpendicular to the mean value of the actual property value of a plurality of pixels in the normal vector direction of this pixel.
6. method according to claim 2, is characterized in that, a plurality of observation sequences that form is carried out to mathematic(al) manipulation and obtain described a plurality of polynomial expression and comprise:
A plurality of observation sequences that form are carried out to z conversion and obtain described a plurality of polynomial expression.
7. method according to claim 6, is characterized in that, before calculating the point spread function of described a plurality of polynomial greatest common factors as described image, described method further comprises:
For each boundary pixel, obtain the property value of a plurality of pixels of these boundary pixel both sides;
Calculate the gradient absolute value of the property value of the plurality of pixel, and according to the quantity summation that its gradient absolute value of all continuous appearance is greater than the pixel of a predetermined threshold, determine the rank of described point spread function.
8. method according to claim 7, is characterized in that, calculates described a plurality of polynomial greatest common factor and comprises:
Build a desirable polynomial matrix of coefficients, and build described a plurality of polynomial matrix of coefficients according to the rank of described point spread function and described a plurality of polynomial expression, wherein, described desirable polynomial expression is the polynomial expression that the z conversion of the observation sequence that obtains after the ideal image system imaging that described a plurality of polynomial expression is corresponding obtains;
According to described a plurality of polynomial matrix of coefficients and the polynomial matrix of coefficients of described ideal, utilize polynomial division to calculate described a plurality of polynomial greatest common factor.
9. according to the method described in any one in claim 1 to 8, it is characterized in that, described property value comprise following one of at least:
Arbitrary value, value of chromatism in gray-scale value, RGB.
10. a device that obtains the point spread function of image, is characterized in that, comprising:
Make module, for the normal vector direction along described image, on described image, make many lines of cut;
Sequence forms module, for each line of cut for described many lines of cut, according to this line of cut the property value of each pixel of process form observation sequence;
Conversion module, obtains a plurality of polynomial expressions for a plurality of observation sequences that form are carried out to mathematic(al) manipulation;
Computing module, for calculating described a plurality of polynomial greatest common factor as the point spread function of described image.
CN201410055963.1A 2014-02-18 2014-02-18 The method and apparatus for obtaining the point spread function of image Expired - Fee Related CN103927740B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410055963.1A CN103927740B (en) 2014-02-18 2014-02-18 The method and apparatus for obtaining the point spread function of image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410055963.1A CN103927740B (en) 2014-02-18 2014-02-18 The method and apparatus for obtaining the point spread function of image

Publications (2)

Publication Number Publication Date
CN103927740A true CN103927740A (en) 2014-07-16
CN103927740B CN103927740B (en) 2017-06-23

Family

ID=51145951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410055963.1A Expired - Fee Related CN103927740B (en) 2014-02-18 2014-02-18 The method and apparatus for obtaining the point spread function of image

Country Status (1)

Country Link
CN (1) CN103927740B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017012528A1 (en) * 2015-07-23 2017-01-26 清华大学 Point spreading function estimation method and system
CN114174791A (en) * 2019-08-07 2022-03-11 安捷伦科技有限公司 Optical imaging performance testing system and method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011244028A (en) * 2010-05-14 2011-12-01 Casio Comput Co Ltd Imaging apparatus, shake correcting method, and program
CN103439756A (en) * 2013-07-31 2013-12-11 中国人民解放军理工大学 Natural precipitation particle micro physical characteristic measuring method based on particle forming speed measurement

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011244028A (en) * 2010-05-14 2011-12-01 Casio Comput Co Ltd Imaging apparatus, shake correcting method, and program
CN103439756A (en) * 2013-07-31 2013-12-11 中国人民解放军理工大学 Natural precipitation particle micro physical characteristic measuring method based on particle forming speed measurement

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈波: "自适应光学图像复原理论与算法研究", 《中国博士学位论文全文数据库信息科技辑》, no. 07, 15 July 2010 (2010-07-15), pages 69 - 90 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017012528A1 (en) * 2015-07-23 2017-01-26 清华大学 Point spreading function estimation method and system
CN106372035A (en) * 2015-07-23 2017-02-01 清华大学 Estimation method and system of point spreading function
US10152774B2 (en) 2015-07-23 2018-12-11 Tsinghua University Method and system for estimating point spread function
CN106372035B (en) * 2015-07-23 2018-12-18 清华大学 A kind of point spread function number estimation method and system
CN114174791A (en) * 2019-08-07 2022-03-11 安捷伦科技有限公司 Optical imaging performance testing system and method

Also Published As

Publication number Publication date
CN103927740B (en) 2017-06-23

Similar Documents

Publication Publication Date Title
CN109416727B (en) Method and device for removing glasses in face image
US10417750B2 (en) Image processing method, device and photographic apparatus
US9344690B2 (en) Image demosaicing
EP2849431A1 (en) Method and apparatus for detecting backlight
EP3481054A1 (en) Machine vision 3d line scan image acquisition and processing
TWI775935B (en) Method of estimating depth in image
CN105890768B (en) A kind of method and device of Infrared Image Non-uniformity Correction
CN104050642B (en) Color image restoration method
CN104079818A (en) Image pickup apparatus, image processing system, image pickup system and image processing method
CN104657737A (en) Method and device for correcting QR (Quick Response) two-dimensional code image based on clustering
Yang et al. Designing display pixel layouts for under-panel cameras
Zhang et al. Imaging through the atmosphere using turbulence mitigation transformer
CN109285122B (en) Method and equipment for processing image
Jang et al. Deep color transfer for color-plus-mono dual cameras
US9721348B2 (en) Apparatus and method for raw-cost calculation using adaptive window mask
CN103927740A (en) Method and device for obtaining point spread function of image
CN106683043B (en) Parallel image splicing method and device of multi-channel optical detection system
Kong et al. The robodepth challenge: Methods and advancements towards robust depth estimation
CN111947601B (en) Projection resolving method for gray-scale pseudo-random coding structure light striations
US9525859B2 (en) Refinement of user interaction
CN106355559B (en) A kind of denoising method and device of image sequence
CN106683044B (en) Image splicing method and device of multi-channel optical detection system
CN104754316A (en) 3D imaging method and device and imaging system
Kim et al. Global motion-aware robust visual object tracking for electro optical targeting systems
CN104902260B (en) The acquisition methods and system of a kind of image parallactic

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
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: 20170623