Method for acquiring inner cavity shape of tubular component based on visual positioning and scanning device thereof
By scanning with a wheeled cart with laser scanning radar and visual positioning system inside the tubular member, the problem of accurate positioning and high-precision splicing of three-dimensional measurement of the inner cavity of the tubular member is solved, and efficient and accurate shape acquisition is achieved.
Patent Information
- Application Number
- CN202210946463.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-08
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2042-08-08
AI Technical Summary
The prior art is difficult to efficiently measure the inner cavity of tubular members, especially with challenges in precise positioning and high-precision splicing.
A wheeled car equipped with laser scanning radar and visual positioning system is used to scan the inside of the tubular member, and the shape of the inner cavity of the tubular member is calculated through similar principles and matrix transformation.
It improves the efficiency and accuracy of the shape acquisition of the cavity of tubular members, can effectively solve the measurement problems in small spaces, and provides a highly efficient shape information acquisition solution.
Smart Images

Figure CN115388803B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of three-dimensional measurement, and specifically relates to a method for acquiring the inner cavity shape of a tubular component based on visual positioning and a scanning device thereof. Background Art
[0002] With the development of science and technology and industry, the application of three-dimensional measurement technology in automated production, quality control, robot vision, reverse engineering, CAD / CAM and biomedical engineering is becoming increasingly important. Three-dimensional measurement technology is a technology for obtaining the spatial coordinates of each point on the surface of an object, which mainly includes two categories: contact and non-contact measurement. Contact measurement is limited by the measurement principle. Although it has high accuracy, it is slow, and due to the large overall size, it cannot measure the inner cavity of tubular components with small space. Non-contact measurement based on optical principles has the characteristics of high efficiency, non-destructiveness, and large working distance, and can measure objects statically or dynamically. This type of technology is used in product quality inspection and process control, which can greatly save production costs, shorten product development cycles, and greatly improve product quality, and is therefore very popular.
[0003] The main difficulty in the 3D measurement of the inner cavity of tubular components is how to accurately locate each measurement position and achieve high-precision splicing of the measurement point cloud. One of the traditional positioning methods is to identify and locate by affixing circular markers, but because the markers need to be evenly affixed on the surface to be measured, the marker point affixing process is too complicated for large tubular components; another method is to extract the features of the measurement surface and then match and splice the extracted features, but this method will have a relatively low splicing accuracy for components with unclear texture information. Summary of the invention
[0004] In order to overcome the shortcomings of the prior art, the present invention uses a wheeled cart equipped with a laser scanning radar and a visual positioning system to scan the inside of a tubular component, and uses similarity principles and matrix transformation to complete the calculation of the inner cavity shape of the tubular component, thereby providing a high-efficiency solution for obtaining the internal shape information of the tubular component and improving the efficiency and accuracy of scanning and obtaining the inner cavity shape of the tubular component.
[0005] To achieve the above purpose, the solution adopted by the present invention is:
[0006] A method for acquiring the inner cavity shape of a tubular component based on visual positioning comprises the following steps:
[0007] The method is implemented with the aid of a scanning device, which includes a visual positioning system, a laser scanning radar, a wheeled mobile vehicle, and a three-ball target;
[0008] Step 1: Use the visual positioning system to obtain the center coordinates of each of the three target balls. The specific steps are as follows:
[0009] The three-ball target installed on the top of the inner wall of the tubular component is photographed by the camera of the visual positioning system to obtain the coordinates of the three target balls in the two-dimensional image. The image processing software is used for identification. The center coordinates of each target ball are obtained as follows:
[0010] P c =[u,v] T
[0011] Where: P c represents the center coordinate of the target ball; u represents the center horizontal coordinate of the target ball; v represents the center vertical coordinate of the target ball; T represents the transpose of the matrix;
[0012] Step 2: Position the visual positioning system to obtain the position and posture of the visual positioning system, which specifically includes the following sub-steps;
[0013] Step 21: Establish the relationship between the coordinates of the target sphere center in the camera coordinate system and the coordinates of the imaging point of the sphere center on the camera imaging plane;
[0014] The coordinates P of the target sphere center in the camera coordinate system and the coordinates P of the imaging point of the target sphere center on the camera imaging plane are known. d ; According to the triangle similarity principle, the following relationship can be obtained:
[0015]
[0016] Where: f represents the distance from the imaging plane to the optical center, which is the focal length; X, Y and Z represent the horizontal coordinate, vertical coordinate and vertical coordinate of the target sphere center in the camera coordinate system respectively; X d Y represents the horizontal coordinate of the target sphere center imaging point on the camera imaging plane; d Indicates the ordinate of the target sphere center imaging point on the camera imaging plane;
[0017] Step 22: Determine the mapping relationship between the coordinates of the target sphere center in the camera coordinate system and the coordinates of the target sphere center in the pixel coordinate system;
[0018] According to the coordinate P of the target sphere center on the camera imaging plane d and the coordinates P in the pixel coordinate system c Determine the coordinates P of the target sphere center in the camera coordinate system and the coordinates P of the target sphere center in the pixel coordinate system c The mapping relationship is as shown below:
[0019]
[0020] Where: K represents the intrinsic parameter matrix of the camera; c x and c yIndicates the distance that the pixel origin is translated along the u and v axes; f x and f y Represents the coefficient of scaling the pixel coordinates along the u-axis and v-axis; P represents the coordinates of the target sphere center in the camera coordinate system;
[0021] Step 23: Determine the coordinates P of the target sphere center in the camera coordinate system and the coordinates P of the target sphere center in the world coordinate system W The mapping relationship of
[0022] The coordinates of the target sphere center in the camera coordinate system are P and the coordinates of the target sphere center in the world coordinate system are P W The method for obtaining the mapping relationship is as follows:
[0023] P=RP W +t
[0024] Where: R represents the rotation matrix of the world coordinate system relative to the camera coordinate system; t represents the displacement vector of the world coordinate system relative to the camera coordinate system; P W Represents the coordinates of the target sphere center in the world coordinate system;
[0025] Step 24: Determine the position and posture of the visual positioning system;
[0026] Combining the calculation results of step 22 and step 23, the coordinate P of the center of the target ball in the pixel coordinate system is c and the coordinates P of the target sphere center in the world coordinate system W The method for obtaining the mapping relationship is as follows:
[0027]
[0028] Where: X W Indicates the horizontal coordinate of the target sphere center in the world coordinate system; Y W Indicates the vertical coordinate of the target sphere center in the world coordinate system; Z W represents the vertical coordinate of the target sphere center in the world coordinate system; t1, t2 and t3 represent the displacement components of the world coordinate system relative to the camera coordinate system in the X, Y and Z directions respectively; r ij (i=1,...,3,j=1,...3) represents the 9 elements of the rotation matrix R;
[0029] The origin of the world coordinate system is set at the geometric center of the triangle formed by the centers of the three target balls. The coordinates P of the three target ball centers on the three-ball target in the world coordinates are known. W , the coordinates P of the three target sphere centers in the pixel coordinate system cAfter image processing, by substituting the known conditions into the above formula, we can solve the rotation matrix R of the world coordinate system relative to the camera coordinate system and the displacement vector t of the world coordinate system relative to the camera coordinate system, and we can get the position and posture of the visual positioning system;
[0030] Step 3: Position the mobile car and laser scanning radar;
[0031] According to the position and posture of the visual positioning system and the rotation angle of the laser scanning radar, the transformation matrix of the mobile car coordinate system relative to the camera coordinate system can be obtained. The coordinates of the origin of the mobile car coordinate system in the camera coordinate system and the coordinates of the origin of the laser scanning radar coordinate system in the mobile car coordinate system is a known condition determined during installation; therefore, according to the rotation matrix R of the world coordinate system relative to the camera coordinate system and the displacement vector t of the world coordinate system relative to the camera coordinate system calculated in step 24; the coordinates of the origin of the mobile vehicle coordinate system and the origin of the laser scanning radar coordinate system in the world coordinate system can be obtained and
[0032] Step 4: perform point cloud stitching based on the rotation angle of the laser radar at each moment and the coordinates of the laser scanning radar, complete the entire scan of the inner surface of the tubular component, and obtain the inner shape of the tubular component;
[0033] When each point in the shape data obtained by the laser radar is expressed in the world coordinate system, the inner shape of the tubular component is obtained as shown in the following formula:
[0034]
[0035] Where: P World Represents the coordinates of a three-dimensional point in the world coordinate system; Represents the transformation matrix of the mobile car coordinate system relative to the first three-ball target coordinate system; It represents the coordinates of the point obtained by the laser scanning radar in the coordinate system of the mobile car when positioning with the help of the first three-ball target; Represents the transformation matrix of the second three-ball target coordinate system relative to the first three-ball target coordinate system; Represents the transformation matrix of the mobile car coordinate system relative to the second three-ball target coordinate system; Indicates the coordinates of the point in the vehicle coordinate system obtained by the laser scanning radar when positioning with the help of the second three-ball target; represents the transformation matrix of the i-th three-ball target coordinate system relative to the i-1-th three-ball target coordinate system; Represents the transformation matrix of the mobile car coordinate system relative to the i three-ball target coordinate systems; It represents the coordinates of the point in the vehicle coordinate system obtained by the laser scanning radar when positioning with the help of the i-th three-ball target; i represents the sequence number of the three-ball target; N represents the total number of three-ball targets.
[0036] Preferably, the coordinate P of the target sphere center in the camera coordinate system and the coordinate P of the imaging point of the target sphere center on the camera imaging plane in step 21 are d The details are as follows:
[0037] The coordinates of the target sphere center in the camera coordinate system are as follows:
[0038] P = [X, Y, Z] T
[0039] Where: P represents the coordinate of the target sphere center in the camera coordinate system;
[0040] The coordinates of the target sphere center imaging point on the camera imaging plane are:
[0041] P d =[X d ,Y d ,Z d ] T
[0042] Where: P d Represents the coordinates of the imaging point of the target sphere center on the camera imaging plane; Z d Represents the distance between the imaging plane and the optical center of the camera.
[0043] Preferably, the coordinate P of the center of the target ball on the imaging plane in step 22 is d and the coordinates P of the target sphere center on the pixel plane c The relationship is as follows:
[0044] The coordinates P of the target sphere center on the pixel plane c , the origin O" of the pixel coordinate system is located in the upper left corner of the image, the u axis is parallel to the x axis of the imaging plane coordinate system to the right, and the v axis is parallel to the y axis of the imaging plane coordinate system downward; there is a scaling and translation transformation relationship between the pixel coordinate system and the imaging plane coordinate system. The pixel coordinate system is scaled by α times on the u axis and β times on the v axis. The distance of the pixel origin translation is [c x ,c y ] T Therefore, the coordinates of the target sphere center on the imaging plane are d and the coordinates P of the target sphere center on the pixel plane c The mapping relationship is shown as follows:
[0045]
[0046] Where: α represents the multiple of the pixel coordinate scaling on the u-axis; β represents the multiple of the pixel scaling on the v-axis; c x and c y Indicates the distance that the pixel origin is translated along the u and v axes;
[0047] Convert the above formula into the following calculation relationship:
[0048]
[0049] Where: f x Indicates the coefficient of scaling the pixel coordinate system along the u axis, specifically f x =αf; f y Indicates the coefficient of scaling the pixel coordinate system along the v axis, specifically f y =βf.
[0050] Preferably, the coordinates P of the center of the target ball in step 23 in the world coordinate system are W As shown below:
[0051] P W =(X W Y W Z W )
[0052] Where: P W Indicates the coordinates of the target sphere center in the world coordinate system; X W Indicates the horizontal coordinate of the target sphere center in the world coordinate system; Y W Indicates the vertical coordinate of the target sphere center in the world coordinate system; Z W Represents the coordinate of the target sphere's center in the direction of the normal vector of the plane where the horizontal and vertical axes are located in the world coordinate system.
[0053] Preferably, the rotation matrix R of the camera coordinate system relative to the world coordinate system in step 23 is specifically as follows; the method for obtaining the rotation matrix R of the camera coordinate system relative to the world coordinate system is as follows:
[0054]
[0055] Where: r ij (i=1,...,3,j=1,...3) represents the 9 elements of the rotation matrix R.
[0056] Preferably, the method for obtaining the coordinates of the mobile car origin and the laser scanning radar origin relative to the world coordinate system in step 3 is as follows:
[0057] The method for obtaining the transformation matrix of the world coordinate system relative to the camera coordinate system is as follows:
[0058]
[0059] Where: Represents the transformation matrix of the world coordinate system relative to the camera coordinate system;
[0060] The method for obtaining the transformation matrix of the camera coordinate system relative to the world coordinate system is as follows:
[0061]
[0062] Where: Represents the transformation matrix of the camera coordinate system relative to the world coordinate system;
[0063] The method for obtaining the coordinates of the origin of the mobile car coordinate system in the world coordinate system is as follows:
[0064]
[0065] Where: Represents the coordinates of the origin of the mobile car's coordinate system in the world coordinate system; Represents the coordinates of the origin of the mobile car coordinate system in the camera coordinate system;
[0066] The method for obtaining the coordinates of the origin of the laser scanning radar coordinate system in the world coordinate system is as follows:
[0067]
[0068] Where: Represents the coordinates of the origin of the laser scanning radar coordinate system in the world coordinate system; Represents the transformation matrix of the mobile car coordinate system relative to the camera coordinate system; Represents the coordinates of the origin of the laser scanning radar coordinate system in the vehicle coordinate system.
[0069] The second aspect of the present invention provides a scanning device capable of implementing the above-mentioned method for acquiring the inner cavity shape of a tubular component based on visual positioning, the device comprising a visual positioning system, a laser scanning radar, a wheeled mobile trolley, and a three-ball target;
[0070] The visual positioning system includes a camera, a first electric turntable, a second electric turntable, a first mounting frame, and a second mounting frame. The first electric turntable is fixedly connected to the first end of the first mounting frame, the second end of the first mounting frame is connected to the first end of the second mounting frame by a rotating pair, and is fixedly connected to the first end of the second electric turntable. The first end of the second mounting frame penetrates the first mounting frame and is fixedly connected to the second end of the second electric turntable. The second end of the second mounting frame is fixedly connected to the camera; the laser scanning radar includes a laser scanning radar rotating platform and a radar chassis. The laser scanning radar rotating platform is connected to the radar chassis by a rotating pair, and an infrared laser transmitter is arranged in the laser scanning radar rotating platform; the three-ball target includes three target balls of different colors, three support rods and a target base plate. The first end of the support rod is fixedly connected to the target ball, and the second end of the support rod is fixedly connected to the target base plate. The support rods are distributed in a regular triangle.
[0071] The laser scanning radar and the visual positioning system are both arranged on the body of the wheeled mobile vehicle;
[0072] The wheeled mobile vehicle comprises wheels, a vehicle body and a protective shell;
[0073] The three-ball targets are arranged in a linear shape on the top of the inner wall of the tubular component to be tested. The three-ball targets are used to assist the visual system in positioning the wheeled mobile trolley. The three-ball targets have three target balls of different colors, so as to provide sufficient parameters for positioning calculation; the visual positioning system is installed at the tail of the wheeled mobile trolley. The visual positioning system is used to shoot the three-ball targets installed in the component to be tested and then realize the positioning of the wheeled mobile trolley. The visual positioning system has two rotational degrees of freedom, rotation and pitch, and the three-ball targets are placed within the shooting range by changing its own posture; the laser scanning radar is installed at the head of the wheeled mobile trolley, and its function is to scan the component to be tested to obtain shape data; the wheeled mobile trolley is driven by a motor and remotely controlled, and its function is to carry the visual positioning system and the laser scanning radar to move in the component to be tested;
[0074] The three-ball targets are linearly installed on the top of the inner wall of the tubular component to be tested.
[0075] Preferably, a camera positioning system mounting frame, a laser scanning radar mounting frame, four DC reduction motors, a lithium battery and a controller are installed on the body of the wheeled mobile vehicle.
[0076] Compared with the prior art, the present invention has the following beneficial effects:
[0077] (1) The present invention provides a method for scanning the inner cavity shape of a tubular component. The method uses a wheeled vehicle equipped with a laser scanning radar and a visual positioning system to scan the inside of the tubular component to obtain point cloud coordinate data, and further completes the calculation method of the inner cavity shape of the tubular component through similarity principle and matrix transformation.
[0078] (2) The scanning device used in the present invention can enter the interior of a narrow tubular component without causing damage to the tubular component to be measured, thereby providing a highly efficient solution for obtaining the internal shape information of the tubular component.
[0079] (3) The scanning device provided by the present invention has a wheeled mobile chassis, so that the scanning device can move in the inner cavity of the component to adapt to the scanning work of the inner cavity of the component with different lengths. The component inner cavity scanning solution provided by the present invention automatically positions the scanning device with the help of a visual system and a three-ball target, and can obtain the position information of the scanning device in real time. It has a fast calculation speed, a high degree of automation, and is simple to operate, which can save a lot of manpower, material resources and time costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 A flowchart of a method for acquiring the inner cavity shape of a tubular component based on visual positioning according to an embodiment of the present invention;
[0081] Figure 2 It is a schematic diagram of the overall structure of an embodiment of the present invention;
[0082] Figure 3 This is a schematic diagram of the external structure of the wheeled mobile vehicle according to an embodiment of the present invention;
[0083] Figure 4 This is an axonometric view of the wheeled mobile vehicle according to an embodiment of the present invention with the outer shell removed;
[0084] Figure 5 This is a front view of the wheeled mobile vehicle according to the embodiment of the present invention after the outer shell is removed;
[0085] Figure 6 This is a rear view of the wheeled mobile vehicle according to an embodiment of the present invention after the outer shell is removed;
[0086] Figure 7 is a schematic diagram of the structure of a visual positioning system according to an embodiment of the present invention;
[0087] Figure 8 A schematic diagram of the structure of a laser scanning radar according to an embodiment of the present invention;
[0088] Fig. 9 It is a schematic structural diagram of a three-ball target according to an embodiment of the present invention;
[0089] Fig.10This is a schematic diagram of the wheeled mobile vehicle according to an embodiment of the present invention positioning the first three-ball target;
[0090] Fig.11 It is a schematic diagram of the wheeled mobile vehicle according to an embodiment of the present invention switching between different three-ball targets for positioning.
[0091] Reference numerals:
[0092] 1- visual positioning system; 2- wheeled mobile car; 3- laser scanning radar; 4- three-ball target; 5- body shell; 6- bottom shell; 7- head shell; 8- top shell; 9- PTZ mounting frame; 10- body; 11- radar mounting frame; 12- battery fixing plate; 13- lithium battery; 14- third rubber wheel; 15- third DC reduction motor; 16- controller; 17- fourth DC reduction motor; 18- fourth rubber wheel; 19- first rubber wheel; 20- first DC reduction motor machine; 21-second DC reduction motor; 22-second rubber wheel; 23-camera; 24-second mounting bracket; 25-laser sight; 26-second electric turntable; 27-first electric turntable; 28-first mounting bracket; 29-laser scanning radar rotating table; 30-laser scanning radar base; 31-red target ball; 32-first support rod; 33-blue target ball; 34-second support rod; 35-target base; 36-third support rod; 37-yellow target ball; 38-tubular member to be measured. DETAILED DESCRIPTION
[0093] The embodiments of the present invention are described below with reference to the accompanying drawings. The present invention uses a wheeled vehicle equipped with a laser scanning radar and a visual positioning system to scan inside a tubular component to obtain the coordinate data of the inner cavity of the tubular component, and uses the similarity principle and matrix transformation to complete the calculation of the inner cavity shape of the tubular component, thereby providing a high-efficiency solution for obtaining the internal shape information of the tubular component and improving the calculation accuracy of the inner cavity of the tubular component. The embodiment of the present invention provides a method for obtaining the inner cavity shape of a tubular component based on visual positioning, such as Figure 1 The figure shows a flowchart of the steps of the method. In order to prove the applicability of the method, it is applied to an example, which specifically includes the following steps:
[0094] The method is implemented with the aid of a scanning device, which includes a visual positioning system 1, a laser scanning radar 3, a wheeled mobile vehicle 2, and a three-ball target 4;
[0095] S1: Use the visual positioning system 1 to obtain the center coordinates of each target ball of the three-ball target 4, as follows:
[0096] The three-ball target 4 installed on the top of the inner wall of the tubular member is photographed by the camera of the visual positioning system 1 to obtain the coordinates of the three target balls in the two-dimensional image. The coordinates of the center of the target balls in the pixel coordinate system are obtained by using image processing software for identification as follows:
[0097] P c =[u,v] T
[0098] Where: P c represents the center coordinate of the target ball; u represents the center horizontal coordinate of the target ball; v represents the center vertical coordinate of the target ball; T represents the transpose of the matrix;
[0099] S2: Positioning the visual positioning system 1 to obtain the position and posture of the visual positioning system 1, which specifically includes the following sub-steps;
[0100] S21: establishing a relationship between the coordinates of the target sphere center in the camera coordinate system and the coordinates of the imaging point of the target sphere center on the camera imaging plane;
[0101] The coordinates of the target sphere center in the camera coordinate system are as follows:
[0102] P = [X, Y, Z] T
[0103] Where: P represents the coordinate of the target sphere center in the camera coordinate system;
[0104] The coordinates of the target sphere center imaging point on the camera imaging plane are:
[0105] P d =[X d ,Y d ,Z d ] T
[0106] Where: P d Represents the coordinates of the target sphere center imaging point on the camera imaging plane; Z d Represents the distance between the imaging plane and the optical center of the camera.
[0107] The coordinates P of the target sphere center in the camera coordinate system and the coordinates P of the imaging point of the target sphere center on the camera imaging plane are known. d ; According to the triangle similarity principle, the following relationship can be obtained:
[0108]
[0109] Where: f represents the distance from the imaging plane to the optical center, which is the focal length; X, Y and Z represent the horizontal coordinate, vertical coordinate and vertical coordinate of the target sphere center in the camera coordinate system respectively; X dY represents the horizontal coordinate of the target sphere center imaging point on the camera imaging plane; d Indicates the ordinate of the target sphere center imaging point on the camera imaging plane;
[0110] S22: Determine the mapping relationship between the coordinates of the center of the target ball in the camera coordinate system and the coordinates of the center of the target ball in the pixel coordinate system;
[0111] The coordinates P of the target sphere center on the pixel plane c , the origin O" of the pixel coordinate system is located in the upper left corner of the image, the u axis is parallel to the x axis of the imaging plane coordinate system to the right, and the v axis is parallel to the y axis of the imaging plane coordinate system downward; there is a scaling and translation transformation relationship between the pixel coordinate system and the imaging plane coordinate system. The pixel coordinate system is scaled by α times on the u axis and β times on the v axis. The distance of the pixel origin translation is [c x ,c y ] T Therefore, the coordinates of the target sphere center on the imaging plane are d and the coordinates P of the target sphere center on the pixel plane c The mapping relationship is shown as follows:
[0112]
[0113] Where: α represents the multiple of the pixel coordinates scaled on the u-axis; β represents the multiple of the pixel coordinates scaled on the v-axis; c x and c y Indicates the distance that the pixel origin is translated along the u and v axes;
[0114] Convert the above formula into the following calculation relationship:
[0115]
[0116] Where: f x Indicates the coefficient of scaling the pixel coordinates along the u-axis, specifically f x =αf; f y Indicates the coefficient of scaling the pixel coordinates along the v axis, specifically f y =βf.
[0117] According to the coordinate P of the target sphere center on the camera imaging plane d and the coordinates P in the pixel coordinate system c Determine the coordinates P of the target sphere center in the camera coordinate system and the coordinates P of the target sphere center in the pixel coordinate system c The mapping relationship is as shown below:
[0118]
[0119] Where: K represents the intrinsic parameter matrix of the camera; cx and c y Indicates the distance that the pixel origin is translated along the u and v axes; f x and f y Represents the coefficient of scaling the pixel coordinates along the u-axis and v-axis; P represents the coordinates of the target sphere center in the camera coordinate system;
[0120] S23: Determine the coordinates P of the center of the target ball in the camera coordinate system and the coordinates P of the center of the target ball in the world coordinate system W The mapping relationship of
[0121] The coordinates of the target sphere center in the world coordinate system are P W As shown below:
[0122] P W =(X W Y W Z W )
[0123] Where: P W Indicates the coordinates of the target sphere center in the world coordinate system; X W Indicates the horizontal coordinate of the target sphere center in the world coordinate system; Y W Indicates the vertical coordinate of the target sphere center in the world coordinate system; Z W Represents the coordinates of the target sphere's center in the direction of the normal vector of the plane where the horizontal and vertical axes of the target sphere are located in the world coordinate system.
[0124] The coordinates of the target sphere center in the camera coordinate system are P and the coordinates of the target sphere center in the world coordinate system are P W The method for obtaining the mapping relationship is as follows:
[0125] P=RP W +t
[0126] Where: R represents the rotation matrix of the world coordinate system relative to the camera coordinate system; t represents the displacement vector of the world coordinate system relative to the camera coordinate system; P W Represents the coordinates of the target sphere center in the world coordinate system;
[0127] The rotation matrix R of the world coordinate system relative to the camera coordinate system is as follows:
[0128]
[0129] Where: r ij (i=1,...,3,j=1,...3) represents the 9 elements of the rotation matrix R.
[0130] R and t describe the position of the world coordinate system in the camera coordinate system. The elements in them change continuously during the operation of the system and are our solution goals.
[0131] S24: Determine the position and posture of the visual positioning system;
[0132] Combining the calculation results of S22 and S23, the coordinates of the target sphere center in the pixel coordinate system are P c and the coordinates P of the target sphere center in the world coordinate system W The method for obtaining the mapping relationship is as follows:
[0133]
[0134] Where: X W Indicates the horizontal coordinate of the target sphere center in the world coordinate system; Y W Indicates the vertical coordinate of the target sphere center in the world coordinate system; Z W represents the coordinates of the target sphere center in the normal direction of the plane where the horizontal and vertical axes are located in the world coordinate system; t1, t2 and t3 represent the displacement components of the world coordinate system relative to the camera coordinate system in the X, Y and Z directions respectively; r ij (i=1,...,3,j=1,...3) represents the 9 elements of the rotation matrix R;
[0135] The origin of the world coordinate system is set at the geometric center of the triangle formed by the three target balls of the three-ball target. The coordinates of the three target balls on the three-ball target in the world coordinates are known to be P W , the coordinates P of the three target sphere centers in the pixel coordinate system c After image processing, by substituting the known conditions into the above formula, we can solve the rotation matrix R of the world coordinate system relative to the camera coordinate system and the displacement vector t of the world coordinate system relative to the camera coordinate system, and we can get the position and posture of the visual positioning system;
[0136] S3: Positioning the mobile car and laser scanning radar;
[0137] According to the position and posture of the visual positioning system and the rotation angle of the laser scanning radar, the transformation matrix of the mobile car coordinate system relative to the camera coordinate system can be obtained. The coordinates of the origin of the mobile car coordinate system in the camera coordinate system and the coordinates of the origin of the laser scanning radar coordinate system in the mobile car coordinate system is a known condition determined during installation; therefore, according to the rotation matrix R of the world coordinate system relative to the camera coordinate system and the displacement vector t of the world coordinate system relative to the camera coordinate system calculated in S24; the coordinates of the origin of the mobile car and the origin of the laser scanning radar relative to the world coordinate system can be obtained and
[0138] The method for obtaining the transformation matrix of the world coordinate system relative to the camera coordinate system is as follows:
[0139]
[0140] Where: Represents the transformation matrix of the world coordinate system relative to the camera coordinate system;
[0141] The method for obtaining the transformation matrix of the camera coordinate system relative to the world coordinate system is as follows:
[0142]
[0143] Where: Represents the transformation matrix of the camera coordinate system relative to the world coordinate system;
[0144] The method for obtaining the coordinates of the origin of the mobile car coordinate system in the world coordinate system is as follows:
[0145]
[0146] Where: Represents the coordinates of the origin of the mobile car's coordinate system in the world coordinate system; Represents the coordinates of the origin of the mobile car coordinate system in the camera coordinate system;
[0147] The method for obtaining the coordinates of the origin of the laser scanning radar coordinate system in the world coordinate system is as follows:
[0148]
[0149] Where: Represents the coordinates of the origin of the laser scanning radar coordinate system in the world coordinate system; Represents the transformation matrix of the mobile car coordinate system relative to the camera coordinate system; Represents the coordinates of the origin of the laser scanning radar's coordinate system in the vehicle's coordinate system.
[0150] S4: performing point cloud stitching according to the rotation angle of the laser radar at each moment and the coordinates of the laser scanning radar, completing the entire scanning of the inner surface of the tubular component, and obtaining the inner shape of the tubular component;
[0151] If all points in the shape data obtained by the laser radar are expressed in the same coordinate system, the inner shape of the tubular component can be obtained as shown in the following formula:
[0152]
[0153] Where: P World Represents the coordinates of a three-dimensional point in the world coordinate system; Represents the transformation matrix of the mobile car coordinate system relative to the first three-ball target coordinate system; It represents the coordinates of the point obtained by the laser scanning radar in the coordinate system of the mobile car when positioning with the help of the first three-ball target; Represents the transformation matrix of the second three-ball target coordinate system relative to the first three-ball target coordinate system; Represents the transformation matrix of the mobile car coordinate system relative to the second three-ball target coordinate system; Indicates the coordinates of the point in the vehicle coordinate system obtained by the laser scanning radar when positioning with the help of the second three-ball target; represents the transformation matrix of the i-th three-ball target coordinate system relative to the i-1-th three-ball target coordinate system; Represents the transformation matrix of the mobile car coordinate system relative to the i three-ball target coordinate systems; It represents the coordinates of the point in the vehicle coordinate system obtained by the laser scanning radar when positioning with the help of the i-th three-ball target; i represents the sequence number of the three-ball target; N represents the total number of three-ball targets.
[0154] The second aspect of the present invention provides a scanning device capable of implementing the above-mentioned method for acquiring the inner cavity shape of a tubular member based on visual positioning. The detection method is implemented based on the scanning device. Figure 2 Schematic diagram of the overall structure of an embodiment of the present invention; it includes a visual positioning system 1, a laser scanning radar 3, a wheeled mobile vehicle 2 and a three-ball target 4; Figure 7 FIG. 1 is a schematic diagram of the structure of a visual positioning system 1 according to an embodiment of the present invention; Figure 8 FIG. 3 is a schematic diagram of the structure of a laser scanning radar 3 according to an embodiment of the present invention; Figure 3 FIG. 2 is a schematic diagram of the external structure of a wheeled mobile vehicle 2 according to an embodiment of the present invention; Fig. 9 FIG. 4 is a schematic diagram of the structure of a three-ball target 4 according to an embodiment of the present invention; the three-ball target 4 is arranged linearly on the top of the inner wall of the tubular member to be measured, and its function is to assist the visual system in positioning the scanning device. The three-ball target 4 has three target balls of different colors, which provide sufficient parameters for positioning calculation; Fig.10 FIG. 4 is a schematic diagram showing a scanning device according to an embodiment of the present invention being positioned by means of the first three-ball target 4; Fig.11 It is a schematic diagram showing that the scanning device according to the embodiment of the present invention switches different three-ball targets 4 for positioning.
[0155] The visual positioning system 1 includes a camera 23, a laser sight 25, a first electric turntable 27, a second electric turntable 26, a first mounting frame 28 and a second mounting frame 24. The first electric turntable 27 is fixedly connected to the first end of the first mounting frame 28, the second end of the first mounting frame 28 is connected to the first end of the second mounting frame 24 by a rotating pair, and is fixedly connected to the first end of the second electric turntable 26. The first end of the second mounting frame 24 penetrates the first mounting frame 28 and is fixedly connected to the second end of the second electric turntable 26. The second end of the second mounting frame 24 is fixedly connected to the camera 23; the laser scanning radar 3 includes a laser scanning radar rotating platform 29 and a radar chassis 30. The laser scanning radar rotating platform 29 is connected to the radar chassis 30 by a rotating pair. The laser scanning radar rotating platform An infrared laser emitter is arranged inside; the three-ball target 4 includes three target balls 31, 33, 37 of different colors, three support rods 32, 34, 36 and a target base plate 35, the first ends of the support rods 32, 34, 36 are fixedly connected to the target balls 31, 33, 37 respectively, and the second ends of the support rods 32, 34, 36 are fixedly connected to the target base plate 35; the support rods 32, 34, 36 include a first support rod 32, a second support rod 34 and a third support rod 36 respectively; the target balls 31, 33, 37 include a red target ball 31, a blue target ball 33 and a yellow target ball 37 respectively, the red target ball 31 is fixed by means of the first support rod 32, the blue target ball 33 is fixed by means of the second support rod 34, and the yellow target ball 37 is fixed by means of the third support rod 36. The bottoms of the first support rod 32, the second support rod 34 and the third support rod 36 are fixedly mounted on the target base 35, and the support rods are distributed in a regular triangle.
[0156] The visual positioning system 1 is fixedly installed on the tail of the wheeled mobile cart 2. Its function is to shoot the three-ball target 4 installed in the component to be tested and thus realize the positioning of the wheeled mobile cart 2. The visual positioning system 1 has two rotational degrees of freedom, namely, rotation and pitch. It makes the three-ball target 4 within its shooting range by changing its own posture; the laser scanning radar 3 is installed on the front of the wheeled mobile cart 2. Its function is to scan the component to be tested to obtain shape data; the wheeled mobile cart 2 is driven by a motor and can be remotely controlled. Its function is to carry the visual positioning system 1 and the laser scanning radar 3 to move in the component to be tested.
[0157] The laser scanning radar 3 and the visual positioning system 1 are both arranged on the body of the wheeled mobile vehicle 2. The wheeled mobile vehicle 2 includes wheels, a body 10 and a protective shell; Figure 4 FIG. 2 is an axonometric view of the wheeled mobile vehicle 2 of the embodiment of the present invention after removing the outer shell; Figure 5 FIG. 2 is a front view of the wheeled mobile vehicle 2 after removing the outer shell of the embodiment of the present invention; Figure 6 The figure shows a rear view of the wheeled mobile vehicle 2 according to the embodiment of the present invention with the outer shell removed.
[0158] As can be seen from the figure, the wheel includes a first rubber wheel 19, a second rubber wheel 22, a third rubber wheel 14 and a fourth rubber wheel 18, which are driven by a first DC reduction motor 20, a second DC reduction motor 21, a third DC reduction motor 15 and a fourth DC reduction motor 17, and the first DC reduction motor 20, the second DC reduction motor 21, the third DC reduction motor 15 and the fourth DC reduction motor 17 are all connected to and controlled by a controller 16. The protective shell includes a top shell 8, a vehicle body shell 5, a bottom shell 6 and a head shell 7.
[0159] When in use, the three-ball target 4 is installed on the top of the inner cavity of the tubular component to be tested; the body of the wheeled mobile vehicle 2 is equipped with a pan / tilt mounting frame 9 of the camera positioning system, a laser scanning radar mounting frame 11, four DC reduction motors 20, a lithium battery 13 and a controller 16.
[0160] In summary, the prediction results of this embodiment prove that the method provided by the present invention has a good effect.
[0161] (1) The present invention provides a method for scanning the inner cavity shape of a tubular component. The method uses a wheeled vehicle equipped with a laser scanning radar and a visual positioning system to scan the inside of the tubular component to obtain shape (point cloud) data coordinates, and further completes the calculation of the inner cavity shape of the tubular component through similarity principle and matrix transformation; the result data given shows that the calculation accuracy of the method is good and can meet the needs of actual use;
[0162] (2) The scanning device can enter the interior of a narrow tubular component without causing damage to the tubular component to be measured, thereby providing a highly efficient solution for obtaining internal shape information of the tubular component.
[0163] (3) The scanning device provided by the present invention has a wheeled mobile chassis, which enables the scanning device to move in the inner cavity of the component to adapt to the scanning work of the inner cavity of the component with different lengths. The component inner cavity scanning solution provided by the present invention automatically positions the scanning device with the help of a visual system and a three-ball target, and can obtain the position information of the scanning device in real time, with fast calculation speed, high degree of automation and simple operation.
[0164] The embodiments described above are only descriptions of the preferred implementation modes of the present invention, and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for acquiring the inner cavity shape of a tubular component based on visual positioning, characterized in that: The method uses a visual system to collect images of three-ball targets to position a scanning device moving inside a tubular component, and uses a laser radar to obtain shape data of the inner cavity of the tubular component, which includes the following steps: Step 1: Use the visual positioning system to obtain the center coordinates of each of the three target balls, as follows: The three-ball target installed on the top of the inner wall of the tubular component is photographed by the camera of the visual positioning system to obtain a two-dimensional image of the three-ball target. The image processing software is used for recognition, and the center coordinates of the target balls are obtained as follows: P c =[u,v] T Where: P c represents the coordinates of the center of the target ball in the pixel coordinate system; u represents the horizontal coordinate of the center of the target ball in the pixel coordinate system; v represents the vertical coordinate of the center of the target ball in the pixel coordinate system; T represents the transpose of the matrix; Step 2: Position the visual positioning system to obtain the position and posture of the visual positioning system, which specifically includes the following sub-steps; Step 21: Establish the relationship between the coordinates of the target sphere center in the camera coordinate system and the coordinates of the imaging point of the target sphere center on the camera imaging plane; The coordinates of the target sphere center in the camera coordinate system are known to be P = (X, Y, Z) T and the coordinates P of the target sphere center imaging point on the camera imaging plane d =(X d ,Y d ,f) T ; According to the triangle similarity principle, the following relationship can be obtained: Where: f represents the distance from the camera imaging plane to the camera optical center, that is, the focal length; X, Y and Z represent the horizontal coordinate, vertical coordinate and camera optical axis coordinate of the target sphere center in the camera coordinate system respectively; X d Y represents the horizontal coordinate of the target sphere center imaging point on the camera imaging plane; d Indicates the ordinate of the target sphere center imaging point on the camera imaging plane; Step 22: Determine the mapping relationship between the coordinates of the target sphere center in the camera coordinate system and the coordinates of the target sphere center in the pixel coordinate system; According to the coordinate P of the target sphere center on the camera imaging plane d and the coordinates P of the target sphere center in the pixel coordinate system c Determine the coordinates P of the target sphere center in the camera coordinate system and the coordinates P of the target sphere center in the pixel coordinate system c The mapping relationship is as shown below: Where: K represents the intrinsic parameter matrix of the camera; c x and c y Indicates the distance that the pixel origin is translated along the u-axis and v-axis of the pixel coordinate system; f x and f y Represents the coefficient of image scaling along the u-axis and v-axis; P represents the coordinates of the target sphere center in the camera coordinate system; Step 23: Determine the coordinates P of the target sphere center in the camera coordinate system and the coordinates P of the target sphere center in the world coordinate system W The mapping relationship of The coordinates of the center of the target ball in the camera coordinate system are P and the coordinates of the center of the target ball in the world coordinate system are P W The method for obtaining the mapping relationship is as follows: P=RP W +t Where: R represents the rotation matrix of the world coordinate system relative to the camera coordinate system; t represents the displacement vector of the world coordinate system relative to the camera coordinate system; P W Represents the coordinates of the target sphere center in the world coordinate system; Step 24: Determine the position and posture of the visual positioning system; Combining the calculation results of step 22 and step 23, the coordinate P of the center of the target ball in the pixel coordinate system is c and the coordinates P of the target sphere center in the world coordinate system W The method for obtaining the mapping relationship is as follows: Where: X W Indicates the horizontal coordinate of the target sphere center in the world coordinate system; Y W Indicates the vertical coordinate of the target sphere center in the world coordinate system; Z W represents the coordinates of the target sphere center in the world coordinate system in the direction of the plane normal vector where the horizontal and vertical axes are located; t1, t2 and t3 represent the displacement components of the world coordinate system relative to the camera coordinate system in the X, Y and Z directions respectively; r ij (i=1,...,3,j=1,...3) represents the 9 elements of the rotation matrix R; The origin of the world coordinate system is set at the geometric center of the triangle formed by the centers of the three target balls of the three-ball target. The coordinates P of the centers of the three target balls on the three-ball target in the world coordinates are known. W , the coordinates of the center of each target ball in the pixel coordinate system are P c After image processing, by substituting the known conditions into the above formula, we can solve the rotation matrix R of the world coordinate system relative to the camera coordinate system and the displacement vector t of the world coordinate system relative to the camera coordinate system, and we can get the position and posture of the visual positioning system; Step 3: Position the mobile car and laser scanning radar; According to the position and posture of the visual positioning system and the rotation angle of the laser scanning radar, the transformation matrix of the mobile car coordinate system relative to the camera coordinate system can be obtained. The coordinates of the origin of the mobile car coordinate system in the camera coordinate system and the coordinates of the origin of the laser scanning radar coordinate system in the mobile car coordinate system According to the rotation matrix R of the world coordinate system relative to the camera coordinate system and the displacement vector t of the world coordinate system relative to the camera coordinate system calculated in step 24, the coordinates of the origin of the moving car and the origin of the laser scanning radar relative to the world coordinate system are obtained. and Step 4: perform point cloud stitching based on the rotation angle of the laser radar at each moment and the coordinates of the laser scanning radar, complete the entire scan of the inner surface of the tubular component, and obtain the inner shape of the tubular component; Each point in the shape data obtained by the laser radar is expressed in the same coordinate system as shown in the following formula: Where: P World Represents the coordinates of the points obtained by the laser scanning radar in the world coordinate system; Represents the transformation matrix of the mobile car coordinate system relative to the first three-ball target coordinate system; It represents the coordinates of the point obtained by the laser scanning radar in the coordinate system of the mobile car when positioning with the help of the first three-ball target; Represents the transformation matrix of the second three-ball target coordinate system relative to the first three-ball target coordinate system; Represents the transformation matrix of the mobile car coordinate system relative to the second three-ball target coordinate system; Indicates the coordinates of the point in the vehicle coordinate system obtained by the laser scanning radar when positioning with the help of the second three-ball target; represents the transformation matrix of the i-th three-ball target coordinate system relative to the i-1-th three-ball target coordinate system; Represents the transformation matrix of the mobile car coordinate system relative to the i-th three-ball target coordinate system; It represents the coordinates of the point in the vehicle coordinate system obtained by the laser scanning radar when positioning with the help of the i-th three-ball target; i represents the serial number of the three-ball target; N represents the total number of three-ball targets.
2. The method for obtaining the inner cavity shape of a tubular component based on visual positioning according to claim 1, characterized in that: The coordinate P of the target sphere center on the imaging plane in step 22 d and the coordinates P of the target sphere center in the pixel coordinate system c The relationship is as follows: The coordinates of the target sphere center on the pixel plane are P c , the origin O" of the pixel coordinate system is located in the upper left corner of the image, the u axis is parallel to the x axis of the imaging plane coordinate system to the right, and the v axis is parallel to the y axis of the imaging plane coordinate system downward; there is a scaling and translation transformation relationship between the pixel coordinate system and the imaging plane coordinate system. The pixel coordinate system is scaled by α times on the u axis and β times on the v axis. The distance of the pixel origin translation is [c x ,c y ] T Therefore, the coordinates of the target sphere center on the imaging plane are d and the coordinates P of the target sphere center on the pixel plane c The mapping relationship is shown as follows: Where: α represents the multiple of the pixel coordinate scaling on the u-axis; β represents the multiple of the pixel scaling on the v-axis; c x and c y Indicates the distance that the pixel origin is translated along the u and v axes; Convert the above formula into the following calculation relationship: Where: f x Indicates the coefficient of scaling the pixel coordinates along the u-axis, specifically f x =αf; f y Indicates the coefficient of scaling the pixel origin along the v axis, specifically f y =βf.
3. The method for acquiring the inner cavity shape of a tubular component based on visual positioning according to claim 1, characterized in that: The coordinate P of the center of the target ball in step 23 in the world coordinate system W As shown below: P W =(X W Y W Z W ) Where: P W Indicates the coordinates of the target sphere center in the world coordinate system; X W Indicates the horizontal coordinate of the target sphere center in the world coordinate system; Y W Indicates the vertical coordinate of the target sphere center in the world coordinate system; Z W Represents the coordinates of the target sphere's center in the direction of the normal vector of the plane where the horizontal and vertical axes of the target sphere are located in the world coordinate system.
4. The method for obtaining the inner cavity shape of a tubular component based on visual positioning according to claim 1, characterized in that: The method for obtaining the coordinates of the mobile car origin and the laser scanning radar origin relative to the world coordinate system in step 3 is as follows: The method for obtaining the transformation matrix of the world coordinate system relative to the camera coordinate system is as follows: Where: Represents the transformation matrix of the world coordinate system relative to the camera coordinate system; The method for obtaining the transformation matrix of the camera coordinate system relative to the world coordinate system is as follows: Where: Represents the transformation matrix of the camera coordinate system relative to the world coordinate system; The method for obtaining the coordinates of the origin of the mobile car coordinate system in the world coordinate system is as follows: Where: Represents the coordinates of the origin of the mobile car coordinate system in the world coordinate system; Represents the coordinates of the origin of the mobile car coordinate system in the camera coordinate system; The method for obtaining the coordinates of the origin of the laser scanning radar coordinate system in the world coordinate system is as follows: Where: Represents the coordinates of the origin of the laser scanning radar coordinate system in the world coordinate system; Represents the transformation matrix of the mobile car coordinate system relative to the camera coordinate system; Represents the coordinates of the point cloud obtained by the laser scanning radar in the vehicle coordinate system.
5. A scanning device for implementing the method for acquiring the inner cavity shape of a tubular component based on visual positioning according to any one of claims 1 to 4, characterized in that: The scanning device can move inside the tubular component so as to be suitable for tubular components of different lengths. The scanning device includes a visual positioning system, a laser scanning radar, a wheeled mobile trolley and a three-ball target. The visual positioning system includes a camera, a first electric turntable, a second electric turntable, a first mounting frame, and a second mounting frame. The first electric turntable is fixedly connected to the first end of the first mounting frame, the second end of the first mounting frame is connected to the first end of the second mounting frame by a rotating pair, and penetrates the first mounting frame and is fixedly connected to the first end of the second electric turntable. The first end of the second mounting frame is fixedly connected to the second end of the second electric turntable, and the second end of the second mounting frame is fixedly connected to the camera; the laser scanning radar includes a laser scanning radar rotating platform and a radar chassis, the laser scanning radar rotating platform is connected to the radar chassis by a rotating pair, and an infrared laser transmitter is arranged in the laser scanning radar rotating platform; the three-ball target includes three target balls of different colors, three support rods and a target base plate, the first ends of the three support rods are fixedly connected to the target balls, the second ends of the three support rods are fixedly connected to the target base plate, and the three support rods are distributed in a regular triangle; The laser scanning radar and the visual positioning system are both arranged on the body of the wheeled mobile vehicle; The wheeled mobile vehicle comprises wheels, a vehicle body and a protective shell; The three-ball target is fixedly installed in a linear shape on the top of the inner wall of the tubular component to be measured. The three-ball target is used to assist the visual system in positioning the scanning device. The three-ball target has three target balls of different colors, so as to provide sufficient parameters for positioning calculation; the visual positioning system is fixedly installed on the tail of the wheeled mobile vehicle. The visual positioning system is used to shoot the three-ball target installed on the top of the inner wall of the component to be measured and then realize the positioning of the scanning device. The visual positioning system has two rotational degrees of freedom, rotation and pitch, and the three-ball target is placed within the shooting range by changing its own posture; the laser scanning radar is installed on the bow of the wheeled mobile vehicle, and its function is to scan the component to be measured to obtain shape data; the wheeled mobile vehicle is driven by a motor and remotely controlled, and its function is to carry the visual positioning system and the laser scanning radar to move in the component to be measured.
6. The scanning device according to claim 5, characterized in that: A camera positioning system mounting frame, a laser scanning radar mounting frame, four DC reduction motors, a lithium battery and a controller are fixedly mounted on the body of the wheeled mobile vehicle.
Citation Information
Patent Citations
Laser range finder based on visual inertial navigation system and range finding method
CN111220118A
Plane pose dynamic measurement method based on monocular vision
CN111811395A