Disclosure of Invention
In view of the above, the present invention provides a binocular camera three-dimensional profile scanner and a method for using the same,
in order to achieve the above purpose, the invention provides the following technical scheme:
a binocular camera three dimensional contour scanner comprising:
a first high-resolution camera;
the second high-resolution camera is symmetrically arranged with the first high-resolution camera and forms a fixed angle with the first high-resolution camera to form a point to be measured on the surface of the measured object;
the parallel linear array light source is positioned between the second high-resolution camera and the first high-resolution camera, and emits projection light to be used as a measurement light source;
the first bilateral telecentric lens is connected with the first high-resolution camera through a standard interface and is used for imaging the measured object in a certain direction;
the second bilateral telecentric lens is connected with the second high-resolution camera through a standard interface and is used for imaging the measured object in the other direction;
the third bilateral telecentric lens is used for the structural light modulation of the parallel linear array light source;
the high-speed image acquisition and analysis module is connected with the first high-resolution camera and the second high-resolution camera, and is used for performing high-speed reading and data storage on images of the first high-resolution camera and the second high-resolution camera, processing, calculating and analyzing the images, and displaying the three-dimensional coordinate information and the measurement error information of the surface of the measured object;
the optical axis of the third bilateral telecentric lens is positioned on an angular bisector of an included angle formed by the optical axis of the first bilateral telecentric lens and the optical axis of the second bilateral telecentric lens;
and the high-precision multi-dimensional adjusting mechanism is positioned in the measurement space area and is used for carrying out multi-dimensional high-precision adjustment on the pose and the support of the object to be measured.
Preferably, the first high-resolution camera and the second high-resolution camera are fast CCD cameras.
Preferably, the linear array direction of the parallel linear array light source is perpendicular to the plane where the optical axes of the first double-sided telecentric lens and the second double-sided telecentric lens are located, and the parallel linear array light source is used for marking distribution of measured points along the axial position.
Preferably, the parallel line light source includes: LED, battery of lens, parallel lines grating and the two-sided telecentric mirror head of third that connect gradually will the light source that LED produced, through the battery of lens parallel lines grating and the two-sided telecentric mirror head of third forms images to the determinand space.
In another aspect, a method for using a binocular camera three-dimensional profile scanner includes the steps of:
s1: setting a distance 2l between the centers of entrance pupils of two lenses of the first bilateral telecentric lens;
s2: respectively using the centers of the first bilateral telecentric lens and the second bilateral telecentric lens as an origin to establish a measurement coordinate system, wherein the Z axis is positioned on the optical axis angular bisector of the first bilateral telecentric lens and the second bilateral telecentric lens and points to the direction of the measured object, and then using the sensor center of the first high-resolution camera as the origin and u is respectively used as the origin along the parallel directions of two sides of the sensor A Shaft and v A An axis with the center of the second high resolution camera as the origin and u in parallel along two sides of the sensor B Shaft and v B Axes establishing two local coordinate systems, wherein A of the first high resolution camera B V of axis and second high resolution camera B The axes are parallel to the Y axis of the global coordinate system, the observed points form imaging points on the sensors of the first high-resolution camera and the second high-resolution camera, and the corresponding coordinates are (u) respectively A ,v A )、(u B ,v B ),;
S3: calculating the coordinate (delta X, delta Y, delta Z) resolution of the P point of the measured object;
s4: and obtaining the position information of the surface of the scanned object according to the coordinates of the P point of the measured object.
Preferably, the step S3 of calculating coordinates of the point P of the measured object includes:
where β is the magnification of the lens and (u) A ,u A ) The coordinates of the observed point in the coordinate system corresponding to the image point formed by the first high-resolution camera are (u) B ,v B ) Coordinates corresponding to the image point of the observed point formed by the second high-resolution camera in the coordinate system;
the subscripts A and B respectively represent measurement results of a first high-resolution camera and a second high-resolution camera of the camera;
s33: and obtaining the coordinate (delta X, delta Y, delta Z) resolution of the P point of the measured object.
Preferably, the method further comprises calibrating the binocular camera three-dimensional profile scanner, wherein the calibration comprises the magnification of a calibration lens and the included angle between the optical axes of the telecentric lenses of the first high-resolution camera and the second high-resolution camera
Compared with the prior art, the invention discloses and provides a binocular camera three-dimensional contour scanner and a using method thereof, and the binocular camera three-dimensional contour scanner has the following beneficial effects:
(1) The measuring principle is simple, visual, credible and reliable;
(2) The measurement precision only depends on one geometric parameter, namely the included angle theta between the optical axes of the two lenses, so that the final measurement/repeated measurement precision can reach the micron level;
(3) The measurement precision is not influenced by external factors, the self calibration of the instrument is simple, the automatic calibration can be realized, and frequent calibration is not needed;
(4) The single scanning range is large, the measuring speed is high, the operation is simple, and the automation degree is high;
(5) The invention realizes large-scale measurement, contour outline measurement, geometric center measurement and the like through multiple times of quick scanning, can also correspond the measurement result with a drawing, thereby giving out workpiece processing errors and the like, and can be used for quick automatic detection of the quality of the workpiece, therefore, the invention has wide application.
Detailed Description
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 obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
On one hand, referring to fig. 1, the embodiment of the invention discloses a binocular camera three-dimensional contour scanner, which comprises:
a first high-resolution camera;
the second high-resolution camera is symmetrically arranged with the first high-resolution camera, and forms a fixed angle with the first high-resolution camera to form a point to be measured on the surface of the measured object;
the parallel linear array light source is positioned between the second high-resolution camera and the first high-resolution camera, and emits projection light to be used as a measurement light source;
the first double-side telecentric lens is connected with the first high-resolution camera through a standard interface and is used for imaging the measured object in a certain direction;
the second bilateral telecentric lens is connected with the second high-resolution camera through a standard interface and is used for imaging the measured object in the other direction;
the third bilateral telecentric lens is used for the structural light modulation of the parallel linear array light source;
the high-speed image acquisition and analysis module is connected with the first high-resolution camera and the second high-resolution camera through data lines (network cables, USB lines and the like), is integrally installed in a box body together with the first bilateral telecentric lens and the second bilateral telecentric lens, and jointly forms a measurement unit, wherein the high-speed image acquisition and analysis module is used for performing high-speed reading and data storage on images of the first high-resolution camera and the second high-resolution camera, processing and calculating analysis on the images, and displaying three-dimensional coordinate information and measurement error information on the surface of a measured object;
and in order to obtain an effective measurement space range as large as possible, the optical axis of the third bilateral telecentric lens is located on an angular bisector of an included angle formed by the optical axis of the first bilateral telecentric lens and the optical axis of the second bilateral telecentric lens as far as possible.
And the high-precision multi-dimensional adjusting mechanism is positioned in the measurement space area and is used for supporting the object to be measured and carrying out multi-dimensional high-precision pose adjustment, including horizontal displacement, height adjustment and object to be measured rotary scanning.
The two resolution cameras are of the same type, optical axes of the two lenses are positioned in the same plane and intersected through precise positioning, and an included angle between the optical axes is set to be a known angle. Taking the straight line of the centers of the entrance pupils of the two lenses as an axis, and establishing a coordinate system by taking the straight line which passes through the midpoint of a connecting line of the two points in the plane and is vertical to the axis as the axis.
Specifically, the optical axes of the telecentric lenses of the two high-resolution cameras are located in the same plane and form a fixed angle with each other, and the point to be measured on the surface of the object to be measured, such as P given in fig. 1 1 、P 2 、P 3 The positions of the points on each camera sensor can be calculated by incident rays parallel to the respective optical axes, so that the spatial coordinates of the points are obtained by calculation.
Specifically, referring to fig. 2, the parallel linear array light source is a stripe light source used as a measurement light source, the linear array direction is perpendicular to the plane of the optical axis of the lens and used for marking the distribution of measured points along the axial position, the parallel linear array light source is realized by the principle that a parallel line grating is imaged to the space of an object to be measured through a bilateral telecentric lens, and the parallel linear array light source is composed of four parts, namely an LED, a brightness uniformity shaping lens group, a parallel line grating and a second bilateral telecentric lens.
More specifically, the first bilateral telecentric lens and the second bilateral telecentric lens are adopted, and from the optical equivalent, the first bilateral telecentric lens and the second bilateral telecentric lens can be regarded as an optical system consisting of two confocal thin lenses. Such an optical system has a great number of advantages, and object-side telecentricity ensures that the height of an image formed when an object moves in the depth of field remains unchanged, and likewise, when a camera is out of focus properly, the center of the image formed by the system on a sensor pixel of the camera remains unchanged, so that the measurement accuracy can be greatly improved.
Secondly, the parallel linear array light source selected by the light source for measurement is realized through a third group of bilateral telecentric lenses, and a very ideal linear array light source can be obtained by imaging the wire grid to the measurement area range, wherein the linear array direction is parallel to the Y axis. This is done to eliminate the non-linear effect of the image of the object along the v-axis due to the highly non-linear variation, which is not present in the Y-axis.
In a specific embodiment, the first high-resolution camera and the second high-resolution camera adopt rapid CCD cameras, 15 images can be scanned per second, and the calculation time of the key position can reach within 100ms, so that for the chip process automation detection application, the online quality detection of the conveyor belt with more than 5 chips per second can be realized.
In one embodiment, the analysis system may also provide corresponding feedback signals for quality check pass and fail marking to automate the rapid automated product pass screening mechanism.
On the other hand, referring to fig. 3, the embodiment of the invention discloses a method for using a binocular camera three-dimensional contour scanner, which comprises the following steps:
s1: setting a distance 2l between the centers of entrance pupils of two lenses of the first bilateral telecentric lens;
s2: respectively establishing a measurement coordinate system (constituting a global coordinate system) by taking the centers of the first bilateral telecentric lens and the second bilateral telecentric lens as an original point, wherein the Z axis is positioned on an optical axis angular bisector of the first bilateral telecentric lens and the second bilateral telecentric lens and points to the direction of a measured object, and then taking the center of the sensor of the first high-resolution camera A as the original point and respectively taking the parallel directions of two sides of the sensor as u-axis A Shaft and v A An axis with the center of the second high-resolution camera B as the origin and u in parallel directions along two sides of the sensor B Shaft and v B Axes establishing two local coordinate systems, wherein v of the first high resolution camera A V of axis and second high resolution camera B The axes are parallel to the Y axis of the global coordinate system, the observed point forms an image point on the first high-resolution camera and the second high-resolution camera sensor, and the corresponding coordinates on the two local coordinate systems are (u) respectively A ,v A )、(u B ,v B ),;
S3: calculating the coordinate resolution ((delta X, delta Y, delta Z)) of the measured object P point;
s4: and obtaining the position information of the surface of the scanned object according to the coordinates of the P point of the measured object.
In a specific embodiment, the two high-resolution cameras are of the same type and are provided with the same high resolution, the optical axes of the two lenses are positioned in the same plane alpha and intersected through precise positioning, and the included angle between the optical axes is set to be a known angle 2 theta. Taking a straight line where the centers O 'and O' of the entrance pupils of the two lenses are positioned as an X axis, taking a straight line which passes through the midpoint of a connecting line of the two points in a plane alpha and is vertical to the X axis as a Z axis to establish a coordinate system,
specifically, a distance 2l between the centers O' and O ″ of the entrance pupils of the two lenses is set, and then a camera coordinate system is established by using the sensor centers of the first high-resolution camera a and the second high-resolution camera B as the origin, and the coordinates of the imaging point formed by the observed point P on the two sensors in the two coordinate systems are (u) respectively A ,v A )、(u B ,v B ) Wherein the v-axes of the two cameras are both parallel to the Y-axis of the global coordinate system, and the coordinates of the point P can be obtained through the geometric relationship in fig. 3 as follows:
where β is the magnification of the lens, the position information of the surface of the scanned object can be calculated from the coordinates of its images on the two high-resolution cameras.
Can be obtained from the formula (1):
where Δ u, Δ v denote the total size of a number of picture elements along the camera sensor coordinate system u, v axis, defined by the first section, respectively, and the subscripts a, B denote the measurements of the first high resolution camera a, second high resolution camera B, respectively. Therefore, the measurement precision of the system is irrelevant to the two lens distance parameter l, so that the inaccuracy of l does not influence the relative size or the coordinate of the outline of the measured object.
More specifically, the second bilateral telecentric lens has a fixed magnification, which makes the parameter β in the formula (1) always keep constant in the measurement process, independent of the measurement element selection and measurement process, thereby greatly improving the repetition precision of the measurement.
Therefore, the measurement accuracy of the profile scanner provided by the invention can be seen from (1), which is increased along with the increase of the magnification beta of the lens, so that for a given camera, lenses with different magnifications can be configured to meet the requirements of different application occasions on the measurement accuracy.
In one embodiment, and referring to FIG. 4, simulated imaging results are provided.
Fig. 4 (a) shows a model of a surface of an object to be measured, and fig. 4 (b) and fig. 4 (c) show simulation imaging results of a first high-resolution camera and a second high-resolution camera, respectively, and it can be seen that the surface is divided into uniform grids, grid lines are distributed along an X axis and a Y axis, respectively, and the grid lines undergo nonlinear stretching change along the X axis direction, that is, the long side direction, so that it is very difficult to try to find pixels corresponding to the same object point through an image shot by a two-phase camera unless the object surface has an obvious mark.
Fig. 4 (d) and 4 (e) show the difference (measured absolute error) between the measured value of the X coordinate and the Z coordinate of the point to be measured calculated by applying the formula (1) and the corresponding coordinate given by the theoretical model of fig. 4 (a) from the simulated imaging fig. 4 (b) and fig. 4 (c), respectively, and the calculation shows that the mean absolute error of these measured points is less than 1 μm for both the X coordinate and the Z coordinate, while the root mean square value, the X coordinate is still less than 1 μm, but the root mean square value of the measured error of the Z coordinate reaches 1.3 μm, because we only use the pixel resolution for calculation. And the measurement of the Y coordinate is absolutely accurate in theory, so that no measurement error exists in the analog imaging calculation.
In the invention, through the introduction of the linear array light source, the problem of marking the surface position of the measured object is successfully solved, the line width central position can be accurately calculated through the line width distribution function and the combination of image data, and the measurement precision of the system can be greatly improved through the line width central position, so that the final measurement precision of the system can reach within 1 mu m.
In one embodiment, the calibration of the system of the present invention is very simple because only two parameters, i.e., the lens magnification β and the angle 2 θ between the two optical axes, where β is determined by the unique optical performance of the double-sided telecentric lens, is generally known and is not easily changed, so the calibration of the system of the present invention, mainly the calibration parameter θ, can be realized by a standard, such as a high-resolution discriminator plate, and θ can be calibrated by the first type in equation (2).
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.