Disclosure of Invention
The invention provides a three-dimensional target flight time measurement method, a system and a device based on machine vision guidance, which are used for solving the problem that the three-dimensional shape and size of a space target cannot be rapidly measured by the conventional flight time measurement, and adopt the following technical scheme:
a three-dimensional target time-of-flight measurement method based on machine vision guidance, the method comprising:
step 1, controlling a CCD camera to acquire a plane image corresponding to a target aiming at the target;
step 2, identifying a target area of a three-dimensional coordinate to be measured on the image, and aligning contour points D of the target areaiLabeling, wherein i represents the number of the contour points, and i is 1,2,3 … … n;
step 3, controlling the rotation angle of the TOF distance measuring instrument, enabling the TOF distance measuring instrument to emit visible laser to be aligned to the contour points of the target area, sequentially irradiating the contour points of the target area, and acquiring the space coordinate corresponding to each contour point of the target area;
step 4, judging the scanning number of the contour points of the target area to finish the scanning of all the contour points D of the target areaiIrradiation of (2);
step 5, according to the contour point D of the target areaiThe three-dimensional coordinates of the target area are obtained through calculation, and a target three-dimensional graph is drawn according to the three-dimensional coordinates.
Further, the step 3 of obtaining the spatial coordinates corresponding to each contour point of the target region includes:
301, controlling the CCD camera to acquire images emitted by the TOF range finder and sequentially irradiating contour points of the target area;
step 302, reading a range finder reading L obtained by aligning the TOF range finder with the contour point of the target area in sequencei;
Step 303, passing the rotation angle of the TOF rangefinder and the rangefinder reading LiObtaining the contour point D of the target areaiThe spatial coordinates of (a).
Further, the rotation angle of the TOF rangefinder comprises a rotation angle of the TOF rangefinder on the a-axis and the C-axis.
Further, the contour point D of the target area is obtained by the following formulaiSpatial coordinates of (a):
xd=L·cos(θa)·cos(θc)
yd=L·cos(θa)·sin(θc)
zd=L·sin(θc)
wherein x isd、ydAnd zdRespectively representing the coordinate value of the xyz axis corresponding to each point in the three points, L representing the reading of the TOF distance meter corresponding to each point in the three points, and thetaaAnd thetacRespectively representing the rotation angles of the TOF rangefinder on the a-axis and the C-axis.
Further, the process of determining the number of scanning contour points of the target area in step 4 is as follows:
judging whether i is more than or equal to n, if i is less than n, repeating the content of the step 3 until the TOF range finder finds all the target area contour points DiFinishing irradiation; if i ≧ n, step 5 is performed.
A three-dimensional target time-of-flight measurement system based on machine vision guidance, the system comprising:
the CCD camera control module is used for controlling the CCD camera to acquire a plane image corresponding to the target aiming at the target;
an identification module for identifying a target area of three-dimensional coordinates to be measured on the image and identifying contour points D of the target areaiLabeling, wherein i represents the number of the contour points, and i is 1,2,3 … … n;
the TOF distance meter control module is used for controlling the rotation angle of the TOF distance meter, enabling the TOF distance meter to emit visible laser to be aligned to the contour points of the target area, sequentially irradiating the contour points of the target area and acquiring the space coordinate corresponding to each contour point of the target area;
a judging module for judging the scanning number of the target area contour points to finish the scanning of all the target area contour points DiIrradiation of (2);
a three-dimensional coordinate acquisition module for acquiring the contour point D of the target areaiThe three-dimensional coordinates of the target area are obtained through calculation, and a target three-dimensional graph is drawn according to the three-dimensional coordinates.
Further, the TOF rangefinder control module comprises:
the image acquisition control module is used for controlling the CCD camera to acquire images when the TOF range finder emits the contour points of the target area in sequence;
a reading module for reading the range finder reading L obtained by the TOF range finder aligning to the contour point of the target area in sequencei;
A space coordinate acquisition module for passing the rotation angle of the TOF range finder and the range finder reading LiObtaining the contour point D of the target areaiThe spatial coordinates of (a).
Further, the judging module comprises:
the number judgment module is used for judging whether i is larger than or equal to n;
a repeated starting module used for repeatedly starting the TOF range finder control module until all the TOF range finder control modules are started when the number judgment module determines that i is less than nThe contour point D of the target areaiAll the steps are finished irradiating;
and the starting module is used for starting the three-dimensional coordinate acquisition module when the number judgment module determines that the result i is more than or equal to n.
A three-dimensional target time-of-flight measurement device based on machine vision guidance, the measurement device comprising: a computer, a bearing platform, a CCD camera and a TOF range finder; the computer is electrically connected with the bearing table, the CCD camera and the TOF distance measuring instrument respectively; the CCD camera is arranged inside the bearing table; the TOF range finder is movably mounted on the bearing table in a rotatable mode.
Furthermore, a horizontal rotating shaft which rotates in the horizontal direction is arranged on the upper surface of the bearing table, and a vertical rotating shaft which rotates in the vertical direction is arranged on the horizontal rotating shaft; and the TOF range finder is fixedly arranged on the vertical rotating shaft.
The invention has the beneficial effects that:
the invention provides a three-dimensional target flight time measuring method based on machine vision guidance, which realizes automatic measurement of space morphology size data of a measured target by using a mode of combining a TOF range finder and a CCD camera. The three-dimensional target flight time measuring method based on machine vision guidance can effectively improve the three-dimensional size measuring accuracy of the measured target, simplify the space plane size measuring process, reduce the data processing amount in the measuring process and effectively improve the speed and efficiency of space plane size measurement. Meanwhile, the TOF range finder and the CCD camera are combined to realize the rapid measurement and the high-precision measurement of the three-dimensional shape and size of the target to be measured in any shape.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
A three-dimensional target time-of-flight measurement method based on machine vision guidance, as shown in fig. 1 and 2, the method comprising:
step 1, controlling a CCD camera to acquire a plane image corresponding to a target aiming at the target;
step 2, identifying a target area of a three-dimensional coordinate to be measured on the image, and aligning contour points D of the target areaiLabeling, wherein i represents the number of the contour points, and i is 1,2,3 … … n;
step 3, controlling the rotation angle of the TOF distance measuring instrument, enabling the TOF distance measuring instrument to emit visible laser to be aligned to the contour points of the target area, sequentially irradiating the contour points of the target area, and acquiring the space coordinate corresponding to each contour point of the target area;
step 4, judging the scanning number of the contour points of the target area to finish the scanning of all the contour points D of the target areaiIrradiation of (2);
step 5, according to the contour point D of the target areaiThe three-dimensional coordinates of the target area are obtained through calculation, and a target three-dimensional graph is drawn according to the three-dimensional coordinates.
The process of obtaining the spatial coordinates corresponding to each target area contour point in step 3 includes:
301, controlling the CCD camera to acquire images emitted by the TOF range finder and sequentially irradiating contour points of the target area;
step 302, reading a range finder reading L obtained by aligning the TOF range finder with the contour point of the target area in sequencei;
Step 303, passing the rotation angle of the TOF rangefinder and the rangefinder reading LiObtaining the contour point D of the target areaiSpatial coordinates of。
The rotation angle of the TOF range finder comprises rotation angles of the TOF range finder on an A axis and a C axis, wherein the A axis represents rotation of the TOF range finder in a vertical direction, and theta represents rotation of the TOF range finder in a vertical directionaI.e. representing the angle at which the TOF rangefinder is rotated in the vertical direction. The C-axis represents the rotation of the TOF range finder in the horizontal direction, θcI.e. representing the angle at which the TOF rangefinder rotates in the horizontal direction.
Obtaining the contour point D of the target area by the following formulaiSpatial coordinates of (a):
xd=L·cos(θa)·cos(θc)
yd=L·cos(θa)·sin(θc)
zd=L·sin(θc)
wherein x isd、ydAnd zdRespectively representing the coordinate value of the xyz axis corresponding to each point in the three points, L representing the reading of the TOF distance meter corresponding to each point in the three points, and thetaaAnd thetacRespectively representing the rotation angles of the TOF rangefinder on the a-axis and the C-axis. Wherein the A axis represents the rotation of the TOF range finder in the vertical direction, θaI.e. representing the angle at which the TOF rangefinder is rotated in the vertical direction. The C-axis represents the rotation of the TOF range finder in the horizontal direction, θcI.e. representing the angle at which the TOF rangefinder rotates in the horizontal direction.
The process of judging the scanning number of the contour points of the target area in the step 4 is as follows:
judging whether i is more than or equal to n, if i is less than n, repeating the content of the step 3 until the TOF range finder finds all the target area contour points DiFinishing irradiation; if i ≧ n, step 5 is performed.
The working principle of the technical scheme is adopted; acquiring a planar image corresponding to a target by a CCD camera, identifying a target area of a three-dimensional coordinate to be measured on the planar image, and setting n contour points D on the target area of the three-dimensional coordinate to be measurediI is 1,2,3 … … n; then adjusting the angle of the TOF range finder to enable the TOF range finder to be sequentially arrangedAnd irradiating each contour point until all the contour points are irradiated, acquiring the space coordinate of each contour point, calculating through the space coordinate to acquire the three-dimensional coordinate of the measured target, and generating a three-dimensional graph.
The effect of the above technical scheme is as follows: and the automatic measurement of the spatial plane size data of the measured target is realized by combining a TOF distance meter and a CCD camera. The three-dimensional target flight time measuring method based on machine vision guidance can effectively improve the three-dimensional size measuring accuracy of the measured target, simplify the space plane size measuring process, reduce the data processing amount in the measuring process and effectively improve the speed and efficiency of space plane size measurement. Meanwhile, the TOF range finder and the CCD camera are combined to realize rapid measurement and high-precision measurement in the three-dimensional direction of the measured target in any shape.
The embodiment of the invention provides a three-dimensional target flight time measuring system based on machine vision guidance, and as shown in fig. 3, the system comprises:
the CCD camera control module is used for controlling the CCD camera to acquire a plane image corresponding to the target aiming at the target;
an identification module for identifying a target area of three-dimensional coordinates to be measured on the image and identifying contour points D of the target areaiLabeling, wherein i represents the number of the contour points, and i is 1,2,3 … … n;
the TOF distance meter control module is used for controlling the rotation angle of the TOF distance meter, enabling the TOF distance meter to emit visible laser to be aligned to the contour points of the target area, sequentially irradiating the contour points of the target area and acquiring the space coordinate corresponding to each contour point of the target area;
a judging module for judging the scanning number of the target area contour points to finish the scanning of all the target area contour points DiIrradiation of (2);
a three-dimensional coordinate acquisition module for acquiring the contour point D of the target areaiThe three-dimensional coordinates of the target area are obtained through calculation, and a target three-dimensional graph is drawn according to the three-dimensional coordinates.
Wherein the TOF rangefinder control module comprises:
the image acquisition control module is used for controlling the CCD camera to acquire images when the TOF range finder emits the contour points of the target area in sequence;
a reading module for reading the range finder reading L obtained by the TOF range finder aligning to the contour point of the target area in sequencei;
A space coordinate acquisition module for passing the rotation angle of the TOF range finder and the range finder reading LiObtaining the contour point D of the target areaiThe spatial coordinates of (a).
Wherein, the judging module comprises:
the number judgment module is used for judging whether i is larger than or equal to n;
a repeated starting module used for repeatedly starting the TOF range finder control module until all the target area contour points D when the number judgment module determines that i is less than niAll the steps are finished irradiating;
and the starting module is used for starting the three-dimensional coordinate acquisition module when the number judgment module determines that the result i is more than or equal to n.
The working principle of the technical scheme is as follows: firstly, controlling a CCD camera to acquire a planar image corresponding to a target by using a CCD camera control module; then, identifying a target area of three-dimensional coordinates to be measured on the image through an identification module, and carrying out contour point D on the target areaiLabeling is carried out; then, a TOF distance meter control module is adopted to control the rotation angle of the TOF distance meter, so that the TOF distance meter emits visible laser to be aligned to the contour points of the target area, the contour points of the target area are sequentially irradiated, and the space coordinates corresponding to each contour point of the target area are obtained; then, the scanning number of the contour points of the target area is judged by utilizing a judging module, and all the contour points D of the target area are finishediIrradiation of (2); finally, a three-dimensional coordinate acquisition module for acquiring the contour point D of the target areaiThe three-dimensional coordinates of the target area are obtained through calculation, and a target three-dimensional graph is drawn according to the three-dimensional coordinates.
The effect of the above technical scheme is as follows: and the automatic measurement of the spatial morphology size data of the measured target is realized by combining a TOF distance meter and a CCD camera. The three-dimensional target flight time measuring method based on machine vision guidance can effectively improve the three-dimensional size measuring accuracy of the measured target, simplify the space plane size measuring process, reduce the data processing amount in the measuring process and effectively improve the speed and efficiency of the three-dimensional shape and size measurement of the space target. Meanwhile, the TOF range finder and the CCD camera are combined to realize the rapid measurement and high-precision measurement of the three-dimensional space coordinate of the measured object in any shape.
The embodiment of the invention provides a three-dimensional target flight time measuring device based on machine vision guidance, and as shown in fig. 4, the measuring device comprises: the system comprises a computer 1, a bearing platform 2, a CCD camera 3 and a TOF range finder 4; the computer 1 is electrically connected with the bearing table 2, the CCD camera 3 and the TOF distance measuring instrument 4 respectively; the CCD camera 3 is arranged inside the bearing table 2; the TOF distance measuring instrument 4 is movably mounted on the bearing platform 2 in a rotatable mode.
A horizontal rotating shaft 21 which rotates in the horizontal direction is arranged on the upper surface of the bearing table 2, and a vertical rotating shaft 22 which rotates in the vertical direction is arranged on the horizontal rotating shaft 21; the TOF rangefinder 4 is fixedly mounted on the vertical axis of rotation 22.
The working principle of the technical scheme is as follows: the measuring device rotates through each rotation axis body on the computer control plummer, realizes the rotatory regulation on the TOF distancer horizontal direction through the rotation angle of adjusting horizontal rotation axis, realizes the rotatory regulation on the TOF distancer vertical direction through the rotation angle of adjusting vertical rotation axis. And the data obtained by the TOF distance meter and the CCD camera are sent to a computer by a data transmission method, and the computer calculates and obtains the three-dimensional data of the measured target by using the three-dimensional target flight time measuring method and the three-dimensional target flight time measuring system.
The effect of the above technical scheme is as follows: and the automatic measurement of the spatial plane size data of the measured target is realized by combining a TOF distance meter and a CCD camera. By combining the three-dimensional coordinate and size measurement accuracy of the measured target, the three-dimensional target flight time measurement method and the three-dimensional target flight time measurement system based on machine vision guidance can effectively improve the three-dimensional coordinate and size measurement accuracy of the measured target, simplify the space target size measurement process, reduce the data processing amount in the measurement process, and effectively improve the speed and efficiency of three-dimensional shape and size measurement of the space target. Meanwhile, the TOF range finder and the CCD camera are combined to realize the rapid measurement and high-precision measurement of the three-dimensional shape and the coordinates of the target with any shape to be measured.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.