Large-range monocular tracking scanning device
1. The wide-range monocular tracking scanning device is used for scanning and measuring the internal and external structures of a workpiece; the method is characterized in that: comprises a spherical scanner (1) and a monocular vision device (2);
the spherical scanner (1) is provided with a scanning head, a hollow frame body and a plurality of target balls, wherein the scanning head is positioned in the middle of the frame body, the end points of each side of the frame body are respectively provided with one target ball, and the target balls are provided with a plurality of mark points; the spherical scanner (1) can move relative to the workpiece and scan the inner and outer surface profiles of the workpiece which are not visible relative to the monocular vision device (2);
the monocular vision device (2) is placed towards the position where the workpiece is located, on one hand, the working part of the monocular vision device (2) acquires the outline of the visible surface of the workpiece, on the other hand, the monocular vision device (2) periodically searches and tracks the current position of the spherical scanner (1), so that the spherical scanner (1) is located in the visual field range of the monocular vision device (2), and can effectively capture the mark point on the target ball; the monocular vision device (2) also marks the current pose of the spherical scanner (1) in a global coordinate system established by the monocular vision device (2) according to the position and the posture change of the working part and the spherical scanner (1); and splicing the images acquired by the spherical scanner (1) and the monocular vision device (2) into a complete workpiece outline.
2. A wide range monocular tracking scanning device according to claim 1, characterized in that: the monocular vision device (2) comprises a base (21), a first scanning and tracking unit (22), a second scanning and tracking unit (23), a reference unit (24) and a processing unit; one end of the base (21) is fixedly arranged on the ground, and the other end of the base (21) extends vertically in the direction away from the ground; the first scanning and tracking unit (22) is arranged at one end of the base (21) far away from the ground, the first scanning and tracking unit (22) searches the spherical scanner (1) in the visual field range of the spherical scanner, and the current position of the spherical scanner (1) is kept unchanged when the spherical scanner appears in the visual field of the spherical scanner; the second scanning tracking unit (23) is arranged on the first scanning tracking unit (22), and the second scanning tracking unit (23) enables the spherical scanner (1) to be positioned at the center of the visual field of the spherical scanner and can clearly shoot the spherical scanner (1) and the mark points of the spherical scanner; the reference unit (24) is fixedly arranged at one end, far away from the ground, of the base (21), and obtains displacement or posture change of the first scanning tracking unit (22), the second scanning tracking unit (23) or the spherical scanner (1) relative to the reference unit (24), and the spherical scanner (1) and the reference unit (24) are in signal connection with the processing unit; and the processing unit splices the images acquired by the spherical scanner (1) and the first scanning tracking unit (22) or the second scanning tracking unit (23) according to the displacement or posture relation to finish the scanning measurement of the workpiece.
3. A wide range monocular tracking scanning device according to claim 2, wherein: the first scanning and tracking unit (22) comprises a hollow first base (221), a first movable part (222), a search camera (223) and a first motor (224); the first base (221) is fixedly arranged at one end, far away from the ground, of the base (21) and is arranged around the reference unit (24), the first movable part (222) is arranged at one end, far away from the ground, of the first base (221), and the first movable part (222) and the first base (221) are arranged in a rotatable mode; a searching camera (223) is fixedly arranged at one end, far away from the ground, of the first movable part (222), and the searching camera (223) searches the spherical scanner (1) in the visual field range of the spherical scanner; the first motor (224) is fixedly arranged on the base (21), and the output end of the first motor (224) drives the first movable part (222) and the searching camera (223) to horizontally rotate relative to the first base (221); after the search camera (223) searches the spherical scanner (1) in the visual field range thereof, the first motor (224) stops operating.
4. A wide range monocular tracking scanning device according to claim 3, characterized in that: the second scanning and tracking unit (23) includes a second movable part (231), a third movable part (232), a tracking camera (233), a second motor (234), and a third motor (235); the second movable part (231) and the second motor (234) are both arranged at one end of the first base (221) far away from the ground, and the second movable part (231) is rotatably connected with the first base (221); the second motor (234) is fixedly connected with the first base (221), and the output end of the second motor (234) drives the second movable part (231) to rotate in a pitching mode relative to the horizontal plane; the third movable part (232) is fixedly arranged on the second movable part (231), the third movable part (232) is provided with a tracking camera (233) and a third motor (235), the third motor (235) is fixedly connected with the third movable part (232), the tracking camera (233) is slidably connected with the second movable part (231) and the third movable part (232) respectively, the output end of the third motor (235) is connected with the tracking camera (233), and the tracking camera (233) is driven to extend out or retract along the axis direction of the output end of the third motor (235).
5. A wide range monocular tracking scanning device according to claim 4, wherein: the reference unit (24) further comprises a calibration plate (241) and a reference camera (242); the reference camera (242) is arranged on the base (21) and is vertically arranged outwards; the calibration plate (241) is fixedly arranged at one end, close to the ground, of the second movable part (231), blind holes which are arranged in an array mode are formed in the calibration plate (241), indicator lamps are correspondingly arranged in the blind holes, and light emitting parts of the indicator lamps face the ground; the indicator light on the calibration board (241) displays a polygonal or circular pattern by constantly lighting with the center of the projection point of the central axis of the tracking camera (233) on the calibration board (241) as the center, and the reference camera (242) acquires the image of the pattern formed by the indicator light.
6. A wide range monocular tracking scanning device according to claim 5, wherein: the monocular vision device (2) calibrates the current pose of the spherical scanner (1) in a global coordinate system established by the monocular vision device (2) according to the position and posture changes of the working part and the spherical scanner (1), and the method comprises the following steps: s100, enabling a search camera (223) to start working and capture the spherical scanner (1), and when the mark point on the spherical scanner (1) at the moment is obtained, solving the conversion relation between the coordinate system of the spherical scanner (1) at the moment and the coordinate system of the search camera (223); s200, a second motor (234) or a third motor (235) is driven to adjust the pitch angle or the focal length of a tracking camera (233), so that the spherical scanner (1) is located in the center of the visual field of the tracking camera (233), the tracking camera (233) can clearly track and shoot the spherical scanner (1), and the conversion relation between the coordinate system where the spherical scanner (1) is located and the coordinate system where the tracking camera (233) is located at the moment is further solved; s300, acquiring a conversion relation of a mark point corresponding to a corresponding luminous indicator lamp on the calibration board (241) in a coordinate system where the tracking camera (233) is located, and acquiring the conversion relation between the tracking camera (233) and the reference camera (242) according to an image of an indicator lamp pattern of the calibration board (241) acquired by the reference camera (242) at the current moment; s400, correcting the conversion relation between the coordinate system of the spherical scanner (1) and the coordinate system of the tracking camera (233) through the conversion relation between the coordinate system of the spherical scanner (1) and the coordinate system of the tracking camera (233) at the current moment, and using the corrected conversion relation for the spherical scanner (1) to be searched by the next searching camera (223) after the spherical scanner (1) changes the position, and repeating the steps until the spherical scanner (1) finishes the contour scanning of the inner surface and the outer surface of the workpiece.
7. A wide range monocular tracking scanning device according to claim 6, wherein: the conversion relation between the coordinate system of the spherical scanner (1) and the coordinate system of the search camera at the moment is solved by constructing the coordinate system based on the spherical scanner (1)The marking points on the target ball are arranged in the coordinate system of the spherical scanner (1)The coordinates inside are;The number of the mark points on the target ball is represented, and the above formula is the coordinate of each mark point in the coordinate system of the spherical scanner (1); obtaining and searching coordinate system of camera through pre-calibrationTo the coordinate system of the tracking cameraConversion relation ofAnd(ii) a When the searching camera is tracked to the spherical scanner (1) for the first time, the two-dimensional coordinates of the image coordinate system of the searching camera at the moment of the mark point of the spherical scanner (1) are acquired(ii) a WhereinIn order to search the quantity of the mark points on the target ball captured by the camera, the above formula is respectively a two-dimensional coordinate of the mark point in a searching camera image coordinate system; solving the scanner coordinate system at the moment through a two-dimensional coordinate point setTo search for the position of the cameraTransformation relation of object systemAnd;andin order to be a matrix of rotations,andis a translation matrix;
the solving of the conversion relation between the coordinate system of the spherical scanner (1) and the coordinate system of the tracking camera at the moment is performed through the conversion relation obtained in the previous step、、Andto find the coordinate system of the spherical scanner (1)And the coordinate system of the tracking cameraThe conversion relationship of (1):;;
the conversion relation between the tracking camera and the reference camera is obtained by pre-positioning each indicator light on the calibration plate in the coordinate system where the tracking camera is positionedCoordinates of,The number of the indicating lamps on the calibration plate is shown in the above formula, and the above formula is respectively the coordinate of the indicating lamp on the calibration plate under the coordinate system of the tracking camera; setting the coordinate system of the reference cameraObtaining two-dimensional coordinates of the indicator light on the calibration plate under the image coordinate system of the reference camera at the current moment by the reference camera,The number of the indicator lights which are lighted on the calibration plate is, and the upper columns are coordinates of the indicator lights which are lighted on the calibration plate in an image coordinate system where the reference camera is located; obtaining the conversion relation from the tracking camera to the reference camera by solving the two-dimensional coordinate point setAnd。
8. a wide range monocular tracking scanning device according to claim 7, wherein: the conversion relation between the coordinate system of the spherical scanner (1) and the coordinate system of the searching camera is corrected through the conversion relation between the coordinate system of the spherical scanner (1) and the coordinate system of the tracking camera at the current moment, and the two-dimensional coordinates of the mark points of the spherical scanner (1) in the image coordinate system of the tracking camera are obtained,The above formula is respectively two-dimensional coordinates of the mark points under a coordinate system of the tracking camera, wherein the number of the mark points on the target ball is captured by the tracking camera; substituting into the determinedAndaccording to the following relation:,obtained byAndi.e. the corrected search camera is seatedAnd the coordinate system of the target system and the coordinate system of the tracking camera.
Background
The position and the posture of an object are detected to have important application in the aspects of quality detection, measurement of the internal and external sizes of a workpiece and intelligent manufacturing, generally, monocular vision equipment is adopted to carry out non-contact measurement, compared with binocular vision measurement, the monocular vision measurement equipment is not easily limited by a view field range, the measurement range is wide, the measurement distance is long, and more applications are obtained. Usually, the relative position between the workpiece and the monocular vision device is fixed, and the internal contour or size of the workpiece cannot be visually detected due to the limitation of the visual angle.
3D spherical scanner need not fixed setting, and measurement performance is reliable, and small in size is convenient for stretch into the inside of large-scale work piece moreover and is carried out accurate scanning. If the two are organically combined and applied to the aspects of scanning and measuring the internal and external profiles of a large workpiece, the defect that the internal shape of the workpiece cannot be intuitively obtained when monocular vision equipment works alone can be overcome.
Disclosure of Invention
In view of this, the invention provides a large-scale monocular tracking scanning device which organically combines a spherical scanner and monocular vision equipment and accurately obtains the inner and outer surface images of a large-scale workpiece in a large-scale range.
The technical scheme of the invention is realized as follows: the invention provides a large-range monocular tracking scanning device which is used for scanning and measuring the internal and external structures of a workpiece; comprises a spherical scanner and a monocular vision device;
the spherical scanner is provided with a scanning head, a hollow frame body and a plurality of target balls, wherein the scanning head is positioned in the middle of the frame body, the end points of each side of the frame body are respectively provided with one target ball, and the target balls are provided with a plurality of mark points; the spherical scanner is movable relative to the workpiece and scans the inner and outer surface contours of the workpiece that are not visible relative to the monocular vision device;
the monocular vision device is placed towards the position where the workpiece is located, the working part of the monocular vision device acquires the outline of the visible surface of the workpiece on one hand, and on the other hand, the monocular vision device periodically searches and tracks the current position of the spherical scanner, so that the spherical scanner is located in the visual field range of the monocular vision device and can effectively capture the mark point on the target ball; the monocular vision device also marks the current pose of the spherical scanner in a global coordinate system established by the monocular vision device according to the position and the posture change of the working part and the spherical scanner; and splicing the images acquired by the spherical scanner and the monocular vision device into a complete workpiece outline.
On the basis of the above technical solution, preferably, the monocular vision device includes a base, a first scanning and tracking unit, a second scanning and tracking unit, a reference unit, and a processing unit; one end of the base is fixedly arranged on the ground, and the other end of the base extends vertically towards the direction far away from the ground; the first scanning and tracking unit is arranged at one end of the base, which is far away from the ground, searches the spherical scanner in the visual field range of the first scanning and tracking unit, and keeps the current position unchanged when the spherical scanner appears in the visual field of the spherical scanner; the second scanning and tracking unit is arranged on the first scanning and tracking unit, and the second scanning and tracking unit enables the spherical scanner to be positioned at the center of the visual field of the spherical scanner and can clearly shoot the spherical scanner and the mark points of the spherical scanner; the reference unit is fixedly arranged at one end of the base, which is far away from the ground, and acquires the displacement or posture change of the first scanning tracking unit, the second scanning tracking unit or the spherical scanner relative to the reference unit, and the spherical scanner and the reference unit are in signal connection with the processing unit; and the processing unit splices the images acquired by the spherical scanner and the first scanning tracking unit or the second scanning tracking unit according to the displacement or posture relation to finish the scanning measurement of the workpiece.
Preferably, the first scanning and tracking unit comprises a hollow first base, a first movable part, a search camera and a first motor; the first base is fixedly arranged at one end, far away from the ground, of the base and is arranged around the reference unit, the first movable part is arranged at one end, far away from the ground, of the first base, and the first movable part and the first base are arranged in a rotatable mode; a searching camera is fixedly arranged at one end of the first movable part, which is far away from the ground, and the searching camera searches the spherical scanner in the visual field range of the searching camera; the first motor is fixedly arranged on the base, and the output end of the first motor drives the first movable part and the search camera to horizontally rotate relative to the first base; after the search camera searches for the spherical scanner within its field of view, the first motor stops working.
Preferably, the second scanning and tracking unit includes a second movable part, a third movable part, a tracking camera, a second motor and a third motor; the second movable part and the second motor are both arranged at one end of the first base far away from the ground, and the second movable part is rotatably connected with the first base; the second motor is fixedly connected with the first base, and the output end of the second motor drives the second movable part to rotate in a pitching mode relative to the horizontal plane; the third movable part is fixedly arranged on the second movable part, the third movable part is provided with a tracking camera and a third motor, the third motor is fixedly connected with the third movable part, the tracking camera is respectively connected with the second movable part and the third movable part in a sliding manner, the output end of the third motor is connected with the tracking camera, and the tracking camera is driven to extend out or retract along the axis direction of the output end of the third motor.
Preferably, the reference unit further comprises a calibration plate and a reference camera; the reference camera is arranged on the base and is arranged vertically outwards; the calibration plate is fixedly arranged at one end, close to the ground, of the second movable part, blind holes are formed in the calibration plate in an array mode, indicator lamps are correspondingly arranged in the blind holes, and light emitting parts of the indicator lamps face the ground; the indicating lamp on the calibration board takes the projection point of the central shaft of the tracking camera on the calibration board as the center of a circle, a polygonal or circular pattern is displayed in a normally bright mode, and the reference camera acquires the image of the pattern formed by the indicating lamp.
Preferably, the monocular vision device, according to the position and posture change of the working part and the spherical scanner, calibrating the current posture of the spherical scanner in a global coordinate system established by the monocular vision device, includes the following steps: s100, enabling the searching camera to start working and capture the spherical scanner, and solving a conversion relation between a coordinate system where the spherical scanner is located and a coordinate system where the searching camera is located when the mark point on the spherical scanner at the moment is obtained; s200, driving a second motor or a third motor to adjust the pitch angle or the focal length of the tracking camera, enabling the spherical scanner to be located in the center of the field of view of the tracking camera, enabling the tracking camera to clearly track and shoot the spherical scanner, and further solving the conversion relation between the coordinate system where the spherical scanner is located and the coordinate system where the tracking camera is located at the moment; s300, acquiring a conversion relation of a mark point corresponding to a corresponding luminous indicator lamp on the calibration plate in a coordinate system where the tracking camera is located, and acquiring the conversion relation between the tracking camera and the reference camera according to an image of an indicator lamp pattern of the calibration plate acquired by the reference camera at the current moment; s400, correcting the conversion relation between the coordinate system of the spherical scanner and the coordinate system of the searching camera through the conversion relation between the coordinate system of the spherical scanner and the coordinate system of the tracking camera at the current moment, and enabling the spherical scanner to be used when the spherical scanner is searched by the searching camera at the next time after the position of the spherical scanner is changed, and repeating the steps until the spherical scanner completes the contour scanning of the inner surface and the outer surface of the workpiece.
Preferably, the step of solving the conversion relation between the coordinate system of the spherical scanner and the coordinate system of the search camera at the moment is to construct a coordinate system based on the spherical scanner (1)Making the mark point on the target ball in the coordinate system of the spherical scannerThe coordinates inside are;The number of the mark points on the target ball is represented, and the above formula is the coordinate of each mark point in the coordinate system of the spherical scanner; obtaining and searching coordinate system of camera through pre-calibrationTo the coordinate system of the tracking cameraConversion relation ofAnd(ii) a When the searching camera is firstly tracked to the spherical scanner, the two-dimensional coordinates of the image coordinate system of the searching camera at the moment of the mark point of the spherical scanner are obtained(ii) a WhereinIn order to search the quantity of the mark points on the target ball captured by the camera, the above formula is respectively a two-dimensional coordinate of the mark point in a searching camera image coordinate system; solving the scanner coordinate system at the moment through a two-dimensional coordinate point setConversion to coordinate system of search cameraAnd;andin order to be a matrix of rotations,andis a translation matrix;
the step of solving the conversion relation between the coordinate system of the spherical scanner and the coordinate system of the tracking camera at the moment is performed through the conversion relation obtained in the previous step、、Anddetermining the coordinate system of the spherical scannerAnd the coordinate system of the tracking cameraThe conversion relationship of (1):;;
the conversion relation between the tracking camera and the reference camera is obtained by pre-positioning each indicator light on the calibration plate in the coordinate system where the tracking camera is positionedCoordinates of,For indications on calibration platesThe number of the lamps is that the upper columns are coordinates of the indicating lamps on the calibration board in a coordinate system where the tracking camera is located; setting the coordinate system of the reference cameraObtaining two-dimensional coordinates of the indicator light on the calibration plate under the image coordinate system of the reference camera at the current moment by the reference camera,The number of the indicator lights which are lighted on the calibration plate is, and the upper columns are coordinates of the indicator lights which are lighted on the calibration plate in an image coordinate system where the reference camera is located; obtaining the conversion relation from the tracking camera to the reference camera by solving the two-dimensional coordinate point setAnd。
preferably, the correction of the conversion relationship between the coordinate system of the spherical scanner and the coordinate system of the search camera is performed by the conversion relationship between the coordinate system of the spherical scanner and the coordinate system of the tracking camera at the current moment, so as to obtain the two-dimensional coordinate of the mark point of the spherical scanner in the image coordinate system of the tracking camera,The above formula is respectively two-dimensional coordinates of the mark points under a coordinate system of the tracking camera, wherein the number of the mark points on the target ball is captured by the tracking camera; substituting into the determinedAndaccording to the following relation:,obtained byAndi.e. the modified conversion relationship between the coordinate system of the search camera and the coordinate system of the tracking camera.
Compared with the prior art, the large-range monocular tracking scanning device provided by the invention has the following beneficial effects:
(1) according to the invention, the spherical scanner and the monocular vision equipment are organically combined, and on the premise of keeping the positions of the workpiece and the monocular vision equipment unchanged, the spherical scanner is moved to the inner surface and the outer surface which cannot be visually observed by the monocular vision equipment, so that the defect that the monocular vision equipment is used independently is overcome, and the accuracy and the reliability of scanning measurement are improved;
(2) the first scanning and tracking unit can drive the searching camera to horizontally rotate, search of the spherical scanner in a large range is carried out, and the searching speed is improved;
(3) the second scanning and tracking unit can adjust the pitching angle and the focal length of the tracking camera, so that the spherical scanner is more clearly displayed in the center of the visual field of the tracking camera, and the center position of the tracking camera can be visually limited on the calibration board through a specific pattern, so that the reference camera can conveniently acquire the current pose of the tracking camera;
(4) the tracking camera has the characteristics of long focal length, short depth of field and small visual field range, the searching camera has the characteristics of short focal length, long depth of field and large visual field range, the two are combined to quickly search the spherical scanner in a large range, and the tracking camera is used for aligning the position of the spherical scanner, so that the calibration relation between the spherical scanner and monocular vision equipment can be conveniently and quickly established;
(5) through calibration and correction among coordinate systems, the scanning detection of the whole workpiece is more accurate, and the robustness is good.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a perspective view of a large-area monocular tracking scanning device of the present invention;
FIG. 2 is a front view of a monocular vision device of a large-scale monocular tracking scanning device of the present invention;
FIG. 3 is a front view, in half section, of a monocular vision device of a large-scale monocular tracking scanning device of the present invention;
FIG. 4 is an exploded perspective view of a monocular vision device of a large-scale monocular tracking scanning device of the present invention;
FIG. 5 is a schematic diagram of a calibration board of a large-scale monocular tracking scanning device according to the present invention;
fig. 6 is a perspective view of a spherical scanner of a large-area monocular tracking scanning device of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to 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 any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
As shown in fig. 1 in conjunction with fig. 6, a large-scale monocular tracking and scanning device for scanning and measuring the internal and external structures of a workpiece is shown; the device comprises a spherical scanner 1 and a monocular vision device 2;
the spherical scanner 1 is provided with a scanning head, a hollow frame body and a plurality of target balls, wherein the scanning head is positioned in the middle of the frame body, the end points of each side of the frame body are respectively provided with one target ball, and the target balls are provided with a plurality of mark points; the spherical scanner 1 can move relative to the workpiece, change the placing position of the workpiece, better perform local contour scanning and obtain the invisible inner and outer surface contours of the workpiece relative to the monocular vision device 2; the frame body of the spherical scanner 1 is of a polyhedral structure, the end point position of the side line of each polyhedron is provided with a target ball, the target balls can be of a polyhedral structure, different surfaces of the target balls are respectively provided with a light-reflecting mark point convenient for observation, and the mark points are circular or annular in the scheme.
The monocular vision device 2 is placed towards the position where the workpiece is located, on one hand, the working part of the monocular vision device 2 acquires the outline of the visible surface of the workpiece, on the other hand, the monocular vision device 2 periodically searches and tracks the current position of the spherical scanner 1, so that the spherical scanner 1 is located in the visual field range of the monocular vision device 2, and can effectively capture the mark point on the target ball; the monocular vision device 2 also marks the current pose of the spherical scanner 1 in a global coordinate system established by the monocular vision device 2 according to the position and posture changes of the working part and the spherical scanner 1; and splicing the images acquired by the spherical scanner 1 and the monocular vision device 2 into a complete workpiece outline. The monocular vision device 2 does not move relative to the workpiece in the using process, only the camera carried by the monocular vision device carries out posture and position adjustment so as to better search and align the spherical scanner 1, and after all the workpieces are scanned relative to the invisible inner and outer surface profiles of the monocular vision device 2, the spherical scanner 1 is combined with the acquired outer profiles of the monocular vision device 2 to jointly splice to form a complete image of the workpieces, so that scanning measurement is completed.
As shown in fig. 2-4, the monocular vision device 2 includes a base 21, a first scan tracking unit 22, a second scan tracking unit 23, a reference unit 24, and a processing unit; one end of the base 21 is fixedly arranged on the ground, and the other end of the base 21 extends vertically towards the direction far away from the ground; the first scanning and tracking unit 22 is arranged at one end of the base 21 far away from the ground, the first scanning and tracking unit 22 searches the spherical scanner 1 in the visual field range thereof, and the current position is kept unchanged when the spherical scanner 1 appears in the visual field thereof; the second scanning and tracking unit 23 is arranged on the first scanning and tracking unit 22, and the second scanning and tracking unit 23 enables the spherical scanner 1 to be positioned at the center of the visual field of the spherical scanner 1 and can clearly shoot the spherical scanner 1 and the mark points of the spherical scanner 1; the reference unit 24 is fixedly arranged at one end of the base 21 far away from the ground, and acquires displacement or posture change of the first scanning and tracking unit 22, the second scanning and tracking unit 23 or the spherical scanner 1 relative to the reference unit 24, and the spherical scanner 1 and the reference unit 24 are in signal connection with the processing unit; and the processing unit splices the images acquired by the spherical scanner 1 and the first scanning tracking unit 22 or the second scanning tracking unit 23 according to the displacement or posture relation to finish the scanning measurement of the workpiece. The first scanning and tracking unit 22 carries out fast search in the visual field range so as to search the spherical scanner 1 at the first time; after the first scanning and tracking unit detects the spherical scanner 1, the second scanning and tracking unit 23 further adjusts the position of the spherical scanner 1 in the image coordinate system thereof, so as to facilitate the reflection mark points at different positions on a plurality of different target balls.
As can be seen in fig. 3, the illustration provides a specific structure of the first scan tracking unit 22. The first scan tracking unit 22 includes a hollow first base 221, a first movable part 222, a search camera 223, and a first motor 224; the first base 221 is fixedly arranged at one end of the base 21 far away from the ground and is arranged around the reference unit 24, the first movable part 222 is arranged at one end of the first base 221 far away from the ground, and the first movable part 222 and the first base 221 are rotatably arranged; a searching camera 223 is fixedly arranged at one end of the first movable part 222, which is far away from the ground, and the searching camera 223 searches the spherical scanner 1 in the visual field range; a first motor 224 is fixedly arranged on the base 21, and an output end of the first motor 224 drives the first movable part 222 and the search camera 223 to horizontally rotate relative to the first base 221; after the search camera searches for the spherical scanner 1 within its field of view, the first motor stops working until the position of the spherical scanner 1 is changed, and the search camera 223 searches for it again.
As also shown in FIG. 3, a specific configuration of the second scan tracking unit 23 is provided. The second scan tracking unit 23 includes a second movable part 231, a third movable part 232, a tracking camera 233, a second motor 234, and a third motor 235; the second movable part 231 and the second motor 234 are both arranged at one end of the first base 221 away from the ground, and the second movable part 231 is rotatably connected with the first base 221; the second motor 234 is fixedly connected with the first base 221, and an output end of the second motor 234 drives the second movable portion 231 to rotate in a pitching manner relative to the horizontal plane; the third movable portion 232 is fixedly arranged on the second movable portion 231, the third movable portion 232 is provided with a tracking camera 233 and a third motor 235, the third motor 235 is fixedly connected with the third movable portion 232, the tracking camera 233 is slidably connected with the second movable portion 231 and the third movable portion 232 respectively, and an output end of the third motor 235 is connected with the tracking camera 233 and drives the tracking camera 233 to extend out or retract along an axis direction of an output end of the third motor 235. The second motor 234 can adjust the pitch angle of the tracking camera 233, and the third motor 235 can adjust the focal length of the tracking camera 233, so as to achieve the purpose of accurate adjustment, and better enable the spherical scanner 1 to be located in the center of the field of view of the tracking camera 233, and clearly acquire enough mark points and positions thereof.
The reference unit 24 further includes a calibration board 241 and a reference camera 242; the reference camera 242 is disposed on the base 21, and is disposed vertically outward; the calibration plate 241 is fixedly arranged at one end, close to the ground, of the second movable part 231, blind holes are formed in the calibration plate 241 in an array mode, indicator lamps are correspondingly arranged in the blind holes, and light emitting parts of the indicator lamps face the ground; the indicator light on the calibration board displays polygonal or circular patterns by using the projection point of the central axis of the tracking camera on the calibration board as the center of a circle, and the reference camera 242 acquires the image of the pattern formed by the indicator light. The position of the reference camera 242 is always unchanged, and the calibration plate 241 is pitched along with the second movable portion 231. The indicator light is arranged in the blind hole; through the luminous polygonal or circular pattern corresponding to the projection area on the calibration board 241, the center of the luminous area can be conveniently obtained by the conversion of the reference camera 242 in the image coordinate system, and the tracking camera 233 is located in the normal direction of the center of the luminous area far away from the ground, so that the pose relationship between the reference camera and the tracking camera can be conveniently and rapidly obtained subsequently. Every time the position of the spherical scanner 1 is changed, the reference camera acquires the pattern of the light emitting area corresponding to the indicator light again, and the above steps are repeated.
The monocular vision device 2, according to the position and attitude changes of its working part and the spherical scanner 1, calibrates the current attitude of the spherical scanner 1 in the global coordinate system established with the monocular vision device 2, and includes the following steps: s100, enabling the searching camera to start working and capture the spherical scanner 1, and when the mark point on the spherical scanner 1 at the moment is obtained, solving the conversion relation between the coordinate system of the spherical scanner 1 at the moment and the coordinate system of the searching camera; s200, driving a second motor or a third motor to adjust the pitch angle or the focal length of the tracking camera, enabling the spherical scanner 1 to be located in the center of the field of view of the tracking camera, enabling the tracking camera to clearly track and shoot the spherical scanner 1, and further solving the conversion relation between the coordinate system where the spherical scanner 1 is located and the coordinate system where the tracking camera is located at the moment; s300, acquiring a conversion relation of a mark point corresponding to a corresponding luminous indicator lamp on the calibration plate in a coordinate system where the tracking camera is located, and acquiring the conversion relation between the tracking camera and the reference camera according to an image of an indicator lamp pattern of the calibration plate acquired by the reference camera at the current moment; s400, correcting the conversion relation between the coordinate system of the spherical scanner 1 and the coordinate system of the searching camera through the conversion relation between the coordinate system of the spherical scanner 1 and the coordinate system of the tracking camera at the current moment, and enabling the spherical scanner 1 to be used when the spherical scanner 1 is searched by the searching camera at the next time after the spherical scanner 1 is changed in position, and repeating the steps until the spherical scanner 1 finishes the contour scanning of the inner surface and the outer surface of the workpiece.
In the above steps, the conversion relation between the coordinate system of the spherical scanner 1 and the coordinate system of the search camera at the moment is solved, and the specific scheme is to construct the coordinate system based on the spherical scanner 1The marking points on the target ball are in the coordinate system of the spherical scanner 1The coordinates inside are;The number of the mark points on the target ball is represented, and the above formula is the coordinate of each mark point in the coordinate system of the spherical scanner 1; obtaining and searching coordinate system of camera through pre-calibrationTo the coordinate system of the tracking cameraConversion relation ofAnd(ii) a When the searching camera is firstly tracked to the spherical scanner 1, the two-dimensional coordinates of the image coordinate system of the searching camera at the moment of the mark point of the spherical scanner 1 are obtained(ii) a WhereinIn order to search the quantity of the mark points on the target ball captured by the camera, the above formula is respectively a two-dimensional coordinate of the mark point in a searching camera image coordinate system; solving the scanner coordinate system at the moment through a two-dimensional coordinate point setTo the coordinate system of the searching cameraConversion relation ofAnd;andin order to be a matrix of rotations,andis a translation matrix;
the solving of the conversion relationship between the coordinate system of the spherical scanner 1 and the coordinate system of the tracking camera at the moment is performed through the conversion relationship obtained in the previous step、、Anddetermining the coordinate system of the spherical scanner 1And the coordinate system of the tracking cameraThe conversion relationship of (1):;;
in the above scheme, the conversion relationship between the tracking camera and the reference camera is obtained by pre-positioning each indicator light on the calibration plate in the coordinate system where the tracking camera is locatedCoordinates of,The number of the indicating lamps on the calibration plate is shown in the above formula, and the above formula is respectively the coordinate of the indicating lamp on the calibration plate under the coordinate system of the tracking camera; setting the coordinate system of the reference cameraObtaining two-dimensional coordinates of the indicator light on the calibration plate under the image coordinate system of the reference camera at the current moment by the reference camera,The number of the indicator lights which are lighted on the calibration plate is, and the upper columns are coordinates of the indicator lights which are lighted on the calibration plate in an image coordinate system where the reference camera is located; obtaining the conversion relation from the tracking camera to the reference camera by solving the two-dimensional coordinate point setAnd。
correcting the conversion relation between the coordinate system of the spherical scanner 1 and the coordinate system of the searching camera through the conversion relation between the coordinate system of the spherical scanner 1 and the coordinate system of the tracking camera at the current moment, and acquiring the two-dimensional coordinates of the mark points of the spherical scanner 1 in the image coordinate system of the tracking camera,The above formula is respectively two-dimensional coordinates of the mark points under a coordinate system of the tracking camera, wherein the number of the mark points on the target ball is captured by the tracking camera; substituting into the determinedAndaccording to the following relation:,obtained byAndi.e. the modified conversion relationship between the coordinate system of the search camera and the coordinate system of the tracking camera.
Solving by a two-dimensional coordinate point set is a routine technical means for those skilled in the art, and will not be described herein.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.