Target object stereo vision three-dimensional analysis and processing method based on cascade sampling
Technical field
The present invention relates to digital image processing techniques field, be specifically related to a kind of target object stereo vision three-dimensional analysis and processing method based on cascade sampling.
Background technology
Technique of binocular stereoscopic vision is an important branch in technical field of image processing, and it generally processes the mode of scenery by binocular camera direct simulating human eyes, according to two width images about different points of view collection, in order to determine the three-dimensional structure of monitored scene.Three-dimensional scenic can only be recorded in a two-dimensional manner from general camera chain and to have lost substantial amounts of information different, Binocular Stereo Vision System is obtained in that scene three-dimensional data, is therefore increasingly widely applied in robot vision, aerial mapping, Military Application, medical diagnosis and industrial detection.
In occasions such as the detection of industrial products geometric parameter, video monitorings, Binocular Stereo Vision System have also been obtained and uses the most widely, currently mainly use binocular digital camera that the target objects such as industrial products, monitored object are carried out binocular image collection, thus according to the binocular image collected, shape, the size of industrial products is carried out stereo vision three-dimensional analysis, or position, the attitude of monitored object is carried out stereo vision three-dimensional analysis, etc..But during target object is carried out three dimensional analysis and calculating process, if the resolution ratio of binocular digital camera left and right camera is higher, then binocular digital camera can collect, with broader shooting angular field of view, the binocular image that monitored scene areas is bigger, and ensure that in binocular image, the imaging of target object is the most clear, therefore, it is possible in order to target object is carried out accurate three dimensional analysis;But, higher resolution ratio result also in the increase that the data point needing to carry out the matching analysis and three-dimensional computing in the left view picture of binocular image and right view picture is the order of magnitude, and data operation quantity is big, thus the efficiency that serious three dimensional analysis processes.And if in order to ensure the real-time that stereo vision three-dimensional analysis and calculating process, it is accomplished by limiting the resolution ratio of binocular digital camera left and right camera, for example with the resolution ratio of 640 × 480, to reduce, left view picture and right view picture are carried out the matching analysis and the data operation quantity of three-dimensional computing;But the reduction of resolution ratio, if carrying out binocular image collection with broader shooting angular field of view, target object image blur will be caused, if and carry out binocular image collection to ensure target object imaging definition with narrower shooting angular field of view, then monitored scene areas is caused to reduce the most therewith because visual angle reduces, therefore the binocular image collection of single is likely difficult to capture target object, add the difficulty of search target object, thus cause angular field of view and imaging definition to be taken into account.Therefore, in the application that based on binocular stereo imaging target object carried out stereo vision three-dimensional analysis, how to be equalized taken into account at real-time, angular field of view and imaging definition three aspect, become and need to be solved the technical problem that.
Summary of the invention
For above-mentioned deficiency present in prior art, it is an object of the invention to provide a kind of target object stereo vision three-dimensional analysis and processing method based on cascade sampling, in order to solve based on binocular stereo imaging target object to be carried out in the application of stereo vision three-dimensional analysis, the problem that real-time, angular field of view and imaging definition three aspect are difficult to take into account simultaneously.
For solving above-mentioned technical problem, present invention employs following technological means:
Target object stereo vision three-dimensional analysis and processing method based on cascade sampling, comprises the steps:
1) according to the highest resolution M × N of binocular digital camera left and right camera, default resolution ratio m × n that target object is carried out stereo vision three-dimensional analyzing and processing is set, it is ensured that M/m=N/n=K, K are the integer more than 1;
2) the left and right camera of binocular digital camera is controlled with the widest shooting angular field of view, by highest resolution, monitored scene is carried out binocular digital image acquisition for the first time, and left and right camera is set in gatherer process carries out K times of pixel down-sampling, i.e. carry out pixel sampling at interval of K-1 row and every between-line spacing K-1 pixel, thus obtain big visual angle left view picture and the big visual angle right view picture that resolution ratio is m × n;
3) big visual angle left view picture and big visual angle right view picture are carried out target object identification, and calculate the three-dimensional space position coordinate of target object;
4) keep shooting angular field of view constant, three-dimensional space position coordinate according to target object, adjust the left and right camera of binocular digital camera with target object for center, visual angle, by highest resolution, monitored scene carried out second time binocular digital image acquisition, and left and right camera is set in gatherer process centered by target object, carry out pointwise sampling by default resolving range, obtain small angle left view picture and small angle right view picture that resolution ratio is m × n;
5) utilize the small angle left view picture obtained and small angle right view picture that target object is carried out stereo vision three-dimensional analysis.
In above-mentioned target object stereo vision three-dimensional analysis and processing method based on cascade sampling, as a kind of prioritization scheme, column split rate M of described highest resolution M × N not less than 1280, row resolution, N is not less than 960.In above-mentioned target object stereo vision three-dimensional analysis and processing method based on cascade sampling, as a kind of prioritization scheme, column split rate m of described default resolution ratio m × n not less than 640, row resolution ratio n is not less than 480.
Compared to prior art, the method have the advantages that
1, present invention target object based on cascade sampling stereo vision three-dimensional analysis and processing method, during first time binocular digital image acquisition, ensure that the widest shooting angular field of view, be conducive to capturing target object image more rapidly, reduce the search difficulty of target object, have employed K times of pixel down-sampling simultaneously, greatly reduce the data operation quantity that big visual angle left view picture and big visual angle right view picture are carried out target object identification.
2, present invention target object based on cascade sampling stereo vision three-dimensional analysis and processing method, during second time binocular digital image acquisition, carry out under the conditions of the widest shooting angular field of view and highest resolution equally, and centered by target object, pointwise sampling is carried out by default resolving range, be conducive to follow-up target object carrying out reducing during stereo vision three-dimensional analysis data operation quantity, improve real-time, and owing to small angle left view picture and small angle right view seem to be obtained by pointwise sampling under the conditions of highest resolution, can effectively ensure that the imaging definition of target object.
3, present invention target object based on cascade sampling stereo vision three-dimensional analysis and processing method, have employed the mode of cascade sampling, method is analyzed compared to the stereo vision three-dimensional of prior art, its conceptual data operand is less, and can take into account simultaneously possess wider angular field of view and higher imaging definition, effectively solve based on binocular stereo imaging target object to be carried out in the application of stereo vision three-dimensional analysis, the problem that real-time, angular field of view and imaging definition three aspect are difficult to take into account simultaneously.
Accompanying drawing explanation
Fig. 1 is the flow chart of present invention target object based on cascade sampling stereo vision three-dimensional analysis and processing method.
Fig. 2 is the treatment effect schematic diagram of present invention target object based on cascade sampling stereo vision three-dimensional analysis and processing method.
Detailed description of the invention
The invention provides a kind of target object stereo vision three-dimensional analysis and processing method based on cascade sampling, the handling process of the method is as it is shown in figure 1, specifically include following steps:
1) according to the highest resolution M × N of binocular digital camera left and right camera, default resolution ratio m × n that target object is carried out stereo vision three-dimensional analyzing and processing is set, it is ensured that M/m=N/n=K, K are the integer more than 1;
2) the left and right camera of binocular digital camera is controlled with the widest shooting angular field of view, by highest resolution, monitored scene is carried out binocular digital image acquisition for the first time, and left and right camera is set in gatherer process carries out K times of pixel down-sampling, i.e. carry out pixel sampling at interval of K-1 row and every between-line spacing K-1 pixel, thus obtain big visual angle left view picture and the big visual angle right view picture that resolution ratio is m × n;
3) big visual angle left view picture and big visual angle right view picture are carried out target object identification, and calculate the three-dimensional space position coordinate of target object;
4) keep shooting angular field of view constant, three-dimensional space position coordinate according to target object, adjust the left and right camera of binocular digital camera with target object for center, visual angle, by highest resolution, monitored scene carried out second time binocular digital image acquisition, and left and right camera is set in gatherer process centered by target object, carry out pointwise sampling by default resolving range, obtain small angle left view picture and small angle right view picture that resolution ratio is m × n;
5) utilize the small angle left view picture obtained and small angle right view picture that target object is carried out stereo vision three-dimensional analysis.
It can be seen that, present invention target object based on cascade sampling stereo vision three-dimensional analysis and processing method, by the way of cascade sampling, first with the widest shooting angular field of view, by highest resolution, monitored scene is carried out binocular digital image acquisition for the first time, and in gatherer process, use K times of pixel down-sampling, obtain big visual angle left view picture and big visual angle right view picture that resolution ratio is m × n, calculate in order to the identification and three-dimensional space position coordinate carrying out target object;Then further according to the three-dimensional space position coordinate of target object, second time binocular digital image acquisition is carried out with target object for center, visual angle, and in gatherer process centered by target object, carry out pointwise sampling by default resolving range, obtain small angle left view picture that resolution ratio is m × n and small angle right view picture in order to carry out stereo vision three-dimensional analysis.Its treatment effect is as shown in Figure 2.Thus, owing to first time binocular digital image acquisition ensure that the widest shooting angular field of view, be conducive to capturing target object image more rapidly, reduce the search difficulty of target object, have employed K times of pixel down-sampling simultaneously, make binocular digital image acquisition for the first time still obtain big visual angle left view picture and the big visual angle right view picture of m × n resolution ratio under the resolution condition of highest resolution M × N, greatly reduce the data operation quantity that big visual angle left view picture and big visual angle right view picture are carried out target object identification;And although second time binocular digital image acquisition is carried out equally under the conditions of the widest shooting angular field of view and highest resolution, but the left and right camera of binocular digital camera is only centered by target object, pointwise sampling is carried out by default resolving range, still obtain small angle left view picture and the small angle right view picture of m × n resolution ratio, it is thus advantageous to follow-up target object carry out reducing during stereo vision three-dimensional analysis data operation quantity, improve real-time, and owing to small angle left view picture and small angle right view seem to be obtained by pointwise sampling under the conditions of highest resolution, can effectively ensure that the imaging definition of target object.Visible, present invention target object based on cascade sampling stereo vision three-dimensional analysis and processing method, preferably take into account real-time, angular field of view and the key element of imaging definition three aspect.
On the other hand, due to stereo vision three-dimensional analyze data operation quantity, be as the resolution ratio of binocular image increase and in geometry multiple increase;If the resolution ratio of binocular image increases to 2 times of m × n, then the binocular image data operation quantity of stereo vision three-dimensional analysis increases to 4 times of m × n the most accordingly;If the resolution ratio of binocular image increases to 3 times of m × n, then the binocular image data operation quantity of stereo vision three-dimensional analysis increases to 9 times of m × n the most accordingly;…….That is, in the case of the imaging definition ensureing target object is identical, if directly using the binocular image (being equivalent to K times of m × n resolution ratio, K >=2) of highest resolution M × N to carry out stereo vision three-dimensional analysis, then binocular image data operation quantity increases to K the most accordingly2Times m × n.And present invention target object based on cascade sampling stereo vision three-dimensional analysis and processing method, only need to resolution ratio to be the big visual angle left view picture of m × n and big visual angle right view picture carries out target object identification, and the small angle left view picture and small angle right view picture to resolution ratio is m × n carries out stereo vision three-dimensional analysis, just correspond to the binocular image data operation quantity of 2 times of m × n.As can be seen here, the conceptual data operand of present invention target object based on cascade sampling stereo vision three-dimensional analysis and processing method, also less than the stereo vision three-dimensional of prior art analyzes method, it is thus possible to preferably ensure the real-time of analyzing and processing.
Certainly, while taking into account real-time, in order to preferably guarantee angular field of view and imaging definition, the target object stereo vision three-dimensional analysis and processing method of the present invention suitably uses the binocular digital camera that highest resolution parameter is higher, column split rate M of its highest resolution M × N is preferably not less than 1280, row resolution, N is preferably not less than 960, to avoid when first time binocular digital image acquisition, after K times of pixel down-sampling, big visual angle left view picture and the big visual angle right view image sharpness of gained are too low, should affect the accuracy of identification of target object;And preset resolution ratio and also should not arrange too small, column split rate m presetting resolution ratio m × n is preferably not less than 640, row resolution ratio n is preferably not less than 480, the small angle left view picture and the small angle right view picture that make second time binocular digital image acquisition gained can better assure that the complete collection to target object image, it is to avoid impact carries out the accuracy of stereo vision three-dimensional analysis to target object.
Finally illustrate is, above example is only in order to illustrate technical scheme and unrestricted, although the present invention being described in detail with reference to embodiment, it will be understood by those within the art that, technical scheme can be modified or equivalent, without deviating from objective and the scope of technical solution of the present invention, it all should be contained in the middle of scope of the presently claimed invention.