Three-dimensional measurement method, device, electronic equipment and storage medium for tubular objects
By setting up a virtual camera in the ring structured light measurement system and calculating the basic matrix of the sight-sensitive binocular image, the problem of lack of a method of combining the mirrored binocular image technology and ring structured light in the prior art is solved, and efficient three-dimensional measurement and refined evaluation of tubular objects are realized.
Patent Information
- Application Number
- CN202411772643.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-12-04
AI Technical Summary
The existing three-dimensional measurement of tubular objects lacks a method based on mirror bi-purpose structured light technology and ring structured light, which cannot meet the needs of refined evaluation of the three-dimensional morphology of tubular objects in high-precision industrial applications.
Through the ring structured light measurement system, a virtual camera is set up to calculate the basic matrix of binoculars that are visually mirrored, the coordinates of the center point of the light bar are extracted, and the set of points of the same name is determined, and finally the three-dimensional morphology of the tubular object to be measured is obtained.
It realizes efficient three-dimensional measurement of tubular objects, makes full use of mirror information in limited space, improves the three-dimensional measurement efficiency, and meets the refined evaluation needs of high-quality industrial applications.
Smart Images

Figure CN119245550B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of three-dimensional measurement, and in particular to a method, device, electronic device and storage medium for three-dimensional measurement of a tubular object. Background Art
[0002] As a carrier of fluids or special substances, or a structure mechanically combined with shaft components, tubular parts will inevitably suffer from wear, corrosion and other damages during long-term operation, which not only affects performance, but also poses a threat to system safety. Therefore, regular inspection of the inside of tubular parts is a key link to ensure the stable operation of the system. Traditional optical inspection technologies, such as laser inspection, fringe inspection and visual imaging, can quickly and accurately identify defects or potential problem areas inside tubular parts. However, in some high-precision industrial applications, merely qualitatively identifying defects can no longer meet high standards. For example, in aircraft engine pipelines, artillery barrels and precision instrument delivery systems, the length, width and depth of cracks, the area and distribution of corrosion areas, and the roughness of the inner surface all require a detailed assessment to formulate targeted treatment measures.
[0003] Structured light technology is a commonly used inner wall shape measurement method based on optical triangulation. It has the advantages of high precision, high efficiency and non-contact, and can achieve accurate measurement of the three-dimensional shape information of the inner wall of tubular parts. Existing structured light technology can be roughly divided into single-purpose structured light technology, binocular structured light technology and mirror binocular structured light technology according to the different sensor structures. At present, there are many public measurement methods based on single-purpose structured light technology and binocular structured light technology, but there is a lack of methods and devices that combine mirror binocular structured light technology with annular structured light for measuring tubular objects.
[0004] Therefore, in order to solve the technical problem that the existing three-dimensional measurement of tubular objects lacks a method based on combining mirror binocular structured light technology with annular structured light to measure tubular objects, a three-dimensional measurement method, device, electronic device and storage medium for tubular objects are urgently needed. Summary of the invention
[0005] The purpose of the present application is to provide a method, device, electronic device and storage medium for three-dimensional measurement of tubular objects. Through an annular structured light measurement system, a virtual camera is set, a basic matrix of mirror-image binoculars is calculated, the coordinates of the center points of light strips are extracted, and a set of points with the same name are determined. Finally, the three-dimensional morphology of the tubular object to be measured is calculated, so as to solve the problem that the existing three-dimensional measurement of tubular objects lacks a method for combining structured light technology based on mirror-image binoculars with annular structured light to measure tubular objects. The method makes full use of the reflector information in a limited space and improves the efficiency of three-dimensional measurement of tubular objects.
[0006] In a first aspect, the present application provides a method for three-dimensional measurement of a tubular object, which is applied to an annular structured light measurement system to perform three-dimensional measurement of the tubular object, wherein the annular structured light measurement system comprises a camera, an annular laser projector and a reflector; the camera is arranged opposite to the reflector, and the annular laser projector is arranged opposite to the reflector;
[0007] The three-dimensional measurement method of a tubular object comprises:
[0008] Setting a mirror camera formed by mirror reflection in the reflector as a virtual camera, and obtaining a first intrinsic parameter and a first extrinsic parameter of the camera and a second intrinsic parameter and a second extrinsic parameter of the virtual camera;
[0009] Calculate the position relationship between the camera and the virtual camera according to the first internal parameter, the first external parameter, the second internal parameter and the second external parameter, so as to calculate the mirror image binocular basic matrix between the camera and the virtual camera in combination with the first internal parameter;
[0010] The tubular object to be measured is placed in the annular structured light measurement system, and the annular laser projector is started to project an annular laser beam outward to the inner wall of the tubular object to be measured, and then the camera is used to capture a double annular light stripe image including the annular laser beam projected to the inner wall and the annular laser beam reflected by the reflector;
[0011] The Steger algorithm is used to extract the coordinates of the center points of the light stripes in the double annular light stripe image, and the real light stripe center point set corresponding to the annular laser beam projected onto the inner wall, the mirror light stripe center point set corresponding to the annular laser beam reflected by the reflector, and the virtual light stripe center point set corresponding to the virtual annular laser beam in the virtual camera are obtained;
[0012] According to the mirror image binocular basic matrix and the mirror image light strip center point set, the same-name point set of the real light strip center point set and the virtual light strip center point set is determined by polar coordinate conversion method and epipolar constraint method;
[0013] Based on the point set with the same name, the three-dimensional shape of the tubular object to be measured is calculated using a straight-line linear transformation algorithm and a least squares method.
[0014] The three-dimensional measurement method for tubular objects provided in the present application can realize three-dimensional measurement of tubular objects. Through the annular structured light measurement system, a virtual camera is set, the basic matrix of the mirror image binocular is calculated, the coordinates of the center points of the light strips are extracted, and the set of points with the same name is determined. Finally, the three-dimensional morphology of the tubular object to be measured is calculated. The problem that the existing three-dimensional measurement of tubular objects lacks a method for combining the structured light technology based on the mirror image binocular with the annular structured light to measure tubular objects is solved. The reflector information in the limited space is fully utilized, and the three-dimensional measurement efficiency of the tubular object is improved.
[0015] Optionally, setting a mirror camera formed by mirror reflection in the reflector as a virtual camera, and acquiring a first intrinsic parameter and a first extrinsic parameter of the camera and a second intrinsic parameter and a second extrinsic parameter of the virtual camera include:
[0016] Setting a mirror camera formed by mirror reflection in the reflector as a virtual camera;
[0017] By using Zhang's calibration method, based on the mirror reflection imaging relationship between the camera and the virtual camera, a first intrinsic parameter and a first extrinsic parameter of the camera and a second intrinsic parameter and a second extrinsic parameter of the virtual camera are obtained.
[0018] Optionally, calculating the pose relationship between the camera and the virtual camera according to the first internal parameter, the first external parameter, the second internal parameter and the second external parameter, so as to calculate a mirror image binocular basic matrix between the camera and the virtual camera in combination with the first internal parameter, including:
[0019] According to the rigid transformations of the camera and the virtual camera with the world coordinate system respectively, in combination with the first intrinsic parameter, the first extrinsic parameter, the second intrinsic parameter and the second extrinsic parameter, a camera perspective projection model is constructed;
[0020] Based on the camera perspective projection model, calculating the position relationship between the camera and the virtual camera;
[0021] According to the first internal parameter and the posture relationship, an epipolar plane equation of the annular structured light measurement system is established to extract a mirror-image binocular basic matrix of the camera and the virtual camera from the epipolar plane equation.
[0022] The three-dimensional measurement method for tubular objects provided in the present application can realize the three-dimensional measurement of tubular objects. According to the posture relationship between the camera and the virtual camera, the polar plane equation is established to extract the mirror image binocular basic matrix of the camera and the virtual camera from the polar plane equation. The tubular object to be measured is analyzed through the mirror image binocular basic matrix, which is beneficial to improve the three-dimensional measurement efficiency of the tubular object.
[0023] Optionally, using the Steger algorithm, the coordinates of the center points of the light stripes in the double annular light stripe image are extracted to obtain a set of real light stripe center points corresponding to the annular laser beam projected onto the inner wall, a set of mirror light stripe center points corresponding to the annular laser beam reflected by the reflector, and a set of virtual light stripe center points corresponding to the virtual annular laser beam in the virtual camera, including:
[0024] Using the Steger algorithm, the coordinates of the center points of the light stripes in the double annular light stripe image are extracted to obtain a set of real light stripe center points corresponding to the annular laser beam projected onto the inner wall and a set of mirror light stripe center points corresponding to the annular laser beam reflected by the reflector;
[0025] Based on the coordinate relationship between the mirror point in the reflector and the virtual point in the virtual camera, a virtual light strip center point set corresponding to the virtual annular laser beam in the virtual camera corresponding to the mirror light strip center point set is calculated.
[0026] Optionally, according to the mirror image binocular basic matrix and the mirror image light strip center point set, determining the same-name point set of the real light strip center point set and the virtual light strip center point set by polar coordinate conversion method and epipolar constraint method, comprises:
[0027] Using a preset polar coordinate conversion formula, taking the center of the double annular light stripe image as the origin of the polar coordinate system, the two-dimensional coordinates of each real point in the real light stripe center point set and the two-dimensional coordinates of each mirror point in the mirror light stripe center point set are converted into polar coordinates, so as to obtain the first polar coordinates of each real point in the real light stripe center point set and the second polar coordinates of each mirror point in the mirror light stripe center point set;
[0028] According to the mirror image binocular basic matrix, the epipolar lines corresponding to the virtual points in the center point of the virtual light strip are calculated;
[0029] Based on the intersection points of each of the polar lines and the real light bar center point set, in combination with the first polar coordinates and the second polar coordinates, a point set with the same name as the real light bar center point set and the virtual light bar center point set is determined.
[0030] The three-dimensional measurement method for tubular objects provided in the present application can realize three-dimensional measurement of tubular objects. By combining the intersection of the polar lines calculated based on the mirror image binocular basic matrix with the center point set of the real light strips, the set of points with the same name is determined, and the points with the same name are used for subsequent three-dimensional reconstruction, which can improve the three-dimensional measurement efficiency of tubular objects.
[0031] Optionally, each of the epipolar lines has two intersection points with the real light bar center point set; based on the intersection points of each of the epipolar lines with the real light bar center point set, combined with the first polar coordinates and the second polar coordinates, determining a point set with the same name as the real light bar center point set and the virtual light bar center point set, comprises:
[0032] Determining, in the center point set of the mirror light strip, a mirror point corresponding to a virtual point corresponding to the epipolar line;
[0033] Determine the intersection point with the smaller angle difference between the first polar coordinate and the second polar coordinate of the corresponding mirror point among the two intersection points as the same-name point corresponding to the virtual point corresponding to the polar line;
[0034] All the epipolar lines are traversed to obtain the same-name points of the corresponding virtual points, thereby forming the same-name point set of the real light bar center point set and the virtual light bar center point set.
[0035] Optionally, based on the set of points with the same name, the three-dimensional shape of the tubular object to be measured is calculated using a straight-line linear transformation algorithm and a least squares method, including:
[0036] Based on the point set with the same name, the three-dimensional coordinates of each real point in the center point set of the real light strip are calculated by using a straight line linear transformation algorithm and a least square method;
[0037] Moving the tubular object to be measured multiple times to obtain the three-dimensional coordinates of each real point in the center point set of the corresponding real light strip after each movement;
[0038] Point cloud fitting is performed according to the three-dimensional coordinates obtained after each movement to obtain the three-dimensional morphology of the tubular object to be measured.
[0039] In a second aspect, the present application provides a three-dimensional measurement device for a tubular object, which is applied to an annular structured light measurement system to perform three-dimensional measurement of the tubular object, wherein the annular structured light measurement system comprises a camera, an annular laser projector and a reflector; the camera is arranged opposite to the reflector, and the annular laser projector is arranged opposite to the reflector;
[0040] The tubular object three-dimensional measurement device comprises:
[0041] An acquisition module, used for setting a mirror camera formed by mirror reflection in the reflector as a virtual camera, and acquiring a first intrinsic parameter and a first extrinsic parameter of the camera and a second intrinsic parameter and a second extrinsic parameter of the virtual camera;
[0042] A first calculation module, used for calculating the posture relationship between the camera and the virtual camera according to the first internal parameter, the first external parameter, the second internal parameter and the second external parameter, so as to calculate the mirror image binocular basic matrix between the camera and the virtual camera in combination with the first internal parameter;
[0043] A shooting module, used for placing the tubular object to be measured in the annular structured light measurement system, and starting the annular laser projector to project an annular laser beam outward to the inner wall of the tubular object to be measured, and then using the camera to shoot to obtain a double annular light stripe image including the annular laser beam projected to the inner wall and the annular laser beam reflected by the reflector;
[0044] An extraction module is used to extract the coordinates of the center points of the light stripes in the double annular light stripe image by using the Steger algorithm, and obtain a set of real light stripe center points corresponding to the annular laser beam projected onto the inner wall, a set of mirror light stripe center points corresponding to the annular laser beam reflected by the reflector, and a set of virtual light stripe center points corresponding to the virtual annular laser beam in the virtual camera;
[0045] A determination module, for determining, according to the mirror image binocular basic matrix and the mirror image light strip center point set, a point set with the same name as the real light strip center point set and the virtual light strip center point set by using a polar coordinate conversion method and an epipolar constraint method;
[0046] The second calculation module is used to calculate the three-dimensional shape of the tubular object to be measured based on the set of points with the same name by using a straight line linear transformation algorithm and a least square method.
[0047] The tubular object three-dimensional measurement device, through the annular structured light measurement system, sets a virtual camera, calculates the mirror image binocular basic matrix, extracts the coordinates of the center point of the light bar, determines the set of points with the same name, and finally calculates the three-dimensional morphology of the tubular object to be measured. The problem that the existing tubular object three-dimensional measurement lacks a method for combining the mirror image binocular structured light technology with the annular structured light to measure the tubular object is solved, and the reflector information in the limited space is fully utilized to improve the three-dimensional measurement efficiency of the tubular object.
[0048] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, it runs the steps in the three-dimensional measurement method of a tubular object as described above.
[0049] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the three-dimensional measurement method of a tubular object as described above are executed.
[0050] Beneficial effects: The three-dimensional measurement method, device, electronic device and storage medium of the tubular object provided by the present application, through the annular structured light measurement system, sets a virtual camera, calculates the basic matrix of the mirror image binocular, extracts the coordinates of the center points of the light strips, determines the set of points with the same name, and finally calculates the three-dimensional morphology of the tubular object to be measured, thereby solving the problem that the existing three-dimensional measurement of tubular objects lacks a method for combining the structured light technology based on the mirror image binocular with the annular structured light to measure tubular objects, makes full use of the reflector information in the limited space, and improves the three-dimensional measurement efficiency of tubular objects. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A flow chart of a method for three-dimensional measurement of a tubular object provided in an embodiment of the present application.
[0052] Figure 2 A schematic diagram of the structure of a three-dimensional measurement device for a tubular object provided in an embodiment of the present application.
[0053] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0054] Figure 4 Schematic diagram of the structure of the ring structured light measurement system.
[0055] Explanation of reference numerals: 1. Acquisition module; 2. First calculation module; 3. Shooting module; 4. Extraction module; 5. Determination module; 6. Second calculation module; 301. Processor; 302. Memory; 303. Communication bus; 101. Camera; 102. Ring laser projector; 103. Reflector; 104. Tubular object to be measured; 105. Ring light stripes; 106. Mirrored ring light stripes; 107. Support plate; 108. Support rod. DETAILED DESCRIPTION
[0056] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0057] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0058] Please refer to Figure 1 , Figure 1 A three-dimensional measurement method for a tubular object in some embodiments of the present application is applied to a ring structured light measurement system (specifically, Figure 4 As shown in the figure, the ring structured light measurement system can perform three-dimensional measurement on the tubular object, and the ring structured light measurement system includes a camera 101, a ring laser projector 102 and a reflector 103; the camera 101 is arranged opposite to the reflector 103 (the reflector 103 is a single-sided mirror, and the opposite arrangement means that the camera 101 is arranged opposite to the mirror surface of the reflector 103), and the ring laser projector 102 is arranged opposite to the reflector 103;
[0059] The three-dimensional measurement method of a tubular object comprises the following steps:
[0060] Step S101, setting a mirror camera formed by mirror reflection in the reflector as a virtual camera, and obtaining a first intrinsic parameter and a first extrinsic parameter of the camera and a second intrinsic parameter and a second extrinsic parameter of the virtual camera;
[0061] Step S102, calculating the posture relationship between the camera and the virtual camera according to the first internal parameter, the first external parameter, the second internal parameter and the second external parameter, so as to calculate the basic binocular matrix of the mutual-viewing mirror image between the camera and the virtual camera in combination with the first internal parameter;
[0062] Step S103, placing the tubular object to be measured in the annular structured light measurement system, and starting the annular laser projector to project an annular laser beam outward to the inner wall of the tubular object to be measured, and then using a camera to capture a double annular light stripe image including the annular laser beam projected to the inner wall and the annular laser beam reflected by the reflector;
[0063] Step S104, using the Steger algorithm, extracting the coordinates of the center points of the light stripes in the double annular light stripe image, and obtaining a real light stripe center point set corresponding to the annular laser beam projected onto the inner wall, a mirror light stripe center point set corresponding to the annular laser beam reflected by the reflector, and a virtual light stripe center point set corresponding to the virtual annular laser beam in the virtual camera (the real light stripe center point set, the mirror light stripe center point set, and the virtual light stripe center point set refer to the sets of points corresponding to the center of the light stripe width in the annular laser beam, respectively);
[0064] Step S105, determining the same-name point set of the real light strip center point set and the virtual light strip center point set through polar coordinate conversion method and epipolar constraint method according to the mirror image binocular basic matrix and the mirror image light strip center point set;
[0065] Step S106, based on the set of points with the same name, using a straight-line linear transformation algorithm and a least squares method, the three-dimensional shape of the tubular object to be measured is calculated.
[0066] The three-dimensional measurement method for tubular objects uses an annular structured light measurement system to set a virtual camera, calculate the basic matrix of the mirror image binocular, extract the coordinates of the center points of the light strips, determine the set of points with the same name, and finally calculate the three-dimensional morphology of the tubular object to be measured. The method solves the problem that the existing three-dimensional measurement of tubular objects lacks a method for combining the structured light technology based on the mirror image binocular with the annular structured light to measure the tubular objects, makes full use of the reflector information in a limited space, and improves the three-dimensional measurement efficiency of the tubular object.
[0067] Specifically, Figure 4 As shown, a ring structured light measurement system is pre-built, and the ring structured light measurement system includes a camera 101, a ring laser projector 102, and a reflector 103, wherein the camera 101 and the reflector 103 are arranged opposite to each other, so that the camera 101 can not only capture the image of the real object, but also capture the image of the mirror object formed by mirror reflection at the same time, the ring laser projector 102 and the reflector 103 are arranged opposite to each other, and the position and distance between the camera 101 and the ring laser projector 102 are not limited (for example, the camera 101 is arranged above the ring laser projector 102, or the ring laser projector 102 is arranged between the camera 101 and the reflector 103), but it is necessary to ensure that the ring laser beam projected outward by the ring laser projector 102 can be projected onto the inner wall of the tubular object 104 to be measured, and to ensure that the camera 101 can capture the ring laser beam projected onto the inner wall and the mirror image ring laser beam formed by the reflector reflecting the ring laser beam, and try to ensure that the camera's shooting center is maintained near the center line of the tubular object to be measured. Among them, Figure 4 The support plate 107 and the support rod 108 are used to stabilize the annular structured light measurement system to facilitate the subsequent movement of the tubular object to be measured; the annular light stripe 105 is an annular laser beam projected onto the inner wall by the annular laser projector, and the mirror image annular light stripe 106 is a mirror image stripe generated by the reflector reflecting the annular light stripe 105.
[0068] Specifically, in step S101, a mirror camera formed by mirror reflection in the reflector is set as a virtual camera, and a first intrinsic parameter and a first extrinsic parameter of the camera and a second intrinsic parameter and a second extrinsic parameter of the virtual camera are obtained, including:
[0069] The mirror camera formed by the mirror reflection in the reflector is set as a virtual camera;
[0070] By using Zhang's calibration method, based on the mirror reflection imaging relationship between the camera and the virtual camera, the first intrinsic parameter and the first extrinsic parameter of the camera and the second intrinsic parameter and the second extrinsic parameter of the virtual camera are obtained.
[0071] In step S101, a mirror camera formed by mirror reflection in the reflector is set as a virtual camera. By introducing the concept of a virtual camera, this mirrored binocular vision structure can be equivalent to a binocular stereoscopic vision structure placed opposite to each other.
[0072] Use a plane target as a calibration plate, use a camera to shoot the plane target at different positions and postures, and obtain multiple plane target images (it is necessary to ensure that the real target image and the mirror target image in the plane target image are visible in the camera at the same time), and use Zhang's calibration method to calibrate the camera to obtain the first intrinsic parameter and the first extrinsic parameter of the camera. The first intrinsic parameter includes the first intrinsic parameter matrix , the first distortion coefficient and the second distortion coefficient , the first external parameter includes the first rotation matrix and the first translation vector Among them, Zhang's calibration method is an existing technology and will not be described in detail here.
[0073] Since the virtual camera is the reflection of the camera in the mirror, their intrinsic parameters are the same, that is, the first intrinsic parameter is equal to the second intrinsic parameter. Virtual imaging point Mirror point The calculation results in:
[0074] ;
[0075] in, is the width of the image plane; is the image pixel coordinate of the virtual imaging point, is the horizontal coordinate of the virtual imaging point, is the ordinate of the virtual imaging point; is the image pixel coordinate of the mirror point, is the horizontal coordinate of the mirror point, is the ordinate of the mirror point.
[0076] Using the homography matrix, the second external parameter of the virtual camera can be solved. The second external parameter includes the second rotation matrix and the second translation vector Among them, the homography matrix is a prior art and will not be described in detail here.
[0077] Specifically, in step S102, the pose relationship between the camera and the virtual camera is calculated according to the first internal parameter, the first external parameter, the second internal parameter, and the second external parameter, so as to calculate the mirror image binocular basic matrix between the camera and the virtual camera in combination with the first internal parameter, including:
[0078] According to the rigid transformation of the camera and the virtual camera with the world coordinate system respectively, the camera perspective projection model is constructed by combining the first intrinsic parameter, the first extrinsic parameter, the second intrinsic parameter and the second extrinsic parameter;
[0079] Based on the camera perspective projection model, the position relationship between the camera and the virtual camera is calculated;
[0080] According to the first intrinsic parameter and the position and posture relationship, the epipolar plane equation of the annular structured light measurement system is established to extract the mirror image binocular basic matrix of the camera and the virtual camera from the epipolar plane equation.
[0081] In step S102, a camera perspective projection model is constructed by using the rigid transformation between the camera and the virtual camera and the world coordinate system, combining the first intrinsic parameter, the first extrinsic parameter, the second intrinsic parameter and the second extrinsic parameter. The camera perspective projection model is specifically:
[0082] ;
[0083] in, is the first scaling factor, is the second scale factor; , , They are , , The homogeneous coordinates of , , Respectively represent the coordinates of any three-dimensional point in the camera coordinate system, the virtual camera coordinate system and the world coordinate system; is the camera's projection matrix, is the projection matrix of the virtual camera, and A is the first intrinsic parameter matrix.
[0084] Based on the camera perspective projection model, the pose relationship between the camera and the virtual camera is calculated. The pose relationship between the camera and the virtual camera is as follows:
[0085] ;
[0086] in, is the third rotation matrix, yes The rotation matrix of is the third translation vector, yes The translation vector of and the third translation vector Used to represent the coordinate transformation relationship from camera to virtual camera.
[0087] In order to specifically solve the pose relationship between the two cameras, the feature points in the target coordinate system can be And its corresponding feature points of the plane target image ( and For the same 3D point in different coordinate systems, establish the following objective optimization function:
[0088] ;
[0089] in, is the reprojection error of all target feature points, Indicates The feature point coordinates of a virtual target image (a plane target image in a virtual camera coordinate system), is the coordinate of the feature point in the corresponding target coordinate system, and Respectively represent The rotation matrix and translation vector between the target coordinate system and the camera coordinate system in the plane target image; is the distortion coefficient, including the first distortion coefficient and the second distortion coefficient ; M is the total number of virtual target images, and N is the number of three-dimensional points.
[0090] In summary, the pose relationship between the camera and the virtual camera is calculated through the target optimization function.
[0091] According to the first internal parameter matrix in the first internal parameter Relationship with posture , establish the epipolar plane equation of the annular structured light measurement system, the epipolar plane equation is specifically:
[0092] ;
[0093] in, is the third translation vector The antisymmetric matrix of .
[0094] Let the epipolar plane equation , thereby extracting F to obtain the mirror image binocular basic matrix.
[0095] Specifically, in step S103, the tubular object to be measured is placed in the annular structured light measurement system, and after the annular laser projector is started to project an annular laser beam outward to the inner wall of the tubular object, a camera is used to capture a double annular light stripe image including the annular laser beam projected to the inner wall and the annular laser beam reflected by the reflector. When measuring a large tubular object to be measured (the inner diameter of the large tubular object to be measured is sufficient to accommodate the annular structured light measurement system), the annular structured light measurement system can be placed inside the tubular object to be measured (such as Figure 4 As shown), the camera can capture a double annular light stripe image including the annular laser beam projected onto the inner wall and the annular laser beam reflected by the reflector; when measuring a small tubular object to be measured (the inner diameter of the small tubular object to be measured is not sufficient to accommodate the annular structured light measurement system), the annular structured light measurement system can be placed outside the tubular object to be measured, that is, the tubular object to be measured is placed between the camera and the reflector, so that the camera can capture a double annular light stripe image including the annular laser beam projected onto the inner wall and the annular laser beam reflected by the reflector.
[0096] In some embodiments, the tubular object to be measured can be placed in the annular structured light measurement system in advance, so as to start the annular laser projector to project the annular laser beam outward to the inner wall of the tubular object, and then the mirror image binocular basic matrix of the annular structured light measurement system is obtained by the above calculation method (i.e., step S101 and step S102), and the double annular light stripe image including the annular laser beam projected to the inner wall and the annular laser beam reflected by the reflector is obtained by using a camera; thereby, step S101, step S102 and step S103 are correspondingly modified as follows:
[0097] Acquire the mirror-image binocular basic matrix of the annular structured light measurement system and the double annular light stripe image including the annular laser beam projected onto the inner wall and the annular laser beam reflected by the reflector;
[0098] Obtaining the mirror-image binocular basic matrix of the annular structured light measurement system and the double annular light stripe image including the annular laser beam projected onto the inner wall and the annular laser beam reflected by the reflector, including:
[0099] The mirror camera formed by the mirror reflection in the reflector is set as a virtual camera;
[0100] Determine a mirror image binocular basic matrix of the annular structured light measurement system according to a first intrinsic parameter and a first extrinsic parameter of the camera and a second intrinsic parameter and a second extrinsic parameter of the virtual camera;
[0101] The camera is used to photograph the tubular object to be measured, and a double annular light stripe image including the annular laser beam projected onto the inner wall and the annular laser beam reflected by the reflector is obtained.
[0102] Specifically, in step S104, the Steger algorithm is used to extract the coordinates of the center points of the light stripes in the double annular light stripe image, and obtain the real light stripe center point set corresponding to the annular laser beam projected onto the inner wall, the mirror light stripe center point set corresponding to the annular laser beam reflected by the reflector, and the virtual light stripe center point set corresponding to the virtual annular laser beam in the virtual camera, including:
[0103] The Steger algorithm is used to extract the coordinates of the center points of the light stripes in the double annular light stripe image, and the center point set of the real light stripes corresponding to the annular laser beam projected onto the inner wall and the center point set of the mirror light stripes corresponding to the annular laser beam reflected by the reflector are obtained;
[0104] Based on the coordinate relationship between the mirror point in the reflector and the virtual point in the virtual camera, a virtual light strip center point set corresponding to the virtual annular laser beam in the virtual camera corresponding to the mirror light strip center point set is calculated.
[0105] In step S104, the Steger algorithm is used to extract the center point coordinates of the ring laser beam projected onto the inner wall and the center point coordinates of the ring laser beam reflected by the reflector in the double ring light stripe image, and obtain the real light stripe center point set and the mirror light stripe center point set. The Steger algorithm is a prior art and will not be described in detail here.
[0106] Based on the coordinate relationship between the mirror point in the reflector and the virtual point (i.e., the virtual imaging point) in the virtual camera (i.e., the coordinate relationship in step S101 ,in, is the width of the image plane; is the image pixel coordinate of the virtual imaging point, is the horizontal coordinate of the virtual imaging point, is the ordinate of the virtual imaging point; is the image pixel coordinate of the mirror point, is the horizontal coordinate of the mirror point, is the ordinate of the mirror point), the virtual light strip center point set corresponding to the virtual annular laser beam in the virtual camera is calculated by the mirror light strip center point set.
[0107] Specifically, in step S105, based on the mirror image binocular basic matrix and the mirror image light strip center point set, the same-name point set of the real light strip center point set and the virtual light strip center point set is determined by polar coordinate conversion method and epipolar constraint method, including:
[0108] Using a preset polar coordinate conversion formula, taking the center of the double-annular light stripe image as the origin of the polar coordinate system, the two-dimensional coordinates of each real point in the real light stripe center point set and the two-dimensional coordinates of each mirror point in the mirror light stripe center point set are converted into polar coordinates, thereby obtaining the first polar coordinates of each real point in the real light stripe center point set and the second polar coordinates of each mirror point in the mirror light stripe center point set;
[0109] According to the mirror image binocular basic matrix, the epipolar lines corresponding to each virtual point in the center point of the virtual light strip are calculated;
[0110] Based on the intersection points of each polar line and the real light bar center point set, the same-name point set of the real light bar center point set and the virtual light bar center point set is determined in combination with the first polar coordinate and the second polar coordinate.
[0111] It should be noted that the plane formed by any three-dimensional point and the optical center of the camera and the optical center of the virtual camera is called the epipolar plane, the intersection of the epipolar plane with the camera imaging plane and the virtual camera imaging plane is called the epipolar line, the line connecting the optical centers of the two cameras is called the baseline, and the intersection of the baseline with the camera imaging plane and the virtual camera imaging plane is called the pole. In the mirror-viewing binocular structure composed of the camera and the virtual camera in the annular structured light measurement system, the two poles are located near the image center of the camera and the virtual camera, that is, the pole is centralized. When any three-dimensional point forms a projection point on the camera imaging plane, an epipolar line can be drawn on the virtual camera imaging plane, and the projection point on the virtual camera imaging plane is precisely located on this epipolar line, and vice versa.
[0112] In step S105, the preset polar coordinate conversion formula is used to convert the two-dimensional coordinates of each real point in the real light strip center point set and the two-dimensional coordinates of each mirror point in the mirror light strip center point set into polar coordinates, and obtain the first polar coordinates of each real point in the real light strip center point set and the second polar coordinates of each mirror point in the mirror light strip center point set. The preset polar coordinate conversion formula is specifically:
[0113] ;
[0114] in, For point (point is the polar diameter of the real point in the center point set of the real light strip or the mirror point in the center point set of the mirror light strip) in the polar coordinate system, For point The polar angle in polar coordinates is ; For point In the horizontal coordinate of the double ring light stripe image, For point In the vertical coordinate of the double ring light stripe image, is the horizontal coordinate of the center of the double ring light fringe image, is the ordinate of the center of the double annular light stripe image; is the inverse tangent function taking the quadrant into account.
[0115] From the center point of the virtual light bar Select any virtual point , using the mirror image binocular basic matrix, calculate the epipolar lines corresponding to each virtual point , where the superscript T is the transposition symbol, For virtual point The homogeneous coordinates of , F is the basic matrix of the mirror image binocular.
[0116] Specifically, each epipolar line has two intersections with the real light bar center point set; in step S105, based on the intersections of each epipolar line with the real light bar center point set, combined with the first polar coordinates and the second polar coordinates, the same-name point set of the real light bar center point set and the virtual light bar center point set is determined, including:
[0117] Determine the mirror point corresponding to the virtual point corresponding to the epipolar line in the mirror light strip center point set;
[0118] The intersection point with the smaller angle difference between the first polar coordinate and the second polar coordinate of the corresponding mirror point among the two intersection points is determined as the same-name point corresponding to the virtual point corresponding to the polar line;
[0119] All the epipolar lines are traversed to obtain the same-name points of the corresponding virtual points, thereby forming the same-name point set of the real light bar center point set and the virtual light bar center point set.
[0120] It should be noted that the same-name point represents a point of an arbitrary three-dimensional point in an image formed by a camera and a virtual point formed by a virtual image of the arbitrary three-dimensional point in a virtual camera.
[0121] In step S105, the acquired epipolar lines are plotted in the dual-annular light stripe image (one epipolar line is plotted in one dual-annular light stripe image to form a corresponding plurality of dual-annular light stripe images plotted with epipolar lines), so as to find corresponding homonymous points through the epipolar lines. Since the epipolar lines are radially distributed with the epipolar lines as the center, there will be two intersection points between the drawn epipolar lines and the annular light stripes on the dual-annular light stripe image. By using the polar coordinate system, homonymous points of virtual points corresponding to the epipolar lines can be accurately identified from the two intersection points. Based on the coordinate relationship between the mirror point in the reflector and the virtual point in the virtual camera, the corresponding mirror point is determined in the mirror light strip center point set according to the coordinates of each virtual point. The polar coordinate angle difference between the two intersection points and the corresponding mirror point is compared, and the intersection point with the smaller angle difference is determined as the homonymous point corresponding to the virtual point corresponding to the epipolar line, so that the homonymous points of the virtual points corresponding to each epipolar line are obtained in all the dual-annular light stripe images plotted with epipolar lines, and the homonymous point set of the real light strip center point set and the virtual light strip center point set is obtained.
[0122] Among them, if the angles of the first polar coordinates and the second polar coordinates are the same, the corresponding mirror point and the real point are called matching points, that is, the mirror point and the real point at the same polar angle are called matching points.
[0123] Specifically, in step S106, based on the set of points with the same name, the three-dimensional shape of the tubular object to be measured is calculated using a straight-line linear transformation algorithm and a least squares method, including:
[0124] Based on the set of points with the same name, the three-dimensional coordinates of each real point in the center point set of the real light strip are calculated using the linear transformation algorithm and the least square method;
[0125] The tubular object to be measured is moved multiple times to obtain the three-dimensional coordinates of each real point in the center point set of the corresponding real light strip after each movement;
[0126] According to the three-dimensional coordinates obtained after each movement, point cloud fitting is performed to obtain the three-dimensional morphology of the tubular object to be measured.
[0127] In step S106, relative to any three-dimensional point , sent by the camera through the 3D point The optical rays The virtual camera passes through the 3D point The optical rays They will intersect at one point, and the intersection point is the three-dimensional point However, due to the influence of factors such as feature point extraction accuracy and environmental noise, these two optical rays often cannot intersect. Therefore, it is necessary to use the straight line linear transformation algorithm and the least squares method to solve the three-dimensional point The three-dimensional coordinates of are estimated:
[0128] ;
[0129] in, is the coefficient matrix of the equation system; For a 3D point The homogeneous coordinates of ; For a 3D point The horizontal coordinate of the corresponding real point on the double ring light fringe image, For a 3D point The ordinate of the corresponding real point on the double ring light stripe image, For a 3D point The horizontal coordinate of the virtual point corresponding to the double ring light stripe image, For a 3D point The vertical coordinate of the virtual point on the double ring light stripe image; the superscript T is the transposition symbol; is the third row of the camera's projection matrix, is the second row of the camera's projection matrix, is the first row of the camera's projection matrix, is the third row of the projection matrix of the virtual camera, is the second row of the projection matrix of the virtual camera, The first row of the projection matrix of the virtual camera.
[0130] Solve the above redundant equations using the linear transformation algorithm and the least squares method , available The approximate solution of , we get the three-dimensional point The three-dimensional coordinates of . Among them, the straight line linear transformation algorithm and the least squares method are existing algorithms and will not be described in detail here.
[0131] In summary, through the above method, the three-dimensional coordinates of each real point in the center point set of the real light strip are calculated.
[0132] Move the tubular object to be tested multiple times to obtain the three-dimensional coordinates of each real point in the center point set of the corresponding real light strip after each movement, that is, obtain the three-dimensional coordinate information of different positions, and use the obtained multiple sets of three-dimensional coordinates to perform point cloud fitting, such as using the iterative closest point (ICP) algorithm, random sampling consensus (RANSAC) algorithm and other algorithms to perform point cloud fitting to obtain the three-dimensional morphology of the tubular object to be tested. Among them, point cloud fitting is an existing technology and will not be described in detail here.
[0133] As can be seen from the above, the three-dimensional measurement method of the tubular object sets the mirror camera formed by mirror reflection in the reflector as a virtual camera, and obtains the first internal parameter and the first external parameter of the camera and the second internal parameter and the second external parameter of the virtual camera. According to the first internal parameter, the first external parameter, the second internal parameter and the second external parameter, the pose relationship between the camera and the virtual camera is calculated, which is used to calculate the mirror image binocular basic matrix of the camera and the virtual camera in combination with the first internal parameter. The tubular object to be measured is placed in the annular structured light measurement system, and the annular laser projector is started to project an annular laser beam outward to the inner wall of the tubular object to be measured. A double annular light stripe image including an annular laser beam projected to the inner wall and an annular laser beam reflected by the reflector is obtained by using a camera. The Steger algorithm is used to extract the coordinates of the light stripe center points in the double annular light stripe image to obtain the real light stripe center point set corresponding to the annular laser beam projected to the inner wall and the center point set of the real light stripe reflected by the reflector. The mirror light strip center point set corresponding to the annular laser beam emitted by the virtual camera and the virtual light strip center point set corresponding to the virtual annular laser beam in the virtual camera are determined according to the mirror binocular basic matrix and the mirror light strip center point set through the polar coordinate conversion method and the epipolar constraint method to obtain the same-name point set of the real light strip center point set and the virtual light strip center point set. Based on the same-name point set, the three-dimensional shape of the tubular object to be measured is calculated by using the straight line linear transformation algorithm and the least squares method. Therefore, through the annular structured light measurement system, the virtual camera is set, the mirror binocular basic matrix is calculated, the light strip center point coordinates are extracted, the same-name point set is determined, and finally the three-dimensional shape of the tubular object to be measured is calculated, which solves the problem that the existing three-dimensional measurement of tubular objects lacks a method based on the combination of structured light technology based on mirror binocular and annular structured light to measure tubular objects, makes full use of the reflector information in a limited space, and improves the three-dimensional measurement efficiency of tubular objects.
[0134] refer to Figure 2 The present application provides a three-dimensional measurement device for a tubular object, which is applied to a ring structured light measurement system (specifically, Figure 4 As shown in the figure, the ring structured light measurement system can perform three-dimensional measurement on the tubular object, and the ring structured light measurement system includes a camera 101, a ring laser projector 102 and a reflector 103; the camera 101 is arranged opposite to the reflector 103 (the reflector 103 is a single-sided mirror, and the opposite arrangement means that the camera 101 is arranged opposite to the mirror surface of the reflector 103), and the ring laser projector 102 is arranged opposite to the reflector 103;
[0135] The tubular object three-dimensional measuring device comprises:
[0136] An acquisition module 1 is used to set a mirror camera formed by mirror reflection in the reflector as a virtual camera, and to acquire a first intrinsic parameter and a first extrinsic parameter of the camera and a second intrinsic parameter and a second extrinsic parameter of the virtual camera;
[0137] A first calculation module 2 is used to calculate the posture relationship between the camera and the virtual camera according to the first internal parameter, the first external parameter, the second internal parameter and the second external parameter, so as to calculate the basic binocular matrix of the mutual-viewing mirror image between the camera and the virtual camera in combination with the first internal parameter;
[0138] The shooting module 3 is used to place the tubular object to be measured in the annular structured light measurement system, and start the annular laser projector to project the annular laser beam outward to the inner wall of the tubular object to be measured, and then use the camera to capture a double annular light stripe image including the annular laser beam projected to the inner wall and the annular laser beam reflected by the reflector;
[0139] Extraction module 4 is used to extract the coordinates of the center points of the light stripes in the double annular light stripe image by using the Steger algorithm, and obtain the real light stripe center point set corresponding to the annular laser beam projected onto the inner wall, the mirror light stripe center point set corresponding to the annular laser beam reflected by the reflector, and the virtual light stripe center point set corresponding to the virtual annular laser beam in the virtual camera (the real light stripe center point set, the mirror light stripe center point set, and the virtual light stripe center point set refer to the sets of points corresponding to the center of the light stripe width in the annular laser beam, respectively);
[0140] Determination module 5, used for determining the same-name point set of the real light strip center point set and the virtual light strip center point set according to the mirror image binocular basic matrix and the mirror image light strip center point set through polar coordinate conversion method and polar line constraint method;
[0141] The second calculation module 6 is used to calculate the three-dimensional shape of the tubular object to be measured based on the set of points with the same name by using a straight line linear transformation algorithm and a least square method.
[0142] The tubular object three-dimensional measurement device, through the annular structured light measurement system, sets a virtual camera, calculates the mirror image binocular basic matrix, extracts the coordinates of the center point of the light bar, determines the set of points with the same name, and finally calculates the three-dimensional morphology of the tubular object to be measured. The problem that the existing tubular object three-dimensional measurement lacks a method for combining the mirror image binocular structured light technology with the annular structured light to measure the tubular object is solved, and the reflector information in the limited space is fully utilized to improve the three-dimensional measurement efficiency of the tubular object.
[0143] Specifically, Figure 4As shown, a ring structured light measurement system is pre-built, and the ring structured light measurement system includes a camera 101, a ring laser projector 102, and a reflector 103, wherein the camera 101 and the reflector 103 are arranged opposite to each other, so that the camera 101 can not only capture the image of the real object, but also capture the image of the mirror object formed by mirror reflection at the same time, the ring laser projector 102 and the reflector 103 are arranged opposite to each other, and the position and distance between the camera 101 and the ring laser projector 102 are not limited (for example, the camera 101 is arranged above the ring laser projector 102, or the ring laser projector 102 is arranged between the camera 101 and the reflector 103), but it is necessary to ensure that the ring laser beam projected outward by the ring laser projector 102 can be projected onto the inner wall of the tubular object 104 to be measured, and to ensure that the camera 101 can capture the ring laser beam projected onto the inner wall and the mirror image ring laser beam formed by the reflector reflecting the ring laser beam, and try to ensure that the camera's shooting center is maintained near the center line of the tubular object to be measured. Among them, Figure 4 The support plate 107 and the support rod 108 are used to stabilize the annular structured light measurement system to facilitate the subsequent movement of the tubular object to be measured; the annular light stripe 105 is an annular laser beam projected onto the inner wall by the annular laser projector, and the mirror image annular light stripe 106 is a mirror image stripe generated by the reflector reflecting the annular light stripe 105.
[0144] Specifically, when the acquisition module 1 sets the mirror camera formed by mirror reflection in the reflector as a virtual camera and acquires the first intrinsic parameter and the first extrinsic parameter of the camera and the second intrinsic parameter and the second extrinsic parameter of the virtual camera, the acquisition module 1 executes:
[0145] The mirror camera formed by the mirror reflection in the reflector is set as a virtual camera;
[0146] By using Zhang's calibration method, based on the mirror reflection imaging relationship between the camera and the virtual camera, the first intrinsic parameter and the first extrinsic parameter of the camera and the second intrinsic parameter and the second extrinsic parameter of the virtual camera are obtained.
[0147] When the acquisition module 1 is executed, the mirror camera formed by mirror reflection in the reflector is set as a virtual camera. By introducing the concept of virtual camera, this mirror binocular vision structure can be equivalent to a binocular stereoscopic vision structure placed opposite to each other.
[0148] Use a plane target as a calibration plate, use a camera to shoot the plane target at different positions and postures, and obtain multiple plane target images (it is necessary to ensure that the real target image and the mirror target image in the plane target image are visible in the camera at the same time), and use Zhang's calibration method to calibrate the camera to obtain the first intrinsic parameter and the first extrinsic parameter of the camera. The first intrinsic parameter includes the first intrinsic parameter matrix , the first distortion coefficient and the second distortion coefficient , the first external parameter includes the first rotation matrix and the first translation vector Among them, Zhang's calibration method is an existing technology and will not be described in detail here.
[0149] Since the virtual camera is the reflection of the camera in the mirror, their intrinsic parameters are the same, that is, the first intrinsic parameter is equal to the second intrinsic parameter. Virtual imaging point Mirror point The calculation results in:
[0150] ;
[0151] in, is the width of the image plane; is the image pixel coordinate of the virtual imaging point, is the horizontal coordinate of the virtual imaging point, is the ordinate of the virtual imaging point; is the image pixel coordinate of the mirror point, is the horizontal coordinate of the mirror point, is the ordinate of the mirror point.
[0152] Using the homography matrix, the second external parameter of the virtual camera can be solved. The second external parameter includes the second rotation matrix and the second translation vector Among them, the homography matrix is a prior art and will not be described in detail here.
[0153] Specifically, the first calculation module 2 calculates the posture relationship between the camera and the virtual camera according to the first internal parameter, the first external parameter, the second internal parameter and the second external parameter, and calculates the basic binocular matrix of the mirror image between the camera and the virtual camera in combination with the first internal parameter, and executes:
[0154] According to the rigid transformation of the camera and the virtual camera with the world coordinate system respectively, the camera perspective projection model is constructed by combining the first intrinsic parameter, the first extrinsic parameter, the second intrinsic parameter and the second extrinsic parameter;
[0155] Based on the camera perspective projection model, the position relationship between the camera and the virtual camera is calculated;
[0156] According to the first intrinsic parameter and the position and posture relationship, the epipolar plane equation of the annular structured light measurement system is established to extract the mirror image binocular basic matrix of the camera and the virtual camera from the epipolar plane equation.
[0157] When the first calculation module 2 is executed, the rigid transformation between the camera and the virtual camera and the world coordinate system is used, and the first internal parameter, the first external parameter, the second internal parameter and the second external parameter are combined to construct a camera perspective projection model. The camera perspective projection model is specifically:
[0158] ;
[0159] in, is the first scaling factor, is the second scale factor; , , They are , , The homogeneous coordinates of , , Respectively represent the coordinates of any three-dimensional point in the camera coordinate system, the virtual camera coordinate system and the world coordinate system; is the camera's projection matrix, is the projection matrix of the virtual camera, and A is the first intrinsic parameter matrix.
[0160] Based on the camera perspective projection model, the pose relationship between the camera and the virtual camera is calculated. The pose relationship between the camera and the virtual camera is as follows:
[0161] ;
[0162] in, is the third rotation matrix, yes The rotation matrix of is the third translation vector, yes The translation vector of and the third translation vector Used to represent the coordinate transformation relationship from camera to virtual camera.
[0163] In order to specifically solve the pose relationship between the two cameras, the feature points in the target coordinate system can be And its corresponding feature points of the plane target image ( and For the same 3D point in different coordinate systems, establish the following objective optimization function:
[0164] ;
[0165] in, is the reprojection error of all target feature points, Indicates The feature point coordinates of a virtual target image (a plane target image in a virtual camera coordinate system), is the coordinate of the feature point in the corresponding target coordinate system, and Respectively represent The rotation matrix and translation vector between the target coordinate system and the camera coordinate system in the plane target image; is the distortion coefficient, including the first distortion coefficient and the second distortion coefficient ; M is the total number of virtual target images, and N is the number of three-dimensional points.
[0166] In summary, the pose relationship between the camera and the virtual camera is calculated through the target optimization function.
[0167] According to the first internal parameter matrix in the first internal parameter Relationship with posture , establish the epipolar plane equation of the annular structured light measurement system, the epipolar plane equation is specifically:
[0168] ;
[0169] in, is the third translation vector The antisymmetric matrix of .
[0170] Let the epipolar plane equation , thereby extracting F to obtain the mirror image binocular basic matrix.
[0171] Specifically, when the shooting module 3 is executed, the tubular object to be measured is placed in the annular structured light measurement system, and the annular laser projector is started to project an annular laser beam outward to the inner wall of the tubular object, and then a camera is used to capture a double annular light stripe image including the annular laser beam projected to the inner wall and the annular laser beam reflected by the reflector. When measuring a large tubular object to be measured (the inner diameter of the large tubular object to be measured is sufficient to accommodate the annular structured light measurement system), the annular structured light measurement system can be placed inside the tubular object to be measured (such as Figure 4 As shown), the camera can capture a double annular light stripe image including the annular laser beam projected onto the inner wall and the annular laser beam reflected by the reflector; when measuring a small tubular object to be measured (the inner diameter of the small tubular object to be measured is not sufficient to accommodate the annular structured light measurement system), the annular structured light measurement system can be placed outside the tubular object to be measured, that is, the tubular object to be measured is placed between the camera and the reflector, so that the camera can capture a double annular light stripe image including the annular laser beam projected onto the inner wall and the annular laser beam reflected by the reflector.
[0172] In some embodiments, the tubular object to be measured can be placed in the annular structured light measurement system in advance, so as to start the annular laser projector to project the annular laser beam outward to the inner wall of the tubular object, and then the above-mentioned calculation method (i.e., the corresponding steps performed by the acquisition module 1 and the corresponding steps performed by the first calculation module 2) is used to obtain the mirror image binocular basic matrix of the annular structured light measurement system and use the camera to obtain a double annular light stripe image including the annular laser beam projected to the inner wall and the annular laser beam reflected by the reflector; thereby, the acquisition module 1, the first calculation module 2 and the shooting module 3 are correspondingly modified as follows:
[0173] An acquisition module, used to acquire a mirror-image binocular basic matrix of the annular structured light measurement system and a double annular light stripe image including an annular laser beam projected onto the inner wall and an annular laser beam reflected by a reflector;
[0174] Obtaining the mirror-image binocular basic matrix of the annular structured light measurement system and the double annular light stripe image including the annular laser beam projected onto the inner wall and the annular laser beam reflected by the reflector, including:
[0175] The mirror camera formed by the mirror reflection in the reflector is set as a virtual camera;
[0176] Determine a mirror image binocular basic matrix of the annular structured light measurement system according to a first intrinsic parameter and a first extrinsic parameter of the camera and a second intrinsic parameter and a second extrinsic parameter of the virtual camera;
[0177] The camera is used to photograph the tubular object to be measured, and a double annular light stripe image including the annular laser beam projected onto the inner wall and the annular laser beam reflected by the reflector is obtained.
[0178] Specifically, when the extraction module 4 uses the Steger algorithm to extract the coordinates of the center points of the light stripes in the double annular light stripe image, and obtains the real light stripe center point set corresponding to the annular laser beam projected onto the inner wall, the mirror light stripe center point set corresponding to the annular laser beam reflected by the reflector, and the virtual light stripe center point set corresponding to the virtual annular laser beam in the virtual camera, the following is executed:
[0179] The Steger algorithm is used to extract the coordinates of the center points of the light stripes in the double annular light stripe image, and the center point set of the real light stripes corresponding to the annular laser beam projected onto the inner wall and the center point set of the mirror light stripes corresponding to the annular laser beam reflected by the reflector are obtained;
[0180] Based on the coordinate relationship between the mirror point in the reflector and the virtual point in the virtual camera, a virtual light strip center point set corresponding to the virtual annular laser beam in the virtual camera corresponding to the mirror light strip center point set is calculated.
[0181] When the extraction module 4 is executed, the Steger algorithm is used to extract the center point coordinates of the light stripes of the annular laser beam projected onto the inner wall and the center point coordinates of the light stripes of the annular laser beam reflected by the reflector in the double annular light stripe image, and obtain the real light stripe center point set and the mirror light stripe center point set. The Steger algorithm is a prior art and will not be described in detail here.
[0182] Based on the coordinate relationship between the mirror point in the reflector and the virtual point (i.e., the virtual imaging point) in the virtual camera (i.e., the acquisition module 1 executes the corresponding steps in ,in, is the width of the image plane; is the image pixel coordinate of the virtual imaging point, is the horizontal coordinate of the virtual imaging point, is the ordinate of the virtual imaging point; is the image pixel coordinate of the mirror point, is the horizontal coordinate of the mirror point, is the ordinate of the mirror point), the virtual light strip center point set corresponding to the virtual annular laser beam in the virtual camera is calculated by the mirror light strip center point set.
[0183] Specifically, when the determination module 5 determines the same-name point set of the real light bar center point set and the virtual light bar center point set based on the mirror image binocular basic matrix and the mirror image light bar center point set through the polar coordinate conversion method and the epipolar constraint method, it executes:
[0184] Using a preset polar coordinate conversion formula, taking the center of the double-annular light stripe image as the origin of the polar coordinate system, the two-dimensional coordinates of each real point in the real light stripe center point set and the two-dimensional coordinates of each mirror point in the mirror light stripe center point set are converted into polar coordinates, thereby obtaining the first polar coordinates of each real point in the real light stripe center point set and the second polar coordinates of each mirror point in the mirror light stripe center point set;
[0185] According to the mirror image binocular basic matrix, the epipolar lines corresponding to each virtual point in the center point of the virtual light strip are calculated;
[0186] Based on the intersection points of each polar line and the real light bar center point set, the same-name point set of the real light bar center point set and the virtual light bar center point set is determined in combination with the first polar coordinate and the second polar coordinate.
[0187] It should be noted that the plane formed by any three-dimensional point and the optical center of the camera and the optical center of the virtual camera is called the epipolar plane, the intersection of the epipolar plane with the camera imaging plane and the virtual camera imaging plane is called the epipolar line, the line connecting the optical centers of the two cameras is called the baseline, and the intersection of the baseline with the camera imaging plane and the virtual camera imaging plane is called the pole. In the mirror-viewing binocular structure composed of the camera and the virtual camera in the annular structured light measurement system, the two poles are located near the image center of the camera and the virtual camera, that is, the pole is centralized. When any three-dimensional point forms a projection point on the camera imaging plane, an epipolar line can be drawn on the virtual camera imaging plane, and the projection point on the virtual camera imaging plane is precisely located on this epipolar line, and vice versa.
[0188] When the determination module 5 is executed, the preset polar coordinate conversion formula is used, and the center (or pole or camera optical center) of the double-ring light stripe image is used as the origin of the polar coordinate system, and the two-dimensional coordinates of each real point in the real light stripe center point set and the two-dimensional coordinates of each mirror point in the mirror light stripe center point set are converted into polar coordinates, so as to obtain the first polar coordinates of each real point in the real light stripe center point set and the second polar coordinates of each mirror point in the mirror light stripe center point set. The preset polar coordinate conversion formula is specifically:
[0189] ;
[0190] in, For point (point is the polar diameter of the real point in the center point set of the real light strip or the mirror point in the center point set of the mirror light strip) in the polar coordinate system, For point The polar angle in polar coordinates is ; For point In the horizontal coordinate of the double ring light stripe image, For point In the vertical coordinate of the double ring light stripe image, is the horizontal coordinate of the center of the double ring light fringe image, is the ordinate of the center of the double annular light stripe image; is the inverse tangent function taking the quadrant into account.
[0191] From the center point of the virtual light bar Select any virtual point , using the mirror image binocular basic matrix, calculate the epipolar lines corresponding to each virtual point , where the superscript T is the transposition symbol, For virtual point The homogeneous coordinates of , F is the basic matrix of the mirror image binocular.
[0192] Specifically, each polar line has two intersections with the real light bar center point set; when the determination module 5 determines the point set with the same name of the real light bar center point set and the virtual light bar center point set based on the intersections of each polar line with the real light bar center point set, combined with the first polar coordinates and the second polar coordinates, the determination module 5 executes:
[0193] Determine the mirror point corresponding to the virtual point corresponding to the epipolar line in the mirror light strip center point set;
[0194] Determine the intersection point with the smaller angle difference between the first polar coordinate and the second polar coordinate of the corresponding mirror image point among the two intersection points as the same-name point corresponding to the virtual point corresponding to the polar line;
[0195] All the epipolar lines are traversed to obtain the same-name points of the corresponding virtual points, thereby forming the same-name point set of the real light bar center point set and the virtual light bar center point set.
[0196] It should be noted that the same-name point represents a point of an arbitrary three-dimensional point in an image formed by a camera and a virtual point formed by a virtual image of the arbitrary three-dimensional point in a virtual camera.
[0197] When the determination module 5 is executed, the acquired polar lines are plotted in the dual-annular light stripe image (one polar line is plotted in one dual-annular light stripe image to form a corresponding plurality of dual-annular light stripe images plotted with polar lines), so as to find corresponding homonymous points through the polar lines. Since the polar lines are radially distributed with the polar lines as the center, there will be two intersection points between the drawn polar lines and the annular light stripes on the dual-annular light stripe image. By using the polar coordinate system, the homonymous points of the virtual points corresponding to the polar lines can be accurately identified from the two intersection points. Based on the coordinate relationship between the mirror point in the reflector and the virtual point in the virtual camera, the corresponding mirror point is determined in the mirror light strip center point set according to the coordinates of each virtual point. The polar coordinate angle difference between the two intersection points and the corresponding mirror point is compared, and the intersection point with the smaller angle difference is determined as the homonymous point corresponding to the virtual point corresponding to the polar line, so that the homonymous points of the virtual points corresponding to each polar line are obtained in all the dual-annular light stripe images plotted with polar lines, and the homonymous point set of the real light strip center point set and the virtual light strip center point set is obtained.
[0198] Among them, if the angles of the first polar coordinates and the second polar coordinates are the same, the corresponding mirror point and the real point are called matching points, that is, the mirror point and the real point at the same polar angle are called matching points.
[0199] Specifically, when the second calculation module 6 calculates the three-dimensional shape of the tubular object to be measured based on the set of points with the same name by using the straight-line linear transformation algorithm and the least square method, it executes:
[0200] Based on the set of points with the same name, the three-dimensional coordinates of each real point in the center point set of the real light strip are calculated using the linear transformation algorithm and the least square method;
[0201] The tubular object to be measured is moved multiple times to obtain the three-dimensional coordinates of each real point in the center point set of the corresponding real light strip after each movement;
[0202] According to the three-dimensional coordinates obtained after each movement, point cloud fitting is performed to obtain the three-dimensional morphology of the tubular object to be measured.
[0203] When the second calculation module 6 is executed, relative to any three-dimensional point , sent by the camera through the 3D point The optical rays The virtual camera passes through the 3D point The optical rays They will intersect at one point, and the intersection point is the three-dimensional point However, due to the influence of factors such as feature point extraction accuracy and environmental noise, these two optical rays often cannot intersect. Therefore, it is necessary to use the straight line linear transformation algorithm and the least squares method to solve the three-dimensional point The three-dimensional coordinates of are estimated:
[0204] ;
[0205] in, is the coefficient matrix of the equation system; For a 3D point The homogeneous coordinates of ; For a 3D point The horizontal coordinate of the corresponding real point on the double ring light fringe image, For a 3D point The ordinate of the corresponding real point on the double ring light stripe image, For a 3D point The horizontal coordinate of the virtual point corresponding to the double ring light stripe image, For a 3D point The vertical coordinate of the virtual point on the double ring light stripe image; the superscript T is the transposition symbol; is the third row of the camera's projection matrix, is the second row of the camera's projection matrix, is the first row of the camera's projection matrix, is the third row of the projection matrix of the virtual camera, is the second row of the projection matrix of the virtual camera, The first row of the projection matrix of the virtual camera.
[0206] Solve the above redundant equations using the linear transformation algorithm and the least squares method , available The approximate solution of , we get the three-dimensional point The three-dimensional coordinates of . Among them, the straight line linear transformation algorithm and the least squares method are existing algorithms and will not be described in detail here.
[0207] In summary, through the above method, the three-dimensional coordinates of each real point in the center point set of the real light strip are calculated.
[0208] Move the tubular object to be tested multiple times to obtain the three-dimensional coordinates of each real point in the center point set of the corresponding real light strip after each movement, that is, obtain the three-dimensional coordinate information of different positions, and use the obtained multiple sets of three-dimensional coordinates to perform point cloud fitting, such as using the iterative closest point (ICP) algorithm, random sampling consensus (RANSAC) algorithm and other algorithms to perform point cloud fitting to obtain the three-dimensional morphology of the tubular object to be tested. Among them, point cloud fitting is an existing technology and will not be described in detail here.
[0209] As can be seen from the above, the three-dimensional measurement device for tubular objects sets a mirror camera formed by mirror reflection in the reflector as a virtual camera, obtains a first internal parameter and a first external parameter of the camera and a second internal parameter and a second external parameter of the virtual camera, calculates the position and posture relationship between the camera and the virtual camera according to the first internal parameter, the first external parameter, the second internal parameter and the second external parameter, and calculates the mirror image binocular basic matrix of the camera and the virtual camera in combination with the first internal parameter, places the tubular object to be measured in the annular structured light measurement system, and starts the annular laser projector to project an annular laser beam outward to the inner wall of the tubular object to be measured, uses the camera to capture a double annular light stripe image including an annular laser beam projected to the inner wall and an annular laser beam reflected by the reflector, and uses the Steger algorithm to extract the coordinates of the light stripe center points in the double annular light stripe image to obtain a real light stripe center point set corresponding to the annular laser beam projected to the inner wall and a real light stripe center point set corresponding to the annular laser beam reflected by the reflector. The mirror light strip center point set corresponding to the annular laser beam emitted by the virtual camera and the virtual light strip center point set corresponding to the virtual annular laser beam in the virtual camera are determined according to the mirror binocular basic matrix and the mirror light strip center point set through the polar coordinate conversion method and the epipolar constraint method to obtain the same-name point set of the real light strip center point set and the virtual light strip center point set. Based on the same-name point set, the three-dimensional shape of the tubular object to be measured is calculated by using the straight line linear transformation algorithm and the least squares method. Therefore, through the annular structured light measurement system, the virtual camera is set, the mirror binocular basic matrix is calculated, the light strip center point coordinates are extracted, the same-name point set is determined, and finally the three-dimensional shape of the tubular object to be measured is calculated, which solves the problem that the existing three-dimensional measurement of tubular objects lacks a method based on the combination of structured light technology based on mirror binocular and annular structured light to measure tubular objects, makes full use of the reflector information in a limited space, and improves the three-dimensional measurement efficiency of tubular objects.
[0210] Please refer to Figure 3 , Figure 3A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the present application provides an electronic device, including: a processor 301 and a memory 302, the processor 301 and the memory 302 are interconnected and communicate with each other through a communication bus 303 and / or other forms of connection mechanisms (not shown), the memory 302 stores a computer program executable by the processor 301, when the electronic device is running, the processor 301 executes the computer program to execute the three-dimensional measurement method of a tubular object in any optional implementation of the above embodiment, to achieve the following functions: setting a mirror camera formed by mirror reflection in the reflector as a virtual camera, and obtaining a first internal parameter and a first external parameter of the camera and a second internal parameter and a second external parameter of the virtual camera, and calculating the posture relationship between the camera and the virtual camera according to the first internal parameter, the first external parameter, the second internal parameter and the second external parameter, so as to calculate the mutual-viewing mirror binocular of the camera and the virtual camera in combination with the first internal parameter. The basic matrix is used to place the tubular object to be measured in the annular structured light measurement system, and the annular laser projector is started to project the annular laser beam outward to the inner wall of the tubular object to be measured. A camera is used to obtain a double annular light stripe image including the annular laser beam projected to the inner wall and the annular laser beam reflected by the reflector. The coordinates of the light stripe center points in the double annular light stripe image are extracted by using the Steger algorithm to obtain the real light stripe center point set corresponding to the annular laser beam projected to the inner wall, the mirror light stripe center point set corresponding to the annular laser beam reflected by the reflector, and the virtual light stripe center point set corresponding to the virtual annular laser beam in the virtual camera. According to the mirror image binocular basic matrix and the mirror light stripe center point set, the same-name point set of the real light stripe center point set and the virtual light stripe center point set is determined by the polar coordinate conversion method and the polar line constraint method. Based on the same-name point set, the straight line linear transformation algorithm and the least squares method are used to calculate the three-dimensional morphology of the tubular object to be measured.
[0211] The embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the three-dimensional measurement method of a tubular object in any optional implementation of the above embodiment is executed to achieve the following functions: a mirror camera formed by mirror reflection in a reflector is set as a virtual camera, and a first internal parameter and a first external parameter of the camera and a second internal parameter and a second external parameter of the virtual camera are obtained; a posture relationship between the camera and the virtual camera is calculated based on the first internal parameter, the first external parameter, the second internal parameter and the second external parameter, so as to calculate a basic mirror image binocular matrix between the camera and the virtual camera in combination with the first internal parameter; a tubular object to be measured is placed in an annular structured light measurement system, and an annular laser projector is started to project an annular laser beam outward to the tubular object to be measured After the inner wall of the tube is measured, a camera is used to capture a double-annular light stripe image including an annular laser beam projected onto the inner wall and an annular laser beam reflected by the reflector. The coordinates of the light stripe center points in the double-annular light stripe image are extracted using the Steger algorithm to obtain a real light stripe center point set corresponding to the annular laser beam projected onto the inner wall, a mirror light stripe center point set corresponding to the annular laser beam reflected by the reflector, and a virtual light stripe center point set corresponding to the virtual annular laser beam in the virtual camera. According to the mirror image binocular basic matrix and the mirror light stripe center point set, the same-name point set of the real light stripe center point set and the virtual light stripe center point set is determined by the polar coordinate conversion method and the polar line constraint method. Based on the same-name point set, the three-dimensional morphology of the tubular object to be measured is calculated using the straight-line linear transformation algorithm and the least squares method. Among them, the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0212] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0213] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0214] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0215] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0216] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for three-dimensional measurement of a tubular object, applied to a ring structured light measurement system to perform three-dimensional measurement of the tubular object, characterized in that: The annular structured light measurement system comprises a camera, an annular laser projector and a reflector; the camera is arranged opposite to the reflector, and the annular laser projector is arranged opposite to the reflector; The three-dimensional measurement method of a tubular object comprises the following steps: Setting a mirror camera formed by mirror reflection in the reflector as a virtual camera, and obtaining a first intrinsic parameter and a first extrinsic parameter of the camera and a second intrinsic parameter and a second extrinsic parameter of the virtual camera; Calculate the position relationship between the camera and the virtual camera according to the first internal parameter, the first external parameter, the second internal parameter and the second external parameter, so as to calculate the mirror image binocular basic matrix between the camera and the virtual camera in combination with the first internal parameter; The tubular object to be measured is placed in the annular structured light measurement system, and the annular laser projector is started to project an annular laser beam outward to the inner wall of the tubular object to be measured, and then the camera is used to capture a double annular light stripe image including the annular laser beam projected to the inner wall and the annular laser beam reflected by the reflector; The Steger algorithm is used to extract the coordinates of the center points of the light stripes in the double annular light stripe image, and the real light stripe center point set corresponding to the annular laser beam projected onto the inner wall, the mirror light stripe center point set corresponding to the annular laser beam reflected by the reflector, and the virtual light stripe center point set corresponding to the virtual annular laser beam in the virtual camera are obtained; According to the mirror image binocular basic matrix and the mirror image light strip center point set, the same-name point set of the real light strip center point set and the virtual light strip center point set is determined by polar coordinate conversion method and epipolar constraint method; Based on the set of points with the same name, the three-dimensional shape of the tubular object to be measured is calculated using a straight-line linear transformation algorithm and a least squares method; According to the first internal parameter, the first external parameter, the second internal parameter and the second external parameter, a posture relationship between the camera and the virtual camera is calculated, so as to combine the first internal parameter to calculate a binocular basic matrix of the mutual-viewing mirror image between the camera and the virtual camera, including: According to the rigid transformations of the camera and the virtual camera with the world coordinate system respectively, in combination with the first intrinsic parameter, the first extrinsic parameter, the second intrinsic parameter and the second extrinsic parameter, a camera perspective projection model is constructed; Based on the camera perspective projection model, calculating the position relationship between the camera and the virtual camera; According to the first internal parameter and the position and posture relationship, an epipolar plane equation of the annular structured light measurement system is established to extract a binocular basic matrix of the mutual-viewing mirror image between the camera and the virtual camera from the epipolar plane equation; The first internal parameter includes a first internal parameter matrix, a first distortion coefficient and a second distortion coefficient, the first external parameter includes a first rotation matrix and a first translation vector, the second internal parameter is the same as the first internal parameter, and the second external parameter includes a second rotation matrix and a second translation vector.
2. The three-dimensional measurement method of a tubular object according to claim 1, characterized in that: The mirror camera formed by mirror reflection in the reflector is set as a virtual camera, and a first internal parameter and a first external parameter of the camera and a second internal parameter and a second external parameter of the virtual camera are obtained, including: Setting a mirror camera formed by mirror reflection in the reflector as a virtual camera; By using Zhang's calibration method, based on the mirror reflection imaging relationship between the camera and the virtual camera, a first intrinsic parameter and a first extrinsic parameter of the camera and a second intrinsic parameter and a second extrinsic parameter of the virtual camera are obtained.
3. The three-dimensional measurement method of a tubular object according to claim 1, characterized in that: The Steger algorithm is used to extract the coordinates of the center points of the light stripes in the double annular light stripe image, and obtain the real light stripe center point set corresponding to the annular laser beam projected onto the inner wall, the mirror light stripe center point set corresponding to the annular laser beam reflected by the reflector, and the virtual light stripe center point set corresponding to the virtual annular laser beam in the virtual camera, including: Using the Steger algorithm, the coordinates of the center points of the light stripes in the double annular light stripe image are extracted to obtain a set of real light stripe center points corresponding to the annular laser beam projected onto the inner wall and a set of mirror light stripe center points corresponding to the annular laser beam reflected by the reflector; Based on the coordinate relationship between the mirror point in the reflector and the virtual point in the virtual camera, a virtual light strip center point set corresponding to the virtual annular laser beam in the virtual camera corresponding to the mirror light strip center point set is calculated.
4. The method for three-dimensional measurement of a tubular object according to claim 1, characterized in that: According to the mirror image binocular basic matrix and the mirror image light strip center point set, the same-name point set of the real light strip center point set and the virtual light strip center point set is determined by polar coordinate conversion method and epipolar constraint method, including: Using a preset polar coordinate conversion formula, taking the center of the double annular light stripe image as the origin of the polar coordinate system, the two-dimensional coordinates of each real point in the real light stripe center point set and the two-dimensional coordinates of each mirror point in the mirror light stripe center point set are converted into polar coordinates, so as to obtain the first polar coordinates of each real point in the real light stripe center point set and the second polar coordinates of each mirror point in the mirror light stripe center point set; According to the mirror image binocular basic matrix, the epipolar lines corresponding to the virtual points in the center point of the virtual light strip are calculated; Based on the intersection points of each of the polar lines and the real light bar center point set, in combination with the first polar coordinates and the second polar coordinates, a point set with the same name as the real light bar center point set and the virtual light bar center point set is determined.
5. The method for three-dimensional measurement of a tubular object according to claim 4, characterized in that: Each of the epipolar lines has two intersection points with the real light bar center point set; based on the intersection points of each of the epipolar lines with the real light bar center point set, combined with the first polar coordinates and the second polar coordinates, determining the same-name point set of the real light bar center point set and the virtual light bar center point set, including: Determining, in the center point set of the mirror light strip, a mirror point corresponding to a virtual point corresponding to the epipolar line; Determine the intersection point with the smaller angle difference between the first polar coordinate and the second polar coordinate of the corresponding mirror point among the two intersection points as the same-name point corresponding to the virtual point corresponding to the polar line; All the epipolar lines are traversed to obtain the same-name points of the corresponding virtual points, thereby forming the same-name point set of the real light bar center point set and the virtual light bar center point set.
6. The method for three-dimensional measurement of a tubular object according to claim 1, characterized in that: Based on the set of points with the same name, the three-dimensional shape of the tubular object to be measured is calculated using a straight-line linear transformation algorithm and a least square method, including: Based on the point set with the same name, the three-dimensional coordinates of each real point in the center point set of the real light strip are calculated by using a straight line linear transformation algorithm and a least square method; Moving the tubular object to be measured multiple times to obtain the three-dimensional coordinates of each real point in the center point set of the corresponding real light strip after each movement; Point cloud fitting is performed according to the three-dimensional coordinates obtained after each movement to obtain the three-dimensional morphology of the tubular object to be measured.
7. A three-dimensional measurement device for a tubular object, applied to a ring structured light measurement system to perform three-dimensional measurement of a tubular object, characterized in that: The annular structured light measurement system includes a camera, an annular laser projector and a reflector; The camera is arranged opposite to the reflector, and the annular laser projector is arranged opposite to the reflector; The tubular object three-dimensional measurement device comprises: An acquisition module, used for setting a mirror camera formed by mirror reflection in the reflector as a virtual camera, and acquiring a first intrinsic parameter and a first extrinsic parameter of the camera and a second intrinsic parameter and a second extrinsic parameter of the virtual camera; A first calculation module, used for calculating the posture relationship between the camera and the virtual camera according to the first internal parameter, the first external parameter, the second internal parameter and the second external parameter, so as to calculate the mirror image binocular basic matrix between the camera and the virtual camera in combination with the first internal parameter; A shooting module, used for placing the tubular object to be measured in the annular structured light measurement system, and starting the annular laser projector to project an annular laser beam outward to the inner wall of the tubular object to be measured, and then using the camera to shoot to obtain a double annular light stripe image including the annular laser beam projected to the inner wall and the annular laser beam reflected by the reflector; An extraction module is used to extract the coordinates of the center points of the light stripes in the double annular light stripe image by using the Steger algorithm, and obtain a set of real light stripe center points corresponding to the annular laser beam projected onto the inner wall, a set of mirror light stripe center points corresponding to the annular laser beam reflected by the reflector, and a set of virtual light stripe center points corresponding to the virtual annular laser beam in the virtual camera; A determination module, for determining, according to the mirror image binocular basic matrix and the mirror image light strip center point set, a point set with the same name as the real light strip center point set and the virtual light strip center point set by using a polar coordinate conversion method and an epipolar constraint method; A second calculation module is used to calculate the three-dimensional shape of the tubular object to be measured based on the set of points with the same name by using a straight-line linear transformation algorithm and a least square method; The first calculation module is used to calculate the posture relationship between the camera and the virtual camera according to the first internal parameter, the first external parameter, the second internal parameter and the second external parameter, so as to calculate the mirror image binocular basic matrix between the camera and the virtual camera in combination with the first internal parameter, including: According to the rigid transformations of the camera and the virtual camera with the world coordinate system respectively, in combination with the first intrinsic parameter, the first extrinsic parameter, the second intrinsic parameter and the second extrinsic parameter, a camera perspective projection model is constructed; Based on the camera perspective projection model, calculating the position relationship between the camera and the virtual camera; According to the first internal parameter and the position and posture relationship, an epipolar plane equation of the annular structured light measurement system is established to extract a binocular basic matrix of the mutual-viewing mirror image between the camera and the virtual camera from the epipolar plane equation; The first internal parameter includes a first internal parameter matrix, a first distortion coefficient and a second distortion coefficient, the first external parameter includes a first rotation matrix and a first translation vector, the second internal parameter is the same as the first internal parameter, and the second external parameter includes a second rotation matrix and a second translation vector.
8. An electronic device, characterized in that: The system comprises a processor and a memory, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the steps in the three-dimensional measurement method of a tubular object as claimed in any one of claims 1 to 6 are executed.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the three-dimensional measurement method of a tubular object according to any one of claims 1 to 6 are executed.
Citation Information
Patent Citations
Light stripe center extraction tracking method based on space-time tracking
CN106023247A
Annular laser pipeline detection system and method based on triangulation principle
CN115046499A