A machine vision-based method for accurately identifying multi-dimensional features of a drill hole
Patent Information
- Application Number
- CN202311441411.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2043-10-31
AI Technical Summary
[0005]本发明所要解决的技术问题是现有技术在复杂施工环境下无法实现钻孔的坐标、倾角及半径等钻孔多维特征的精准识别问题
[0016] Beneficial effects: This invention proposes a method for accurate identification of multi-dimensional features in boreholes based on machine vision. Firstly, it uses a vision camera to... The target borehole was photographed from various locations to obtain...
The image is generated by first obtaining a frame of borehole region image; then, for each frame of borehole region image, image preprocessing operations such as distortion correction, grayscale conversion, and adaptive histogram balancing are performed sequentially to obtain an initial image.
An initial image group composed of the initial images is input into an ellipse fitter to obtain the result.
A group of orifice profile ellipses composed of orifice profile ellipses; and according to
Frame drilling area image obtained
Each frame sequence will
Each frame sequence is constructed into a frame sequence group, and a setting is made on the initial frame of each frame sequence.
Anchor points; then, the anchor point tracking algorithm is used to determine the mapping pixel set of each anchor point in each frame sequence, and...
A mapping image point set is formed by mapping image points. An anchor point tracking algorithm can be used to track anchor points on the elliptical borehole profile, solving the problem of difficulty in calibrating feature points in multi-view visual positioning of elliptical borehole profiles. Then, the spatial coordinates of each anchor point are calculated based on the mapping image point set using the direct linear transformation method and singular value decomposition method. Next, the high residual filtering method is used to remove large fractional frames from the frame sequence set to obtain the remaining frame sequence. Large residual anchor points in the remaining frame sequence are then removed to obtain the final anchor point set. The high residual filtering method can eliminate erroneous mappings to improve positioning accuracy. Then, the borehole plane and borehole profile ellipse feature information are obtained by solving the spatial coordinates of each anchor point in the anchor point set. Based on the borehole profile ellipse feature information, the borehole azimuth and borehole radius are solved to obtain the fitting result. Finally, the fitting result is verified by using the reprojection verification method, which can verify the quality of the fitted borehole, improve the stability of the fitting result, improve the fitting accuracy of the multidimensional features of the target borehole, and achieve robust fitting of multidimensional features of boreholes in complex on-site construction environments such as tunnels and underground power plants.
Smart Images

Figure CN117522794B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image data processing, and specifically relates to a method for accurate recognition of multi-dimensional features of boreholes based on machine vision. Background Technology
[0002] With the increasing mechanization of engineering, more and more traditional manual processes are being replaced by mechanized and automated equipment, with drilling being a prime example. A typical drilling cycle can be summarized as "layout-drilling-hole location," during which the borehole needs to be inspected to achieve automatic positioning, thus enabling fully automated, safe, and rapid drilling construction. For automatic borehole positioning, image-based methods for detecting borehole ellipses only require one or several industrial cameras to achieve monocular or multi-view positioning, avoiding expensive and complex equipment such as 3D laser scanning, offering advantages such as simple deployment and low cost. Therefore, the rapid and accurate detection of borehole ellipses in complex images is of great significance in computer vision, automated inspection, and assembly.
[0003] Currently, existing technologies typically employ methods such as calculating optical flow changes or local grayscale changes in images from different viewpoints to obtain the positional changes of certain feature points under different viewpoints, and then using parallax localization to determine the spatial coordinates of these feature points. However, existing technologies typically target circular surfaces, spheres, or a single point in space, and the obtained localization results are at most the center of the circle, the center of the sphere, and the radius. Existing technologies are not well-suited for situations where the borehole opening profile is elliptical, such as drilling operations. Furthermore, there is currently no relevant technology to support engineering requirements that further determine multi-dimensional borehole features such as drilling inclination angle and diameter based on the borehole opening profile.
[0004] Therefore, how to provide a machine vision-based method for accurate identification of multi-dimensional borehole features, so as to accurately fit the multi-dimensional features of boreholes in complex construction environments, is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] The technical problem to be solved by the present invention is that the existing technology cannot accurately identify the multi-dimensional features of boreholes, such as coordinates, inclination angle and radius, in complex construction environments.
[0006] To address the aforementioned problems, this invention provides a machine vision-based method for accurate identification of multi-dimensional features in boreholes, comprising: S1 using a vision camera to... The target borehole was photographed from various locations to obtain... S2 performs image preprocessing operations such as distortion correction, grayscale conversion, and adaptive histogram balancing on each frame of the drilled area image to obtain an initial image. The initial images described above are combined into an initial image group, and the initial image group is input into an ellipse fitter to obtain the result. A group of orifice profile ellipses composed of individual orifice profile ellipses; S3 according to The image of the borehole area obtained from the frame Each frame sequence will The aforementioned frame sequences are constructed into a frame sequence group, and a setting is set on the initial frame of each frame sequence. Anchor points; S4 uses an anchor point tracking algorithm to determine the set of mapped pixels for each anchor point in each frame sequence, S5: A set of mapped image points is formed into a mapped image point group; S6: The spatial coordinates of each anchor point are calculated based on the mapped image point group using the direct linear transformation method and singular value decomposition method; S7: The high residual filtering method is used to delete large fractional frame sequences from the frame sequence group to obtain the remaining frame sequence, and large residual anchor points in the remaining frame sequence are deleted to obtain the final anchor point group; S8: The borehole plane and borehole contour ellipse feature information are obtained by solving the spatial coordinates of each anchor point in the anchor point group, and the borehole azimuth and borehole radius are solved based on the borehole contour ellipse feature information to obtain the fitting result; S9: The fitting result is verified by the reprojection verification method to obtain the multidimensional features of the target borehole.
[0007] As a further technical solution of the present invention, in S3, the method according to The image of the borehole area obtained from the frame Each frame sequence will Constructing the frame sequence into a frame sequence group includes: The image of the drilled area in the frame Combined into frame groups ; Determine from the frame group according to equation (1) Frame sequence ,Will The frame sequence Constructed into frame sequence groups ; In the above formula (1), Image of one of the drilled areas within the frame group. Images of other drilled areas within the frame group The mapping.
[0008] As a further technical solution of the present invention, in S4, the anchor point tracking algorithm is used to determine the mapping pixel set of each anchor point in each frame sequence, and then... The mapping image point group consists of a set of mapped image points, including: S401 For a certain frame sequence, the epipolar line corresponding to each anchor point is calculated according to equation (2), and the result is obtained. polar lines; In the above formula (2), For the first An anchor point at any visual camera Image points in For any vision camera The intrinsic parameter matrix, For any vision camera antisymmetric matrix, For the initial visual camera To any visual camera The rotation matrix, For initial vision camera The intrinsic parameter matrix, For the first An anchor point at the initial vision camera Image points in For the initial visual camera To any visual camera The translation distance in the X direction, For the initial visual camera To any visual camera The translation distance in the Y direction, For the initial visual camera To any visual camera The translation distance in the Z direction; S402 The intersection of the epipolar line and the corresponding ellipse of the orifice profile is obtained The intersection points are determined based on the point order invariance constraint. Determine the corresponding intersection point A mapped image point, , ,Will The mapped image points are combined to form a mapped image point set; S403 repeats S401-S402 until the mapped image points of each anchor point in each frame sequence are calculated, and thus obtains the result. A set of mapped image points, A set of mapped image points constitutes a mapped image point group.
[0009] As a further technical solution of the present invention, in S402, according to the point order invariance constraint, from Determine the corresponding intersection point The mapped image points include: S40201 will... The intersection points are sorted clockwise starting from the first intersection point; S40202: Find the next intersection point after the current position; S40203: If no intersection point exists, skip the anchor point; if an intersection point exists, determine whether the two intersection points of the intersection point are adjacent. If not, take the intersection point of the first position as the mapped image point of the current anchor point. If so, calculate the image point of the current anchor point on the initial visual camera. After moving back and forth by a small angle, the temporary intersection point of the epipolar line and the orifice contour ellipse is sorted clockwise, and the intersection point with the correct point order is taken as the mapping image point of the current anchor point; S40204 repeats S40202-S40203 until the last intersection point.
[0010] As a further technical solution of the present invention, in S5, the calculation of the spatial coordinates of each anchor point based on the mapped image point group using the direct linear transformation method and the singular value decomposition method includes: constructing equation (3) based on the mapped image points in the mapped image point group using the direct linear transformation method, and solving equation (3) using the singular value decomposition method to obtain the spatial coordinates of each anchor point. ; In the aforementioned formula (3), For the anchor point at the 1st The projected length on the camera's optical axis For the first Camera mapping matrix, for The first row of components, for The second row component, for The third row component, =( , 1) For each anchor point at the th i Homogeneous coordinates on the camera's image.
[0011] As a further technical solution of the present invention, in S6, the step of using the high residual filtering method to delete high residual frame sequences from the frame sequence group to obtain the remaining frame sequence, and deleting large residual anchor points in the remaining frame sequence to obtain the final anchor point group includes: S601 calculating the quality score of each frame sequence according to formula (4). ; In the aforementioned formula (4), Solving anchor points using the direct linear transformation method The residual; S602 based on mass fraction S603 separates high residual frames from the frame sequence group and removes high residual frames from the frame sequence group to obtain the remaining frame sequence; S603 removes large residual anchors from the remaining frame sequence proportionally to obtain the final anchor group.
[0012] As a further technical solution of the present invention, in S7, the solution to obtain the orifice plane and orifice contour ellipse feature information includes: S701 obtaining the spatial coordinates corresponding to each anchor point in the anchor point group ( , Equation (5) is established, and the singular value decomposition method is used to solve it to obtain the plane characteristic parameters. , , : S702 uses equation (6) to normalize the plane characteristic values, resulting in a normalized orifice plane: In the aforementioned formula (6), To find the magnitude of the vector, , , , These are the characteristic parameters of the normalized orifice plane.
[0013] As a further technical solution of the present invention, in S7, the process of solving for the orifice plane and orifice contour ellipse feature information further includes: S703 using the world coordinate system O w X w Y w Z w The intersection of the XOY plane and the orifice plane The X-axis direction, normal vector In the Z-axis direction, Y-axis direction, origin of world coordinate system O w Projection point on the plane of the orifice O p Establish the orifice coordinate system with the origin as the origin. O p X p Y p Z p S704 calculates the coordinates of each anchor point in the anchor point group in the borehole coordinate system. O p X p Y p Z p The coordinates below, its X p axis and Y pThe coordinate components of the axis are the anchor points on the orifice plane. O p X p Y p The projection onto the surface is used to obtain the elliptical feature information of the orifice outline using the least squares method. This elliptical feature information includes the semi-major axis length of the orifice outline ellipse. The length of the minor semi-axis of the ellipse of the orifice profile The center coordinates of the orifice profile ellipse ) and the rotation angle of the orifice profile ellipse relative to the orifice plane .
[0014] As a further technical solution of the present invention, in S7, the solution of the borehole orientation and borehole radius includes: S705 taking the length of the minor semi-axis of the borehole opening profile ellipse. As the borehole radius; S706 calculates the normal vector of the borehole axis according to equation (7). The normal vector is used as the borehole orientation; In the above formula (7), The rotation matrix from the orifice coordinate system to the world coordinate system. Let be the rotation matrix from the cylindrical coordinate system to the orifice coordinate system. =[0, 0, 1] T It is the unit vector along the Z-axis.
[0015] As a further technical solution of the present invention, in S8, the verification of the fitting result using the reprojection verification method includes: S801 taking 5 feature points on the fitted orifice contour ellipse; S802 calculating the image points of the 5 feature points in each frame of the borehole area image according to formula (8). And fit the reprojection ellipse in the borehole area image of each frame. ; In the aforementioned formula (8), The three-dimensional coordinates of the feature point are in the 3D coordinates of the 3D feature point ... The projected length on the optical axis of each camera For the first The intrinsic parameter matrix of each camera. From the world coordinate system to the first Rotation matrix of each camera coordinate system Let be the rotation matrix from the orifice coordinate system to the world coordinate system. The coordinates of the feature point in the orifice coordinate system. Let be the translation vector from the orifice coordinate system to the world coordinate system. From the world coordinate system to the first Translation vector of each camera coordinate system To fit an ellipse from the image point using the least squares method; S803 calculates the intersection-union ratio of the reprojected ellipse and the orifice profile ellipse according to equation (9). Determine the intersection and union ratio Is the minimum value greater than the threshold? : In the aforementioned formula (9), For the first Iteration and the first Iterative intersection-union ratio, For the first Iterative Ellipse and the 1st The area of the intersection region between the iterative ellipses. For the first Iterative Ellipse and the 1st The area of the union region between the iterative ellipses; if S804 is true, then the fitting result is used as the multidimensional feature of the target borehole; if not, then the smallest equivalent intersection-union ratio is deleted. After the corresponding frame of the drilling area image, the S3~S8 operations are repeated. The fitting results include the drilling radius, drilling orientation, the semi-major axis length of the borehole profile ellipse, the minor semi-axis length of the borehole profile ellipse, the center coordinates of the borehole profile ellipse, and the rotation angle of the borehole profile ellipse.
[0016] Beneficial effects: This invention proposes a method for accurate identification of multi-dimensional features in boreholes based on machine vision. Firstly, it uses a vision camera to... The target borehole was photographed from various locations to obtain... The image is generated by first obtaining a frame of borehole region image; then, for each frame of borehole region image, image preprocessing operations such as distortion correction, grayscale conversion, and adaptive histogram balancing are performed sequentially to obtain an initial image. An initial image group composed of the initial images is input into an ellipse fitter to obtain the result. A group of orifice profile ellipses composed of orifice profile ellipses; and according to Frame drilling area image obtained Each frame sequence will Each frame sequence is constructed into a frame sequence group, and a setting is made on the initial frame of each frame sequence. Anchor points; then, the anchor point tracking algorithm is used to determine the mapping pixel set of each anchor point in each frame sequence, and... A mapping image point set is formed by mapping image points. An anchor point tracking algorithm can be used to track anchor points on the elliptical borehole profile, solving the problem of difficulty in calibrating feature points in multi-view visual positioning of elliptical borehole profiles. Then, the spatial coordinates of each anchor point are calculated based on the mapping image point set using the direct linear transformation method and singular value decomposition method. Next, the high residual filtering method is used to remove large fractional frames from the frame sequence set to obtain the remaining frame sequence. Large residual anchor points in the remaining frame sequence are then removed to obtain the final anchor point set. The high residual filtering method can eliminate erroneous mappings to improve positioning accuracy. Then, the borehole plane and borehole profile ellipse feature information are obtained by solving the spatial coordinates of each anchor point in the anchor point set. Based on the borehole profile ellipse feature information, the borehole azimuth and borehole radius are solved to obtain the fitting result. Finally, the fitting result is verified by using the reprojection verification method, which can verify the quality of the fitted borehole, improve the stability of the fitting result, improve the fitting accuracy of the multidimensional features of the target borehole, and achieve robust fitting of multidimensional features of boreholes in complex on-site construction environments such as tunnels and underground power plants. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of the method for accurate identification of multi-dimensional borehole features in an embodiment of the present invention; Figure 2 This is a diagram illustrating the overall technical roadmap of the borehole multi-dimensional feature accurate identification method in this embodiment of the invention. Figure 3 This is a schematic diagram of the drilling area image in an embodiment of the present invention; Figure 4 This is a schematic diagram of the drilling model in an embodiment of the present invention; Figure 5 This is a schematic diagram of the anchor point tracking algorithm in an embodiment of the present invention; Figure 6 This is a schematic diagram of the mapped image points of the anchor point in the frame sequence in an embodiment of the present invention; Figure 7 This is a three-dimensional schematic diagram of the anchor point in an embodiment of the present invention; Figure 8 This is a schematic diagram of the fitted orifice contour ellipse in an embodiment of the present invention; Figure 9 This is a schematic diagram of reprojection verification in an embodiment of the present invention; Figure 10This is a schematic diagram of the final borehole fitted after verification by the reprojection verification method in an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0020] Example 1
[0021] like Figure 1 As shown, this embodiment provides a method for accurate identification of multi-dimensional features of boreholes based on machine vision, including: S1 using a vision camera to... The target borehole was photographed from various locations to obtain... Frame of drilled area images; wherein, through a vision camera from Taking pictures of the target borehole from various angles can be done by... Each of the two independent vision cameras is located in front of the target borehole. Shooting can be done from various angles, or by placing one or any number of vision cameras in front of the target borehole. S2 takes pictures from various locations; S2 performs image preprocessing operations such as distortion correction, grayscale conversion, and adaptive histogram balancing on each frame of the borehole area image to obtain an initial image. The initial images described above are combined into an initial image group, and the initial image group is input into an ellipse fitter to obtain the result. A group of orifice profile ellipses composed of individual orifice profile ellipses; S3 according to The image of the borehole area obtained from the frame Each frame sequence will The aforementioned frame sequences are constructed into a frame sequence group, and a setting is set on the initial frame of each frame sequence. Anchor points; S4 uses an anchor point tracking algorithm to determine the set of mapped pixels for each anchor point in each frame sequence, S5: A set of mapped image points is formed into a mapped image point group; S6: The spatial coordinates of each anchor point are calculated based on the mapped image point group using the direct linear transformation method and singular value decomposition method; S7: The high residual filtering method is used to delete large fractional frame sequences from the frame sequence group to obtain the remaining frame sequence, and large residual anchor points in the remaining frame sequence are deleted to obtain the final anchor point group; S8: The borehole plane and borehole contour ellipse feature information are obtained by solving the spatial coordinates of each anchor point in the anchor point group, and the borehole azimuth and borehole radius are solved based on the borehole contour ellipse feature information to obtain the fitting result; S9: The fitting result is verified by the reprojection verification method to obtain the multidimensional features of the target borehole.
[0022] Specifically, this invention proposes a machine vision-based method for accurate identification of multi-dimensional features in boreholes. Firstly, in front of the target borehole... Each direction is corresponding to the establishment A visual camera, and through Each visual camera captured images of the target borehole, obtaining... The image is generated by first obtaining a frame of borehole region image; then, for each frame of borehole region image, image preprocessing operations such as distortion correction, grayscale conversion, and adaptive histogram balancing are performed sequentially to obtain an initial image. An initial image group composed of the initial images is input into an ellipse fitter to obtain the result. A group of orifice profile ellipses composed of orifice profile ellipses; and according to Frame drilling area image obtained Each frame sequence will Each frame sequence is constructed into a frame sequence group, and a setting is made on the initial frame of each frame sequence. Anchor points; then, the anchor point tracking algorithm is used to determine the mapping pixel set of each anchor point in each frame sequence, and... A mapping image point set is formed by mapping image points. An anchor point tracking algorithm can be used to track anchor points on the elliptical borehole profile, solving the problem of difficulty in calibrating feature points in multi-view visual positioning of elliptical borehole profiles. Then, the spatial coordinates of each anchor point are calculated based on the mapping image point set using the direct linear transformation method and singular value decomposition method. Next, the high residual filtering method is used to remove large fractional frames from the frame sequence set to obtain the remaining frame sequence. Large residual anchor points in the remaining frame sequence are then removed to obtain the final anchor point set. The high residual filtering method can eliminate erroneous mappings to improve positioning accuracy. Then, the borehole plane and borehole profile ellipse feature information are obtained by solving the spatial coordinates of each anchor point in the anchor point set. Based on the borehole profile ellipse feature information, the borehole azimuth and borehole radius are solved to obtain the fitting result. Finally, the fitting result is verified by using the reprojection verification method, which can verify the quality of the fitted borehole, improve the stability of the fitting result, improve the fitting accuracy of the multidimensional features of the target borehole, and achieve robust fitting of multidimensional features of boreholes in complex on-site construction environments such as tunnels and underground power plants.
[0023] In some possible implementations, in S3, the statement based on The image of the borehole area obtained from the frame Each frame sequence will Constructing the frame sequence into a frame sequence group includes: The image of the drilled area in the frame Combined into frame groups ; Determine from the frame group according to equation (1) Frame sequence ,Will The frame sequence Constructed into frame sequence groups ; In the above formula (1), Image of one of the drilled areas within the frame group. Images of other drilled areas within the frame group The mapping.
[0024] This is because the frame order can represent the mapping relationship of the borehole area images in each frame, and the initial frame of each frame order is set with... An anchor point can be used to characterize the features of a spatial ellipse. By studying the transformation of the anchor point between frames, the borehole ellipse can be solved. The anchor point can be obtained by manually specifying a number of feature points on the mapped ellipse of the borehole area image in a certain frame, such as points on the elliptic curve spaced at a certain angle or distance.
[0025] In some possible implementations, in S4, the anchor point tracking algorithm is used to determine the set of mapped pixels for each anchor point in each frame sequence, and then... The mapping image point group consists of a set of mapped image points, including: S401 For a certain frame sequence, the epipolar line corresponding to each anchor point is calculated according to equation (2), and the result is obtained. polar lines; In the above formula (2), For the first An anchor point at any visual camera Image points in For any vision camera The intrinsic parameter matrix, For any vision camera antisymmetric matrix, For the initial visual camera To any visual camera The rotation matrix, For initial vision camera The intrinsic parameter matrix, For the first Anchor point at the initial vision camera Image points in For the initial visual camera To any visual camera The translation distance in the X direction, For the initial visual camera To any visual camera The translation distance in the Y direction, For the initial visual camera To any visual camera Translation distance in the Z direction; S402 The intersection of the epipolar line and the corresponding ellipse of the orifice profile is obtained The intersection points are determined based on the point order invariance constraint. Determine the corresponding intersection point A mapped image point, , ,Will The mapped image points are combined to form a mapped image point set; S403 repeats S401-S402 until the mapped image points of each anchor point in each frame sequence are calculated, and thus obtains the result. A set of mapped image points, A set of mapped image points constitutes a mapped image point group; among them, each pair of limits has 0 or 2 intersection points with a corresponding orifice profile ellipse (the tangent point is considered to be 2 intersection points), therefore .
[0026] This is because, by performing epipolar constraints and point sequence invariance constraints in steps S401 and S402 respectively, the mapped image points of the anchor points in the frame sequence are obtained, so as to realize the feature point tracking of anchor point tracking, and solve the problem that it is difficult to mark the feature points of the elliptical borehole contour in multi-view visual positioning. By repeating S401-S402 until the mapped image points of each anchor point in each frame sequence are calculated, the mapped image points of all anchor points in all frame sequences can be calculated to obtain the mapped image point group.
[0027] In some possible implementations, in S402, based on the point order invariance constraint, from Determine the corresponding intersection point The mapped image points include: S40201 will... The intersection points are sorted clockwise starting from the first intersection point; S40202: Find the next intersection point after the current position; S40203: If no intersection point exists, skip the anchor point; if an intersection point exists, determine whether the two intersection points of the intersection point are adjacent. If not, take the intersection point of the first position as the mapped image point of the current anchor point. If so, calculate the image point of the current anchor point on the initial visual camera. After moving back and forth by a small angle, the temporary intersection point of the epipolar line and the orifice contour ellipse is sorted clockwise, and the intersection point with the correct point order is taken as the mapping image point of the current anchor point; S40204 repeats S40202-S40203 until the last intersection point.
[0028] Those skilled in the art will understand that, according to the point order invariance constraint, the initial point order remains unchanged after the projective transformation. Therefore, by using S40201-S40204, the point order can be changed from ≤2 Select the corresponding ≤ from the intersection points. A number of mapped image points.
[0029] In some possible implementations, in S5, calculating the spatial coordinates of each anchor point based on the mapped image point group using the direct linear transformation method and singular value decomposition method includes: constructing equation (3) based on the mapped image points in the mapped image point group using the direct linear transformation method, and solving equation (3) using the singular value decomposition method to obtain the spatial coordinates of each anchor point. ; In the aforementioned formula (3), For the anchor point at the 1st The projected length on the camera's optical axis For the first Camera mapping matrix, for The first row of components, for The second row component, for The third row component, For each anchor point at the 1st Homogeneous coordinates on the camera's image.
[0030] In some possible implementations, in S6, the step of using high residual filtering to remove high residual frames from the frame sequence group to obtain the remaining frame sequence, and removing large residual anchors from the remaining frame sequence to obtain the final anchor group includes: S601 calculating the quality score of each frame sequence according to equation (4). ; In the aforementioned formula (4), Solving anchor points using the direct linear transformation method The residual; S602 based on mass fraction S603 separates high residual frames from the frame sequence group and removes high residual frames from the frame sequence group to obtain the remaining frame sequence; S603 removes large residual anchors from the remaining frame sequence proportionally to obtain the final anchor group.
[0031] In some possible implementations, in S7, the process of obtaining the orifice plane and orifice contour ellipse feature information includes: S701 obtaining the spatial coordinates corresponding to each anchor point in the anchor point group ( , Equation (5) is established, and the singular value decomposition method is used to solve it to obtain the plane characteristic parameters. , , : S702 uses equation (6) to normalize the plane characteristic values, resulting in a normalized orifice plane: In the aforementioned formula (6), To find the magnitude of the vector, , , , These are the characteristic parameters of the normalized orifice plane.
[0032] In some possible implementations, in S7, the process of obtaining the orifice plane and orifice profile ellipse feature information further includes: S703 using the world coordinate system. O w X w Y w Z w The intersection of the XOY plane and the orifice plane L The X-axis direction, normal vector In the Z-axis direction, Y-axis direction, origin of world coordinate system O w Projection point on the plane of the orifice O p Establish the orifice coordinate system with the origin as the origin. O p X p Y p Z p S704 calculates the coordinates of each anchor point in the anchor point group in the borehole coordinate system. O p X p Y p Z p The coordinates below, its X p axis and Y p The coordinate components of the axis are the anchor points on the orifice plane. Op X p Y p The projection onto the surface is used to obtain the elliptical feature information of the orifice outline using the least squares method. This elliptical feature information includes the semi-major axis length of the orifice outline ellipse. The length of the minor semi-axis of the ellipse of the orifice profile The center coordinates of the orifice profile ellipse ) and the rotation angle of the orifice profile ellipse relative to the orifice plane .
[0033] In some possible implementations, in S7, solving for the borehole azimuth and borehole radius includes: S705 taking the minor semi-axis length of the borehole opening profile ellipse. As the borehole radius; S706 calculates the normal vector of the borehole axis according to equation (7). The normal vector is used as the borehole orientation; In the above formula (7), The rotation matrix from the orifice coordinate system to the world coordinate system. Let be the rotation matrix from the cylindrical coordinate system to the orifice coordinate system. =[0, 0, 1] T It is the unit vector along the Z-axis.
[0034] This is because the relationship between the borehole profile ellipse and the borehole orientation and radius was derived through S705 and S706, which enables multi-dimensional feature fitting of borehole plane orientation, borehole coordinates, borehole radius, etc. based on visual images.
[0035] In some possible implementations, in S8, the verification of the fitting result using the reprojection verification method includes: S801 taking 5 feature points on the fitted orifice contour ellipse; S802 calculating the image points of the 5 feature points in each frame of the borehole area image according to equation (8). And fit the reprojection ellipse in the borehole area image of each frame. ; In the aforementioned formula (8), The three-dimensional coordinates of the feature point are in the 3D coordinates of the 3D feature point in the 3D coordinate The projected length on the optical axis of each camera For the first The intrinsic parameter matrix of each camera, From the world coordinate system to the first Rotation matrix of each camera coordinate system Let be the rotation matrix from the orifice coordinate system to the world coordinate system. The coordinates of the feature point in the orifice coordinate system. Let be the translation vector from the orifice coordinate system to the world coordinate system. From the world coordinate system to the first Translation vector of each camera coordinate system To fit an ellipse from the image points using the least squares method; S803 calculates the intersection-union ratio of the reprojected ellipse and the orifice profile ellipse according to formula (9). Determine the intersection and union ratio Is the minimum value greater than the threshold? : In the aforementioned formula (9), For the first Iteration and the first Iterative intersection-union ratio, For the first Iterative Ellipse and the 1st The area of the intersection region between the iterative ellipses. For the first Iterative Ellipse and the 1st The area of the union region between the iterative ellipses; if S804 is true, then the fitting result is used as the multidimensional feature of the target borehole; if not, then the smallest equivalent intersection-union ratio is deleted. After the corresponding frame of the drilling area image, the S3~S8 operations are repeated. The fitting results include the drilling radius, drilling orientation, the semi-major axis length of the borehole profile ellipse, the minor semi-axis length of the borehole profile ellipse, the center coordinates of the borehole profile ellipse, and the rotation angle of the borehole profile ellipse.
[0036] Those skilled in the art will understand that the fitting results are verified by the reprojection verification method in S801-S804 in order to achieve accurate positioning of the drilling target under complex conditions.
[0037] It should be noted that the implementation principle of this invention for accurately fitting the multidimensional features of drilling targets under complex conditions is as follows: In real space, there exists a man-made, three-dimensional Cartesian coordinate system, called the world coordinate system (coordinate system). O w X w Y w Z w Its origin is O W The coordinates of any point in space under this coordinate system are denoted as ( x w , y w ,z w Subsequently, a camera system was established in space. Several visual cameras with different angles and orientations were set up in front of the target borehole. - By taking pictures of the target boreholes in sequence, we can obtain... Frame drilling area image - For any of these cameras A camera coordinate system and a pixel coordinate system are established. The former is a three-dimensional Cartesian coordinate system with the camera's optical center as the origin, the optical axis as the Z-axis, the width direction of the imaging plane as the X-axis, and the height direction as the Y-axis; the latter is a two-dimensional Cartesian coordinate system with the width direction of the image as the U-axis and the height direction as the V-axis. Based on the pinhole imaging model, any point on the borehole opening contour... Rather than in the Imaging points on a frame image The following mapping relationship exists: In the aforementioned formula (10), Let point X be at the th The projected length on the camera's optical axis For the first Camera mapping matrix, - for The row components are: In the aforementioned formula (11), For the first The camera's intrinsic parameter matrix, , For the first The camera's rotation matrix and translation vector. and For the normalized focal length in the horizontal and vertical directions, and For the coordinates of the optical center, - For rotation matrix elements, - These are the elements of the translation vector.
[0038] Finally, a borehole model in space is established. A certain borehole exists in the world coordinate system. The borehole wall is cylindrical, and its directrix is defined by point [point missing]. With the center as the center, For a circle with radius , the direction vector of its generatrix is . Here, the direction is referred to as the drilling direction, and its equation is described as follows: In the aforementioned formula (12), For any point on the directrix circle.
[0039] Without loss of generality, in the world coordinate system, there also exists a free plane of the borehole wall. Considering that the diameter of the borehole is much smaller than the diameter of the borehole wall, the borehole wall is approximated as a plane, called the borehole opening plane. The intersection of the borehole opening plane and the borehole wall is then the borehole opening ellipse. Let the direction vector of the free plane of the borehole wall be denoted as... This is called the borehole plane direction, and the center coordinates of the borehole ellipse are... Then the borehole plane and the elliptical borehole It can be described as: To facilitate the calculation of the borehole opening ellipse, the world coordinate system is used. X w O w Y w The line of intersection between the plane and the orifice plane The X-axis direction, normal vector In the Z-axis direction, Y-axis direction, origin of world coordinate system O w Projection point on the plane of the orifice O p Establish the orifice coordinate system with the origin as the origin. O p X p Y p Z p In the borehole coordinate system, the center coordinates of the borehole ellipse are: The semi-major axis length is The semi-minor axis length is The rotation angle is Finally, the distance from the center of the borehole ellipse to the center of the bottom circle is defined as the borehole depth. Apart from the depth, all other parameters are related to the borehole's geometric profile, and multidimensional features of the borehole can be determined using machine vision: borehole radius, borehole direction, borehole center coordinates, and borehole plane orientation.
[0040] Example 2
[0041] This second embodiment provides a machine vision-based method for accurate identification of multi-dimensional features in boreholes, including: S1 uses a vision camera to... The target borehole was photographed from various locations to obtain... Frame of drilled area image; S2 performs image preprocessing operations such as distortion correction, grayscale conversion, and adaptive histogram balancing sequentially on each frame of the borehole region image to obtain an initial image. The initial images described above are combined into an initial image group, and the initial image group is input into an ellipse fitter for fitting to obtain the result. A group of orifice profile ellipses consisting of orifice profile ellipses. S3 according to The image of the borehole area obtained from the frame Each frame sequence will The aforementioned frame sequences are constructed into a frame sequence group, and a setting is set on the initial frame of each frame sequence. Anchor points; in S3, the stated anchor points; The image of the borehole area obtained from the frame Each frame sequence will The frame sequence is constructed into a frame sequence group including: Will The image of the drilled area in the frame Combined into frame groups ; Determine from the frame group according to equation (1) Frame sequence ,Will The frame sequence Constructed into frame sequence groups ; In the above formula (1), Image of one of the drilled areas within the frame group. Images of other drilled areas within the frame group Mapping; S4 uses an anchor point tracking algorithm to determine the set of mapped pixels for each anchor point in each frame sequence. A set of mapped pixel points forms a mapped pixel group; in S4, the anchor point tracking algorithm is used to determine the mapped pixel set of each anchor point in each frame sequence, and the mapped pixel set of each anchor point is determined. A set of mapped image points constitutes a group of mapped image points, including: S401 calculates the epipolar line corresponding to each anchor point according to equation (2) for a given frame sequence, and obtains... polar lines: l 1~ l N ; In the above formula (2), For the first An anchor point at any visual camera Image points in For any vision camera The intrinsic parameter matrix, For any vision camera antisymmetric matrix, For the initial visual camera To any visual camera The rotation matrix, For initial vision camera The intrinsic parameter matrix, For the first An anchor point at the initial vision camera Image points in For the initial visual camera To any visual camera The translation distance in the X direction, For the initial visual camera To any visual camera The translation distance in the Y direction, For the initial visual camera To any visual camera The translation distance in the Z direction; for demonstration purposes, this embodiment uses 6 anchor points as an example; S402 The intersection of the epipolar line and the corresponding ellipse of the orifice profile is obtained The intersection points are determined based on the point order invariance constraint. Determine the corresponding intersection point One mapped image point: ~ , , , , ,Will The mapped image points are combined to form a set of mapped image points; in this embodiment, the epipolar lines of the 6 anchor points intersect with the borehole outline ellipse of a certain frame of the borehole area image at 12 points. In S402, according to the point order invariance constraint, from Determine the corresponding intersection point The mapped image points include: S40201 will The intersection points are arranged in clockwise order starting from the first intersection point. In this embodiment, the mapping points are arranged as follows: [1.1, 2.1, 2.2, 1.2, 3.1, 6.1, 4.1, 5.1, 5.2, 4.2, 6.2, 3.2]. S40202 Locates the next position after the current position; S40203 If no sequence point exists, skip the anchor point; if a sequence point exists, determine whether the two intersections of the sequence point are adjacent. If not, take the intersection with the correct point order as the mapped image point of the current anchor point. For example, 3.1 is the first mapped point, so the actual mapped point of anchor point 3 is 3.1; if so, calculate the image point of the current anchor point on the initial visual camera. The temporary intersection points of the epipolar line and the orifice contour ellipse corresponding to the small forward and backward movement are sorted clockwise, and the intersection point with the correct point sequence is taken as the mapping image point of the current anchor point. In this embodiment, mapping points 2.1 and 2.2 are adjacent, so the offset of anchor point 2 is calculated to be ±1×10. -5 The temporary intersection points 201 and 202 after the degree are mapped to points 201.1, 201.2, 202.1, and 202.2. It is found that the order of the points before and after 2.2 is correct. Therefore, 2.2 is the mapped image point of anchor point 2.
[0042] S40204 repeats S40202-S40203 until the last intersection point; in this embodiment, the actual mapping points of each anchor point on the image are [1.1, 2.2, 3.1, 4.1, 5.2, 6.2]; by drawing the mappings of the anchor points on each frame image together, the final result can be obtained. Figure 6 .
[0043] S403 repeats S401-S402 until the mapped image point of each anchor point in each frame sequence is calculated, resulting in... A set of mapped image points, A set of mapped image points constitutes a group of mapped image points; S5 uses the direct linear transformation method and singular value decomposition method to calculate the spatial coordinates of each anchor point based on the mapped image point group; in S5, the calculation of the spatial coordinates of each anchor point based on the mapped image point group using the direct linear transformation method and singular value decomposition method includes: Equation (3) is constructed using the direct linear transformation method based on the mapped image points in the mapped image point group. Equation (3) is then solved using the singular value decomposition method to obtain the spatial coordinates of each anchor point. ; In the aforementioned formula (3), For the anchor point at the 1st The projected length on the camera's optical axis For the first Camera mapping matrix, for The first row of components, for The second row component, for The third row component, =( , , 1) is the first i Homogeneous coordinates of the camera's image observation point; S6 uses a high residual filtering method to remove large-fraction frame sequences from the frame sequence group to obtain the remaining frame sequence, and then removes large residual anchor points from the remaining frame sequence to obtain the final anchor point group; S6, the step of using a high residual filtering method to remove high-residual frame sequences from the frame sequence group to obtain the remaining frame sequence, and then removing large residual anchor points from the remaining frame sequence to obtain the final anchor point group includes: S601 calculates the quality score for each frame sequence according to equation (4). ; In the aforementioned formula (4), Solving anchor points using the direct linear transformation method The residual; S602 is based on mass fraction The high residual frame sequence is divided from the frame sequence group and then removed from the frame sequence group to obtain the remaining frame sequence; S603 deletes large residual anchor points in the remaining frame sequence according to the proportion to obtain the final anchor point group. In this embodiment, 50% of the large residual anchor points in the remaining frame sequence are deleted. S7 obtains the borehole plane and borehole contour ellipse feature information by solving for the spatial coordinates of each anchor point in the anchor point group, and solves for the drilling azimuth and drilling radius based on the borehole contour ellipse feature information to obtain the fitting result; in S7, the obtained borehole plane and borehole contour ellipse feature information includes: S701 maps the image point corresponding to each anchor point in the anchor point group ( , Establish the non-homogeneous linear equation described in equation (5), solve it using the singular value decomposition method, and obtain the plane characteristic parameters. , , : S702 uses equation (6) to normalize the plane characteristic values, resulting in a normalized orifice plane: In the aforementioned formula (6), To find the magnitude of the vector, , , , These are the characteristic parameters of the normalized orifice plane; In S7, the solution to obtain the orifice plane and orifice contour ellipse feature information also includes: S703 uses the world coordinate system O wX w Y w Z w The intersection of the XOY plane and the orifice plane The X-axis direction, normal vector In the Z-axis direction, Y-axis direction, origin of world coordinate system O w Projection point on the plane of the orifice O p Establish the orifice coordinate system with the origin as the origin. O p X p Y p Z p ; S704 calculates the coordinates of each anchor point in the anchor point group in the borehole coordinate system. O p X p Y p Z p The coordinates below, its X p axis and Y p The coordinate components of the axis are the anchor points on the orifice plane. O p X p Y p The projection onto the surface is used to obtain the elliptical feature information of the orifice outline using the least squares method. This elliptical feature information includes the semi-major axis length of the orifice outline ellipse. The length of the minor semi-axis of the ellipse of the orifice profile The center coordinates of the orifice profile ellipse ) and the rotation angle of the orifice profile ellipse relative to the orifice plane ; In S7, the process of determining the borehole azimuth and borehole radius includes: S705 takes the minor semi-axis length of the orifice profile ellipse. As the borehole radius; S706 calculates the normal vector of the borehole axis according to equation (7). The normal vector is used as the borehole orientation; In the above formula (7), The rotation matrix from the orifice coordinate system to the world coordinate system. Let be the rotation matrix from the cylindrical coordinate system to the orifice coordinate system. =[0, 0, 1] T It is the unit vector along the Z-axis; Combination Figure 3 and Figure 8 In this embodiment, for Figure 3 The simulated borehole shown has a true borehole diameter of 75 mm, a borehole axis orientation vector of (-0.772, 0.115, 0.626), and a borehole opening ellipse center coordinate of (1028.297 mm, 365.772 mm, 677.217 mm). Directly solving for the inverted borehole diameter yields 75.096 mm, a borehole axis orientation vector of (-0.788, 0.123, 0.603), and a borehole opening ellipse center coordinate of (1028.233 mm, 365.873 mm, 677.337 mm). The fitted diameter error is 0.096 mm, the inclination angle fitting error is 1.660°, and the borehole opening ellipse center fitting error is 0.170 mm.
[0044] S8 uses the reprojection verification method to test the fitting results and obtain the multidimensional features of the target borehole; in S8, the test of the fitting results using the reprojection verification method includes: S801 takes ≥5 feature points on the fitted orifice contour ellipse; S802 calculates the image point of each feature point in each frame of the borehole area image according to equation (8). And fit the reprojection ellipse in the borehole area image of each frame. ; In the aforementioned formula (8), The three-dimensional coordinates of the feature point are in the 3D coordinates of the 3D feature point in the 3D coordinate The projected length on the optical axis of each camera For the first The intrinsic parameter matrix of each camera, From the world coordinate system to the first Rotation matrix of each camera coordinate system Let be the rotation matrix from the orifice coordinate system to the world coordinate system. The coordinates of the feature point in the orifice coordinate system. Let be the translation vector from the orifice coordinate system to the world coordinate system. From the world coordinate system to the first Translation vector of each camera coordinate system To fit an ellipse from the image points using the least squares method; S803 calculates the intersection-union ratio of the reprojected ellipse and the orifice profile ellipse according to formula (9). Determine the intersection and union ratio Is the minimum value greater than the threshold? : In the aforementioned formula (9), For the first Iteration and the first Iterative intersection-union ratio, For the first Iterative Ellipse and the 1st The area of the intersection region between the iterative ellipses. For the first Iterative Ellipse and the 1st The area of the merging region between the iterative ellipses; If S804 is true, then the fitting result is used as the multidimensional feature of the target borehole; otherwise, the smallest equivalent crossover ratio is deleted. After the corresponding frame of the drilling area image, the S3~S8 operations are repeated. The fitting results include the drilling radius, drilling orientation, the semi-major axis length of the borehole profile ellipse, the minor semi-axis length of the borehole profile ellipse, the center coordinates of the borehole profile ellipse, and the rotation angle of the borehole profile ellipse.
[0045] In this embodiment, the deviation before and after reprojection is as follows: Figure 9 As shown, deleted After refitting the smallest frame image, the results are as follows: borehole diameter 75.095 mm, borehole axis orientation vector (-0.787, 0.122, 0.605), center coordinates of borehole ellipse (1028.236 mm, 365.873 mm, 677.337 mm), diameter fitting error 0.095 mm, inclination angle fitting error 1.566°, and borehole ellipse center fitting error 0.168 mm. It can be seen that reprojection verification can improve the fitting accuracy of borehole multidimensional features.
[0046] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the scope of the technology disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention. All should be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0047] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. They can be applied to various fields suitable for the present invention. For those skilled in the art, other modifications can be easily made. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.
Claims
1. A method for accurate identification of multi-dimensional features in boreholes based on machine vision, characterized in that, include: S1 uses a vision camera to... The target borehole was photographed from various locations to obtain... Frame of drilled area image; S2 performs image preprocessing operations such as distortion correction, grayscale conversion, and adaptive histogram balancing sequentially on each frame of the borehole region image to obtain an initial image. The initial images described above are combined into an initial image group, and the initial image group is input into an ellipse fitter for fitting to obtain the result. A group of orifice profile ellipses consisting of orifice profile ellipses. S3 according to The image of the borehole area obtained from the frame Each frame sequence will The aforementioned frame sequences are constructed into a frame sequence group, and a setting is set on the initial frame of each frame sequence. Anchor points; S4 uses an anchor point tracking algorithm to determine the set of mapped pixels for each anchor point in each frame sequence. A set of mapped image points constitutes a group of mapped image points; S5 uses the direct linear transformation method and singular value decomposition method to calculate the spatial coordinates of each anchor point based on the mapped image point group; S6 uses a high residual filtering method to remove large fractional frame sequences from the frame sequence group to obtain the remaining frame sequence, and then removes large residual anchor points from the remaining frame sequence to obtain the final anchor point group. S7 calculates the orifice plane and orifice contour ellipse feature information based on the spatial coordinates of each anchor point in the anchor point group, and calculates the drilling orientation and drilling radius based on the orifice contour ellipse feature information to obtain the fitting result; S8 uses the reprojection verification method to test the fitting results and obtain the multidimensional features of the target borehole; In S4, the anchor point tracking algorithm is used to determine the mapping pixel set of each anchor point in each frame sequence, and then... A set of mapped image points constitutes a group of mapped image points, including: S401 calculates the epipolar line corresponding to each anchor point according to equation (2) for a given frame sequence, and obtains... polar lines; (2); In the above formula (2), For the first An anchor point at any visual camera Image points in For any vision camera The intrinsic parameter matrix, For any vision camera antisymmetric matrix, For the initial visual camera To any visual camera The rotation matrix, For initial vision camera The intrinsic parameter matrix, For the first Anchor point at the initial vision camera Image points in For the initial visual camera To any visual camera The translation distance in the X direction, For the initial visual camera To any visual camera The translation distance in the Y direction, For the initial visual camera To any visual camera The translation distance in the Z direction; S402 The intersection of the epipolar line and the corresponding ellipse of the orifice profile is obtained The intersection points are determined based on the point order invariance constraint. Determine the corresponding intersection point A mapped image point, , ,Will A set of mapping image points is formed by combining several mapping image points; S403 repeats S401-S402 until the mapped image point of each anchor point in each frame sequence is calculated, resulting in... A set of mapped image points, A set of mapped image points constitutes a group of mapped image points; In S5, the spatial coordinates of each anchor point are calculated based on the mapped image point group using the direct linear transformation method and singular value decomposition method, including: Equation (3) is constructed based on the mapped image points in the mapped image point group using the direct linear transformation method, and equation (3) is solved using the singular value decomposition method to obtain the spatial coordinates of each anchor point. ; (3); In the aforementioned formula (3), For the anchor point at the 1st The projected length on the camera's optical axis For the first Camera mapping matrix, for The first row of components, for The second row component, for The third row component, For each anchor point at the 1st Homogeneous coordinates on the camera image; In S6, the step of using a high residual filtering method to remove high residual frame sequences from the frame sequence group to obtain the remaining frame sequence, and then removing large residual anchor points from the remaining frame sequence to obtain the final anchor point group includes: S601 calculates the quality score for each frame sequence according to equation (4). ; (4); In the aforementioned formula (4), Solving anchor points using the direct linear transformation method The residual; S602 based on mass fraction The high residual frame sequence is divided from the frame sequence group and then removed from the frame sequence group to obtain the remaining frame sequence; S603 proportionally removes large residual anchor points from the remaining frame sequence to obtain the final anchor point group.
2. The method for accurate identification of multi-dimensional borehole features according to claim 1, characterized in that, In S3, the statement based on The image of the borehole area obtained from the frame Each frame sequence will The frame sequence is constructed into a frame sequence group including: Will The image of the drilled area in the frame Combined into frame groups ; Determine from the frame group according to equation (1) Frame sequence ,Will The frame sequence Constructed into frame sequence groups ; (1); In the above formula (1), Image of one of the drilled areas within the frame group. Images of other drilled areas within the frame group The mapping.
3. The method for accurate identification of multi-dimensional borehole features according to claim 2, characterized in that, In S402, based on the point order invariance constraint... Determine the corresponding intersection point The mapped image points include: S40201 will The intersection points are ordered clockwise, starting from the first intersection point. S40202 Locates the next position after the current position; S40203 If no sequence point exists, skip the anchor point; if a sequence point exists, determine whether the two intersections of the sequence point are adjacent. If not, take the intersection of the first position as the mapped image point of the current anchor point; if so, calculate the image point of the current anchor point on the initial visual camera. After moving the pole line forward and backward by a small angle, the temporary intersection point of the corresponding epipolar line and the orifice contour ellipse is sorted clockwise, and the intersection point with the correct point order is taken as the mapping image point of the current anchor point. S40204 repeats S40202-S40203 until the last intersection point.
4. The method for accurate identification of multi-dimensional borehole features according to claim 3, characterized in that, In S7, the obtained orifice plane and orifice contour ellipse feature information include: S701 specifies the spatial coordinates of each anchor point in the anchor point group. , Equation (5) is established, and the singular value decomposition method is used to solve it to obtain the plane characteristic parameters. , , : (5); S702 uses equation (6) to normalize the plane characteristic values, resulting in a normalized orifice plane: (6); In the aforementioned formula (6), To find the magnitude of the vector, , , , These are the characteristic parameters of the normalized orifice plane.
5. The method for accurate identification of multi-dimensional borehole features according to claim 4, characterized in that, In S7, the solution to obtain the orifice plane and orifice contour ellipse feature information also includes: S703 uses the world coordinate system O w X w Y w Z w of XOY The line of intersection between the plane and the orifice plane The X-axis direction, normal vector In the Z-axis direction, Y-axis direction, origin of world coordinate system O w Projection point on the plane of the orifice O p Establish the orifice coordinate system with the origin as the origin. O p X p Y p Z p ; S704 calculates the coordinates of each anchor point in the anchor point group in the borehole coordinate system. O p X p Y p Z p The coordinates below, its X p axis and Y p The coordinate components of the axis are the anchor points on the orifice plane. O p X p Y p The projection onto the surface is used to obtain the elliptical feature information of the orifice outline using the least squares method. This elliptical feature information includes the semi-major axis length of the orifice outline ellipse. The length of the minor semi-axis of the ellipse of the orifice profile The center coordinates of the orifice profile ellipse ) and the rotation angle of the orifice profile ellipse relative to the orifice plane .
6. The method for accurate identification of multi-dimensional borehole features according to claim 5, characterized in that, In S7, the process of determining the borehole azimuth and borehole radius includes: S705 takes the minor semi-axis length of the orifice profile ellipse. As the borehole radius; S706 calculates the normal vector of the borehole axis according to equation (7). The normal vector is used as the borehole orientation; (7); In the aforementioned formula (7), The rotation matrix from the orifice coordinate system to the world coordinate system. Let be the rotation matrix from the cylindrical coordinate system to the orifice coordinate system. =[0, 0, 1] T It is the unit vector along the Z-axis.
7. The method for accurate identification of multi-dimensional borehole features according to claim 6, characterized in that, In S8, the verification of the fitting results using the reprojection validation method includes: S801 takes 5 feature points on the fitted orifice contour ellipse. S802 calculates the image points of the five feature points in each frame of the borehole area image according to formula (8). And fit the reprojection ellipse in the borehole area image of each frame. ; (8); In the aforementioned formula (8), The three-dimensional coordinates of the feature point are in the 3D coordinates of the 3D feature point in the 3D coordinate The projected length on the optical axis of each camera For the first The intrinsic parameter matrix of each camera, From the world coordinate system to the first Rotation matrix of each camera coordinate system Let be the rotation matrix from the orifice coordinate system to the world coordinate system. The coordinates of the feature point in the orifice coordinate system. Let be the translation vector from the orifice coordinate system to the world coordinate system. From the world coordinate system to the first Translation vector of each camera coordinate system To fit an ellipse from the image points using the least squares method; S803 calculates the intersection-union ratio of the reprojected ellipse and the orifice profile ellipse according to formula (9). Determine the intersection and union ratio Is the minimum value greater than the threshold? : (9) ; In the aforementioned formula (9), For the first Iteration and the first Iterative intersection-union ratio, For the first Iterative Ellipse and the 1st The area of the intersection region between the iterative ellipses. For the first Iterative Ellipse and the 1st The area of the merging region between the iterative ellipses; If S804 is true, then the fitting result is used as the multidimensional feature of the target borehole; otherwise, several of the smallest equivalent crossover ratios are deleted. After obtaining the corresponding borehole area image, repeat the S3~S8 operations. The fitting results include the borehole radius, borehole orientation, semi-major axis length of the borehole profile ellipse, minor semi-axis length of the borehole profile ellipse, center coordinates of the borehole profile ellipse, and rotation angle of the borehole profile ellipse.