Disclosure of Invention
In order to solve the above problems, the present invention provides a line frequency calibration method for a TDI camera based on the above description, which is obtained by performing calculation using an acquired image. The method comprises the steps that a stripe image inclined at a certain angle is adopted for push-broom imaging, when the moving speed of a target is matched with the line frequency of a TDI image sensor, the inclination angle of a beat image in a dynamic image is the same as the actual beat image inclination angle, and when the moving speed of the target is not matched with the line frequency of the TDI image sensor, the inclination angle of the beat image in the dynamic image changes and deviates from the actual beat image inclination angle. The current line frequency deviation coefficient can be calculated by calculating the inclination angle of the beat frequency image in the dynamic image and utilizing the speed deviation-inclination angle curve, and the accurate line frequency parameter can be obtained by correcting the current line frequency. The method adopts real-time dynamic images for calculation, and the image speed deviation test resolution can reach one thousandth. The method tests the whole photoelectric system, only needs the image to calculate the parameters, and has convenient test flow. The method specifically comprises the following steps:
a line frequency calibration method of a TDI camera comprises the following steps:
s1, initializing the system;
s2, the lighting device is turned on to generate a uniform area light source, the high-precision motion mechanism drives the stripe target to move at a uniform speed, and the TDI camera captures and feeds back an image of the stripe target and feeds the image back to the imaging device;
the whole row size of the stripes on the S3 stripe target is n multiplied by n, when the stripe target moves, the n-th stripe and the middle of the pixel meet to be a point (x)a,ya) The 1 st stripe and the middle of the pixel are intersected to a point b (x)b,yb),bDeviation ofPoint (x)b deviation of,yb deviation of) Passing through points a and b using a tilt angle calculation methodDeviation ofTilt angles of points a and b:
wherein, the speed deviation is the change of the speed reflected by the change of the intercept of the straight line of the 1 st stripe on the y-axis, and the intersection point between the linear equation of the speed deviation and the middle of the pixel is bDeviation ofPoint, thetaDeviation ofIs the actual inclination angle of the beat image at the theoretical speed, thetaTheory of the inventionThe theoretical inclination angle of the beat image at the theoretical speed is obtained;
s4 determines the equation of a straight line for points a and b:
y=-tanθtheory of the invention·x+yb·(1-ηDeviation of speed) (3)
Wherein eta isDeviation of speedIs the speed deviation;
s5 repeating steps S2 to S4 a plurality of times, the moving speed of the stripe target in step S2 being different for each test;
s6 testing the moving speed according to the tested dataDeviation ofAnd ηDeviation of speedDrawing a curve;
s7 calculating the corrected line frequency value fCorrection ofThe calculation formula is as follows:
fcorrection of=fSetting up÷(1-ηDeviation of speed) (4)
Wherein, the set theoretical line frequency value f isSetting up。
Preferably, the illumination device includes an integrating sphere and an LED or a halogen lamp and an LED.
Preferably, the lighting device is an LED surface light source.
Preferably, the high-precision motion mechanism can be a uniform linear motion mechanism or a uniform rotary motion mechanism.
Preferably, the stripe target is a stripe target with alternate light and shade, and the area of the stripe target array after projection can cover more than 50 × 50 pixels.
A correction system of TDI camera line frequency comprises an illuminating device, a high-precision motion mechanism, a target generating device, a TDI camera and an imaging device which are sequentially arranged, wherein a stripe target is arranged on the high-precision motion mechanism;
the lighting device is used for uniformly providing light sources for the stripe target;
the high-precision movement mechanism is used for driving the stripe target to move at a constant speed;
the target generating device outputs light rays passing through the stripe target into parallel light rays;
the TDI camera is placed on a light path of the parallel light rays and focuses light beams on an image surface of an image sensor of the TDI camera;
the imaging device obtains an image, calculates the inclination angle of a beat image in the image by using an inclination angle calculation method, calculates a speed error value corresponding to the inclination angle by using a speed error coefficient calculation method, and finally corrects the beat frequency.
Has the advantages that: the method mainly obtains the deviation amount of the speed by analyzing the inclination angle of the beat image of the dynamic image and calculating, and further corrects the line frequency parameter of the TDI camera. The method adopts real-time images for calculation, the calculation result can reflect the deviation value of the image acquisition time speed, a plurality of images do not need to be acquired, and the testing efficiency is effectively improved. The resolution of the speed error can reach one thousandth, and the correction precision of the line frequency can be improved.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that the terms first, second, third, etc. are used herein to describe various components or features, but these components or features are not limited by these terms. These terms are only used to distinguish one element or part from another element or part. Terms such as "first," "second," and other numerical terms when used herein do not imply a sequence or order unless clearly indicated by the context. For convenience of description, spatially relative terms such as "inner", "outer", "upper", "lower", "left", "right", "upper", "left", "right", and the like are used herein to describe the orientation relation of the components or parts in the present embodiment, but these spatially relative terms do not limit the orientation of the technical features in practical use.
As shown in fig. 1 to 5, a line frequency calibration method for a TDI camera includes the following steps:
s1, initializing the system;
s2, the lighting device is turned on to generate a uniform area light source, the high-precision motion mechanism drives the stripe target to move at a uniform speed, and the TDI camera captures and feeds back an image of the stripe target and feeds the image back to the imaging device;
the whole row size of the stripes on the S3 stripe target is n multiplied by n, when the stripe target moves, the n-th stripe and the middle of the pixel meet to be a point (x)a,ya) The 1 st stripe and the middle of the pixel are intersected to a point b (x)b,yb),bDeviation ofPoint (x)b deviation of,yb deviation of) Passing through points a and b using a tilt angle calculation methodDeviation ofTilt angles of points a and b:
wherein, the speed deviation is the change of the speed reflected by the change of the intercept of the straight line of the 1 st stripe on the y-axis, and the intersection point between the linear equation of the speed deviation and the middle of the pixel is bDeviation ofPoint, thetaDeviation ofIs the actual inclination angle of the beat image at the theoretical speed, thetaTheory of the inventionThe theoretical inclination angle of the beat image at the theoretical speed is obtained;
s4 determines the equation of a straight line for points a and b:
y=-tanθtheory of the invention·x+yb·(1-ηDeviation of speed) (3)
Wherein eta isDeviation of speedIs the speed deviation;
s5 repeating steps S2 to S4 a plurality of times, the moving speed of the stripe target in step S2 being different for each test;
s6 testing the moving speed according to the tested dataDeviation ofAnd ηDeviation of speedDrawing a curve;
s7 calculating the corrected line frequency value fCorrection ofThe calculation formula is as follows:
fcorrection of=fSetting up÷(1-ηDeviation of speed) (4)
Wherein, the set theoretical line frequency value f isSetting up。
The specific distance of the method is as follows:
as shown in fig. 1, the lighting device designed by the present invention can generate a uniform surface light source, the stripe target receives the uniform light source and projects the light source to the image surface of the TDI camera image sensor, the projected bright stripes and the projected dark stripes of the stripe target correspond to a row of pixels respectively, the area of the stripe target array after projection can cover more than 50 × 50 pixels, and the inclination angle is not too large during the stripe target testing process. As shown in fig. 2, in the target image imaged by the TDI camera, when the streak target is inclined, the bright streak covers 1/2 of adjacent pixels at a certain position, thereby generating a beat phenomenon.
The tilt angle calculation method is to fit the two-dimensional coordinates of the beat frequency of each line of the image to obtain a linear equation of the beat frequency, and as shown in fig. 2, the position (x) where the gray value changes by half is recorded in the process of transition from the bright stripe to the dark stripei,yi) For a group (x)i,yi) And performing least square fitting to obtain a linear equation y which is Ax + B, and calculating an inclination angle theta by using tan theta which is 1/A. Modeling a beat frequency image inclined by a certain angle by a speed error coefficient calculation method, calculating a relation curve of the inclination angle and the speed deviation, obtaining the speed deviation by knowing the inclination angle theta, and further correcting the line frequency parameter.
The specific operation modeling process is shown in fig. 3, it is known that the stripe alignment size is n × n, but when the stripe image is placed vertically, the stripe is parallel to the coordinate axis, when the stripe is tilted by a certain angle, the bright stripe intersects with the middle position of the pixel to generate a beat image, and the nth stripe intersects with the middle position of the pixel to a (x) (xa,ya) Point, the 1 st stripe and the middle of the pixel meet to b (x)b,yb) And (4) point.
Drawing a linear equation by using the points a and b, and calculating to obtain the linear equation, namely
By using
Calculating to obtain an angle value theta under the theoretical speed
Theory of the invention. When the velocity deviates from the theoretical value, the target image will change. When the relative moving speed of the target is higher, the target image presents a compression phenomenon, and stripes and intervals become narrow; targetWhen the relative movement speed is high, the target image exhibits a relaxation phenomenon, and the stripes and spaces become wide. In the model, the velocity variation is represented in b
Deviation ofThe dot position is shifted.
Then, calculation is started according to the correlation formula in step S4: the linear equation of the 1 st stripe is obtained from the inclination angle, the change of the speed is reflected in the change of the y-axis intercept of the linear of the 1 st stripe, so that the speed deviation is etaDeviation of speedCan be expressed as y-tan thetaTheory of the invention·x+yb·(1-ηDeviation of speed) The intersection point between the linear equation with the velocity deviation and the pixel is bDeviation ofPoints, using points a and bDeviation ofPoint drawing new straight line equation, which is:
is obtained by the
formula 5
To thereby determine theta
Deviation ofThe concrete means.
Deviation of different velocities ηDeviation of speedCorresponding to different angle values thetaDeviation ofCalculating a plurality of speed deviations etaDeviation of speedAngle value theta corresponding to the conditionDeviation ofAnd drawing a curve.
As shown in FIG. 4, in the actual test process, the beat angle θ is passed through the stripesDeviation ofObtaining the velocity deviation etaDeviation of speedSo as to correct the line frequency parameter to obtain a corrected value, i.e. f in formula 4Correction of。
When the line frequency parameter is larger, the relative moving speed of the target image becomes slower, the stripe interval becomes larger, the beat frequency image angle becomes larger, the speed deviation is a negative value, fCorrection ofIs less than fSetting upThe line frequency parameter becomes smaller after correction; when the line frequency parameter is smaller, the relative moving speed of the target image becomes faster, the stripe interval becomes smaller, the beat frequency image angle becomes smaller, the speed deviation is a positive value, fCorrection ofGreater than fSetting upThe line frequency parameter becomes large after correction.
In a preferred embodiment, the lighting device comprises an integrating sphere and an LED or a halogen lamp and an LED or the lighting device is an LED area light source.
In a preferred embodiment, the high-precision motion mechanism may be a uniform linear motion mechanism or a uniform rotational motion mechanism. The high-precision motion mechanism is the prior art, and is not described in detail and is not limited to one form.
In a preferred embodiment, the stripe targets are alternately bright and dark stripe targets, and the area of the stripe target array after projection can cover more than 50 × 50 pixels.
The present invention tests an 83 x 83 striped array and the velocity deviation versus angle curve is shown in figure 5 when the deflection angle is 0.7 deg..
A correction system of TDI camera line frequency comprises an illuminating device, a high-precision motion mechanism, a target generating device, a TDI camera and an imaging device which are sequentially arranged, wherein a stripe target is arranged on the high-precision motion mechanism;
the lighting device is used for uniformly providing light sources for the stripe target;
the high-precision movement mechanism is used for driving the stripe target to move at a constant speed;
the target generating device outputs light rays passing through the stripe target into parallel light rays;
the TDI camera is placed on a light path of the parallel light rays and focuses light beams on an image surface of an image sensor of the TDI camera;
the imaging device obtains an image, calculates the inclination angle of a beat image in the image by using an inclination angle calculation method, calculates a speed error value corresponding to the inclination angle by using a speed error coefficient calculation method, and finally corrects the beat frequency.
Wherein the target generator is used for emitting the light beam in the light path.
The system specifically comprises: the method comprises the steps that a stripe target is placed on a high-precision movement mechanism and located at an object space focal plane of a dynamic target generation device, an illumination mechanism 1 illuminates a test target 3, parallel light is output through a target generation device, a TDI camera is placed on a parallel light path emitted by the target generation device, the parallel light output by the stripe target through the target generation device is focused on an image surface of an image sensor of the TDI camera through an optical lens of the TDI camera to obtain a target image, an inclination angle of a beat image in the target image is calculated through an inclination angle calculation method, a speed error value corresponding to the inclination angle is calculated through a speed error coefficient calculation method, and finally the beat frequency is corrected.
The above embodiments are not limited to the technical solutions of the embodiments themselves, and the embodiments may be combined with each other into a new embodiment. The above embodiments are only for illustrating the technical solutions of the present invention and are not limited thereto, and any modification or equivalent replacement without departing from the spirit and scope of the present invention should be covered within the technical solutions of the present invention.