Camera extrinsic number mark based on the interval automobile instrument automatic detection visual system eliminating
Determine method
Technical field
The present invention relates to a kind of Camera extrinsic number scaling method.
Background technology
In automobile instrument automatic detecting platform, visual system is the core of platform, and most detection use-case is all
Relevant with image procossing, image recognition., as the core component of visual system, its parameter is fine or not, directly for wherein camera
Have impact on the accuracy of detection of detection platform, this requires to find a kind of side being capable of quick and precisely calibration for cameras parameter optimal value
Method.
Camera has intrinsic parameter and outer parameter, and intrinsic parameter cannot change after camera dispatches from the factory again, and outer parameter is can
With adjust at any time, these parameters include aperture time, camera gain, contrast etc..In actual applications, these Camera extrinsic
Number does not have a standard, rational algorithm to determine these parameters, is essentially all empirically to pass through continuous debugging
Find one group of relatively reasonable parameter.In automobile instrument automatic detecting platform, the algorithm of image procossing is often to determine, calculates
Method realize programming after the completion of be not intended to change, but when light in detection platform, the brightness of automobile instrument itself,
When color changes, we must make corresponding change again, at this moment just can reach it is desirable that only changing Camera extrinsic number
Algorithm requires.But because the camera of detection platform has the outer parameter of many, if only to debug outer parameter by experience, often look for not
To one group of satisfied parameter, this is unfavorable to the reusability of automobile instrument automatic detection algorithm, therefore finds a kind of quick
Accurately scaling method is very necessary.
Interval cancellation is a kind of by constantly reducing siding-to-siding block length thus the one kind gradually approaching object function extreme point is excellent
Change method, that is, in each iterative process, all eliminates a part and does not contain the interval of extreme point, until remaining interval according to one
Fixed required precision converges to extreme point.
The outstanding algorithm at present the adjustment neither one of Camera extrinsic number generally acknowledged, major part is all using the most direct
" test method(s) ", personnel empirically carry out adjusting parameter with subjective sensation.The thought of " test method(s) " is:Given one group of initial parameter values,
Empirically change a parameter every time, judge whether new parameter value is more reasonable by subjective sensation, if under reasonable change
One parameter value, if unreasonable continue to change this parameter, constantly modification parameter feels reasonable until subjective.This method
Shortcoming the most fatal is that it has very big randomness, and whether the parameter finally demarcated is reasonable and do not know.This shortcoming is in vapour
Embody clearly in car instrument automatic detecting platform, the camera parameter of detection platform is a lot, the process of debugging camera parameter
Very complicated, and be difficult to find the parameter of one group of satisfaction.
Content of the invention
The present invention is can only to rely on individual to solve the Camera extrinsic number of existing automobile instrument automatic detection visual system
Experience is adjusted, and makes that parameters precision is low, parameter testing process complicated, and then leads to automobile instrument automatic detection visual system detection essence
Spend low problem, the Camera extrinsic number scaling method based on the interval automobile instrument automatic detection visual system eliminating now is provided.
Based on the Camera extrinsic number scaling method of the interval automobile instrument automatic detection visual system eliminating it is:
All Camera extrinsic numbers to be calibrated are iterated, obtain the minima f (X of iteration resultj)minWith this minima f
(Xj)minCorresponding optimum Camera extrinsic number Xj, wherein j is iterationses, and initial value is 1;As j=2, execute following step:
Minima f (the X of contrast current iteration resultj)minCorresponding optimum Camera extrinsic number XjWith last iteration result
Minima f (Xj-1)minCorresponding optimum Camera extrinsic number Xj-1If, | | Xj-Xj-1| |≤δ, then current iteration result is
Little value f (Xj)minCorresponding optimum Camera extrinsic number XjFor optimum Camera extrinsic number, δ is 0, otherwise, j=j+1, carry out next time
Iteration.
The method that all Camera extrinsic numerical value to be calibrated are iterated comprises the steps:
Step one:Minima f (X according to last iteration resultj-1)min, in all Camera extrinsic numbers to be calibrated, profit
With Fibonacci method, obtain Camera extrinsic numerical intervals to be calibratedAnd utilize golden cut algorithm to select in this interval
Take two groups of iterative parameter valuesWithWherein i ∈ [1, n], n are the number of Camera extrinsic number, then execution step two;
Step 2:Using two groups of iterative parameter valuesWithSet camera, and obtain the image shot by camera under this parameter,
Then execution step three;
Step 3:Camera shooting figure step 2 being obtained using the standards of grading of automobile instrument automatic detection visual system
As being scored, obtain 2nIndividual appraisal resultWherein k=1,2 ..., 2n, then execution step four;
Step 4:2 that step 3 is obtainednIndividual appraisal resultIt is compared, obtain 2nIn individual appraisal result
Little value f (Xj)min, thus obtaining minima f (Xj)minCorresponding Camera extrinsic number Xj.
Above-mentioned iterative parameterFor:
Above-mentioned iterative parameterFor:
Above-mentioned Camera extrinsic number XjFor:
Above-mentioned parameterFor camera gain.
Above-mentioned parameterFor shutter speed.
Camera extrinsic number demarcation side based on the interval automobile instrument automatic detection visual system eliminating of the present invention
Method, the optimal result using last iteration carries out next iteration, so that parameter area narrows down to the 0.618 of former interval,
And optimum camera parameter just be can determine by the iteration within 15 times, compare existing dependence personal experience and judge parameter
Faster, parameter value is more accurate for speed, and automobile instrument automatic detection visual system accuracy of detection can be made to improve 60%.Simultaneously
The present invention, for single-point parameter, can converge to optimized parameter;Local optimum parameter can be converged to for multiple spot parameter.
Camera extrinsic number demarcation side based on the interval automobile instrument automatic detection visual system eliminating of the present invention
Method is it is adaptable to demarcate to Camera extrinsic number.
Brief description
Fig. 1 is the image scoring figure of two groups of parameters, and wherein solid-line curve is shutter speed, and imaginary curve is camera gain;
Fig. 2 is the plane angle figure of iterative process;
Fig. 3 is the equal pitch contour visual angle figure of iterative process;
Fig. 4 is the parameter value scattergram of primary iteration;
Fig. 5 is iterative process schematic diagram when two parameters are iterated.
Specific embodiment
Specific embodiment one:The automobile instrument automatic detection visual system based on interval cancellation described in present embodiment
Camera extrinsic number scaling method be:
All Camera extrinsic numbers to be calibrated are iterated, obtain the minima f (X of iteration resultj)minWith this minima f
(Xj)minCorresponding optimum Camera extrinsic number Xj, wherein j is iterationses, and initial value is 1;As j=2, execute following step:
Minima f (the X of contrast current iteration resultj)minCorresponding optimum Camera extrinsic number XjWith last iteration result
Minima f (Xj-1)minCorresponding optimum Camera extrinsic number Xj-1If, | | Xj-Xj-1| |≤δ, then current iteration result is
Little value f (Xj)minCorresponding optimum Camera extrinsic number XjFor optimum Camera extrinsic number, δ is 0, otherwise, j=j+1, carry out next time
Iteration.
Specific embodiment two:Present embodiment is to the automotive meter based on interval cancellation described in specific embodiment one
The Camera extrinsic number scaling method of table automatic detection visual system is described further, in present embodiment, to all to be calibrated
The method that Camera extrinsic numerical value is iterated comprises the steps:
Step one:Minima f (X according to last iteration resultj-1)min, in all Camera extrinsic numbers to be calibrated, profit
With Fibonacci method, obtain Camera extrinsic numerical intervals to be calibratedAnd utilize golden cut algorithm to select in this interval
Take two groups of iterative parameter valuesWithWherein i ∈ [1, n], n are the number of Camera extrinsic number, then execution step two;
Step 2:Using two groups of iterative parameter valuesWithSet camera, and obtain the image shot by camera under this parameter,
Then execution step three;
Step 3:Camera shooting figure step 2 being obtained using the standards of grading of automobile instrument automatic detection visual system
As being scored, obtain 2nIndividual appraisal resultWherein k=1,2 ..., 2n, then execution step four;
Step 4:2 that step 3 is obtainednIndividual appraisal resultIt is compared, obtain 2nIn individual appraisal result
Little value f (Xj)min, thus obtaining minima f (Xj)minCorresponding Camera extrinsic number Xj.
Specific embodiment three:Present embodiment is to the automotive meter based on interval cancellation described in specific embodiment two
The Camera extrinsic number scaling method of table automatic detection visual system is described further, in present embodiment, described iterative parameterFor:
Specific embodiment four:Present embodiment is to the automotive meter based on interval cancellation described in specific embodiment two
The Camera extrinsic number scaling method of table automatic detection visual system is described further, in present embodiment, iterative parameterFor:
Specific embodiment five:Present embodiment is to the automotive meter based on interval cancellation described in specific embodiment two
The Camera extrinsic number scaling method of table automatic detection visual system is described further, in present embodiment, described Camera extrinsic
Number XjFor:
Specific embodiment six:Present embodiment is to the automotive meter based on interval cancellation described in specific embodiment two
The Camera extrinsic number scaling method of table automatic detection visual system is described further, in present embodiment, parameterFor camera
Gain.
Specific embodiment seven:Present embodiment is to the automotive meter based on interval cancellation described in specific embodiment two
The Camera extrinsic number scaling method of table automatic detection visual system is described further, in present embodiment, parameterFor shutter
Speed.
As shown in figure 1, according to automobile instrument automatic detection algorithm, two camera parameters obtain figure in the case of different value
As the scoring of quality, scoring lower expression picture quality is better.
In conjunction with shown in Fig. 2 and Fig. 3, in all Camera extrinsic numbers to be calibrated, choose camera gain and two groups of shutter speed
Parameter, and set the scope of camera gain value as [0,100], the scope of shutter speed value is [0,100];
Using Fibonacci method, obtaining two groups of primary iteration parameters is:
Standards of grading using automobile instrument automatic detection visual system score to above-mentioned two groups of image shot by cameras,
Obtain 4 appraisal resultAs shown in Figure 4;Two camera gain parameters and two shutter speed parameters
Four parameter value intervals are marked off, four points represent the value condition of four kinds of camera parameters.
Iterative process as shown in figure 5, each square frame represent be each iteration shutter speed and camera gain data point,
Numerical value in square frame represents the result of which time iteration, and plus sige represents the optimized parameter of each iteration.Pass through as seen from Figure 4
Method of the present invention, camera parameter constantly approaches to optimal location, has arrived the position of local optimum through 11 iteration convergences
Put, now camera gain is 62, shutter speed is 18, parameter scores are 101, approximately close to optimized parameter scoring 100.Thus demonstrate,prove
The bright present invention have found the local optimum of parameter by iteration, and achieve multiple parameters and adjust simultaneously, compares artificial operation
Not only more rapid but also more accurate, effectively increase the accuracy of detection of automobile instrument automatic detection visual system.