Insulator space attitude positioning and three-dimensional reconstruction method based on Realsense

Through the image processing technology based on Realsense, high-precision spatial attitude positioning and three-dimensional reconstruction of distribution network insulators is achieved, which solves the problem of insufficient positioning accuracy in the existing technology and improves the reliability and safety of automated maintenance.

CN119810408APending Publication Date: 2025-04-11NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411855491.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-08
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The prior art is difficult to achieve high-precision spatial attitude positioning and three-dimensional reconstruction of distribution network insulators, which affects the automated maintenance and safety of distribution networks.

Method used

Using the Realsense-based image processing method, the insulators are identified and segmented through the Mask RCNN network, the edge contour of the mask map is repaired, the central axis space linear equation is extracted, and the symmetric point scanning filling and axis-to-edge scanning filtering algorithm are combined to repair the depth map to achieve high-precision positioning and three-dimensional reconstruction of the insulators.

Benefits of technology

It improves the positioning accuracy and three-dimensional modeling quality of the insulator, and enhances the reliability and safety of automatic maintenance of the distribution network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810408A_ABST
    Figure CN119810408A_ABST
Patent Text Reader

Abstract

The invention discloses an insulator space attitude positioning and three-dimensional reconstruction method based on Realsense. The method comprises the following steps: acquiring an RGB image and a depth image of an insulator through a Realsense depth camera; identifying and segmenting the RGB image of the insulator by using a Mask RCNN (Regional Convolutional Neural Network) to obtain a mask image of the insulator; dividing and repairing the edge contour of the mask pattern according to the region of the HSV color space; three-dimensional coordinates of key points of the insulator are extracted, a space linear equation of the central axis is fitted, and the space position and the attitude angle of the insulator are determined; repairing the region depth map of the filled insulator by using an algorithm of symmetric scanning filling and scanning filtering along an axis to obtain a complete and accurate depth value; and fusing the plane information extracted from the mask image and the accurate depth information of the repaired depth image to realize three-dimensional reconstruction of the insulator. According to the method, the depth map is accurately repaired and filled according to the depth information of the symmetrical positions of the space symmetrical parts such as the insulator, the problems of depth deficiency and inaccuracy of the Realsense depth map at the edge of the object to be detected are solved to a certain extent, the RMSE and PSMR of the regional depth map are improved, and the effect of enhancing the three-dimensional modeling accuracy of the insulator is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image processing, and in particular relates to a Realsense-based insulator spatial posture positioning and three-dimensional reconstruction method. Background Art

[0002] The distribution network operated by the power supply company is at the end of the power system. It is a key link in serving users and ensuring the continuous supply of electricity. Its reliability occupies a very important position in the entire power supply system. Therefore, power supply companies continue to strengthen the construction of distribution network non-stop operation capabilities and strive to adhere to the principle of "can be brought without stopping". Power outage maintenance is the most common way of daily maintenance and repair of distribution networks. In the manual maintenance method, operators use high-voltage working tools to contact equipment, the working conditions are harsh, the risk factor is high, and the operation efficiency is low. Therefore, it is gradually unable to adapt to the current large-scale, complex environment, and high-efficiency power outage maintenance projects. In order to improve the reliability of power distribution and the efficiency of live-line operations, ensure the safety of live-line operators, and improve the automation level of live-line operations, it is of great significance to develop a solution for automatic maintenance of distribution network components by robots. The problem of robot recognition and posture positioning of distribution network components is one of the problems that need to be solved urgently. Insulators are one of the most common distribution network components. Therefore, it is of great value to develop a method for automatically identifying insulators and realizing spatial positioning and posture discrimination three-dimensional reconstruction.

[0003] As a representative instrument of depth ranging cameras, Realsense has developed rapidly in the field of object detection and high-precision positioning technology in recent years. The Realsense camera collects the two-dimensional RGB image of the target object and the depth image aligned with the coordinate system, and then uses artificial intelligence technology and image processing technology to analyze and process the image information to obtain the category information, contour information and color information of the target object. Finally, the two-dimensional area position of the target obtained by RGB image detection and segmentation is integrated with the depth information in the depth map to calculate the three-dimensional spatial coordinates of all points on the target surface. In this way, target positioning and three-dimensional modeling based on the Realsense system are realized. Summary of the invention

[0004] In order to solve the problems existing in the prior art, the present invention provides a Realsense-based insulator spatial posture positioning and three-dimensional reconstruction method, which can improve the positioning accuracy and three-dimensional modeling quality of the insulator.

[0005] The technical problem to be solved by the present invention is achieved through the following technical solutions:

[0006] In a first aspect, a method for spatial positioning and three-dimensional posture angle determination of an insulator based on Realsense is provided, comprising the following steps:

[0007] a. Build the Realsense image testing system to collect the aligned insulator RGB image and depth image.

[0008] b. The Mask RCNN network identifies and segments the insulator to obtain a binary mask image after removing the background.

[0009] c. Repair and improve the edge of the mask area and complete the insulator area missed during the network segmentation process.

[0010] d. Extract the minimum circumscribed rectangle of the mask area and the two-dimensional pixel coordinates of the 10 key points on the central axis.

[0011] e. Obtain the spatial straight line equation of the central axis of the insulator, and obtain the spatial coordinates and axial attitude angles of its key points.

[0012] In combination with the first aspect, further, the Mask RCNN network identifies and segments the insulator to obtain a mask image, including:

[0013] The RGB image of the insulator is input into the Mask RCNN network for feature extraction. The backbone network of the Mask RCNN network uses the ResNet101 network. After bottom-up feature extraction, 5 feature maps of different stages C1-C5 are obtained. Then the last three layers of feature maps are input into the FPN to fuse the high-level and bottom-level feature information. After the RPN layer, the preliminary candidate ROI selection box is generated, and the confidence level of 0.5 is selected as the threshold of the binary mask. These ROIs are classified, regressed and masked.

[0014] In combination with the first aspect, further, the repairing and perfecting the edge portion of the mask area includes:

[0015] Extract the RGB values ​​of all points under the insulator mask area and map them to HSV pixel values, and extract the H channel and S channel. Sort all the values ​​of the H channel, obtain the distribution column of the H values ​​of all points, calculate the mean μ1 of the effective point H, determine the angle range σ1, and the lower limit μ2 of the S value; selectively dilate the edge of the mask area, if the HSV pixel value of the point in the area closer to the edge of the mask image satisfies H∈(μ1+σ1, μ1-σ1) and S∈(μ2, 1), then add this point to the mask area to repair the edge contour of the mask image and complete the main area missed during the Mask RCNN network segmentation process.

[0016] In combination with the first aspect, further, obtaining the spatial straight line equation and spatial position posture of the center axis of the insulator includes:

[0017] The minimum rotatable circumscribed rectangle of the repaired insulator mask image is extracted, and then the central axis of the insulator and the two-dimensional pixel coordinates of 10 key points on the central axis are extracted from the minimum circumscribed rectangle; the three-dimensional coordinates of the key points are obtained by multiplying the Realsense intrinsic parameter matrix and the two-dimensional pixel coordinates of these key points.

[0018] The three-dimensional coordinates of these 10 key points are linearly fitted to obtain the spatial straight line equation of the central axis of the insulator. The spatial coordinates of the three key points in the middle and at both ends of the fitting line are selected to determine the spatial position of the insulator, and the direction vector of the fitting line is used as the spatial axial attitude angle of the insulator.

[0019] In a second aspect, the present invention provides a method for 3D reconstruction of an insulator based on Realsense depth map filling, comprising the following steps:

[0020] a. Extract the regional depth map of the insulator.

[0021] b. Use the symmetrical point scanning and filling algorithm to initially repair the regional depth map, fill black holes, and repair abnormal depth values.

[0022] c. Use the axis-to-edge scanning filter algorithm to repair the regional depth map for the second time.

[0023] d. Perform three-dimensional reconstruction of the insulator based on accurate depth information.

[0024] In combination with the second aspect, further, the regional depth map of the extracted insulator includes:

[0025] All points in the repaired insulator mask area are extracted by pixel scanning, the corresponding position of this point set area is found on the depth map, and the depth pixel value under the point set is extracted to form a depth map of the insulator area with the background depth information removed.

[0026] In combination with the second aspect, further, the initial repair of the regional depth map using the symmetrical point scanning and filling algorithm includes:

[0027] First, extract the minimum rotatable circumscribed rectangle of the insulator mask area after contour repair, return the coordinates of the four foot points, take the longer side AD as the axial scanning direction, and the shorter side AB as the lateral scanning direction, and calculate the and The direction vector of the axial scanning unit vector is calculated by the formula and the transverse scanning unit vector

[0028]

[0029] On the long side AD of the minimum circumscribed rectangle, along the positive axial direction Unit vector Scan point by point with the step length. Then take each scanning point on the long side AD as the starting point and scan along the horizontal positive direction. Unit vector Scan point by point with a step length of 1, ending at the opposite side BC of AD, and obtain several rows of transverse scanning points parallel to the transverse direction of the minimum circumscribed rectangle of the insulator. According to the symmetrical position relationship between each row of transverse scanning points and the central axis, the symmetrical point coordinates of each point relative to the central axis can be obtained.

[0030] On the long side AD of the minimum circumscribed rectangle, along the axial direction The two-dimensional coordinates of each row of horizontal scanning point set are extracted point by point, and the depth value of the point is read out at the corresponding coordinate position of the depth map. If the depth value is abnormal, that is, the depth value is 0 or the depth value exceeds the depth range of the insulator, the corresponding position relationship between the depth value of the symmetrical point of the point relative to the central axis and the spatial central axis equation is used to calculate a more accurate depth value of the point, and this depth value is used to replace the abnormal depth value to complete the initial repair of the depth map.

[0031] In combination with the second aspect, further, the second repairing of the regional depth map by using the axis-to-edge scanning filtering algorithm includes:

[0032] On the median axis of the minimum circumscribed rectangle, along the positive axial direction with a unit vector Scan point by point with the step length. Then take each scanning point on the central axis of the long side as the starting point and scan along the negative direction of the horizontal scan. Scan point by point with a unit vector as the step size, and read the depth value corresponding to each scanned point on the depth map after the initial repair. If the depth value is still abnormal, construct a 3×3 convolution kernel with the point as the center, read the other 8 depth values ​​in the convolution kernel, and select the median of several depth values ​​that meet the conditions as the depth value of the point to replace the abnormal depth value.

[0033] Taking each scanning point on the central axis as the starting point, the unit vector Scan point by point with the step size, perform the same scanning and filtering operation, and complete the secondary restoration of the depth map.

[0034] In combination with the second aspect, further, the three-dimensional reconstruction of the insulator includes:

[0035] The three-dimensional reconstruction of the insulator is achieved by taking all the point sets in the mask area as (X, Y) coordinates and the corresponding depth values ​​in the depth map of the area after two repairs as Z coordinates.

[0036] Beneficial effects of the present invention: The present invention repairs the edge area of ​​the mask image after the Mask RCNN network segmentation according to the distribution law of the main color of the insulator in the HSV color space, thereby improving the segmentation effect of the Mask RCNN network on the arrester. And by fitting the spatial straight line equation of the central axis of the insulator, the key point coordinates and spatial posture angles of the insulator are determined, and the insulator is effectively positioned with high precision. And the symmetrical point scanning filling algorithm and the axis to edge scanning filtering algorithm are used to repair the insulator depth map to obtain more accurate and complete depth information of all points, thereby improving the RMSE and PSMR of the regional depth map, and achieving the effect of enhancing the accuracy of the three-dimensional modeling of the insulator. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic flow chart of a method for spatial posture positioning and three-dimensional reconstruction of an insulator based on Realsense in the present invention;

[0038] Figure 2 Realsense depth camera front view;

[0039] Figure 3 Insulator segmentation mask diagram;

[0040] Figure 4 Symmetrical scanning fill map;

[0041] Figure 5 Scanning the filter graph along the axis; DETAILED DESCRIPTION

[0042] In order to further describe the technical features and effects of the present invention, the present invention is further described below in conjunction with the accompanying drawings and specific implementation methods.

[0043] like Figure 1 The present invention provides a method for positioning and three-dimensionally reconstructing an insulator spatial posture based on Realsense, comprising the following steps:

[0044] Step 1: Realsense collects the insulator RGB image and depth image

[0045] Build a Realsense system, such as Figure 2 As shown, the aligned insulator RGB image and depth image are collected.

[0046] Step 2: Identify and segment insulators and repair the edge contour of the mask image

[0047] The acquired RGB image of the insulator is input into the Mask RCNN network. Mask RCNN selects ResNet101 as the backbone network. RestNet101 extracts the feature information of the insulator. After bottom-up feature extraction, 5 feature maps of different stages C1-C5 are obtained. Then the feature maps of different stages are input into the feature combination network FPN to achieve top-down high-level and bottom-level feature fusion. The fused feature layer is sent to the RPN network to obtain the preliminary candidate box, and ROIAlign is used to resize and align the candidate boxes of different sizes. Finally, the confidence level of 0.5 is selected as the threshold of the binary mask, and these ROIs are classified (N category classification), candidate box regression and mask generation are performed to obtain Figure 3 Mask image of the insulator shown.

[0048] For the insulator mask area obtained by Mask RCNN network segmentation, extract the RGB values ​​of all points under the white mask area, convert them into HSV pixel values ​​through mapping relationship, and extract the H channel and S channel values ​​of all points. Sort all the values ​​of H channel, obtain the distribution column of all H values ​​between -180° and 180°, calculate the mean value μ1 of H value of valid points, determine the angle range σ1 and the lower limit μ2 of radius S value according to the regional division relationship of HSV color space; selectively dilate the edge of the mask area, if the HSV pixel value of the point in the area closer to the edge of the mask image satisfies H∈(μ1+σ1, μ1-σ1) and S∈(μ2, 1), then add this point to the mask area, so as to repair and supplement the small part of the insulator area missed during the segmentation process of Mask RCNN network.

[0049] Step 3: Get the equation of the central axis line in space, and get the spatial coordinates and axial attitude angles of the key points

[0050] The minimum rotatable circumscribed rectangle is extracted from the repaired insulator mask image, and then the central axis of the insulator and the two-dimensional pixel coordinates of 10 key points on the central axis are extracted from the minimum circumscribed rectangle. The three-dimensional coordinates of the key points are obtained by multiplying the internal parameter matrix and the two-dimensional pixel coordinates of these key points. The three-dimensional coordinates of these points are used to fit the spatial straight line equation of the central axis of the insulator, and three key points in the middle and at both ends of the fitting line are selected to determine the spatial position of the insulator, and the spatial axial attitude angle of the insulator is obtained by the direction vector of the fitting line.

[0051] Step 4: Use the symmetrical point scanning and filling algorithm to initially repair the regional depth map, fill black holes and repair outliers

[0052] like Figure 4The figure shows the process of filling and repairing the depth map using the symmetrical point scanning algorithm. First, extract the minimum rotatable circumscribed rectangle of the insulator mask area after contour repair, and return the coordinates of the four foot points A(x0,y0), B(x1,y1), C(x2,y2), and D(x3,y3). The axial scanning direction is the shorter side. is the horizontal scanning direction, calculated from the foot point coordinates and The direction vector of the axial scanning unit vector is calculated by the formula and the transverse scanning unit vector

[0053]

[0054] Let the integer length of AD be h, and the integer length of AB be w. On the long side AD of the minimum circumscribed rectangle, along the positive axial direction Unit vector If we scan point by point with a step length of , we can get h uniformly spaced scanning points on the edge AD, which are recorded as point set D. Then, for each point D in point set D i (i∈[0,h)) is the starting point (i.e., the scanning points arranged in sequence on the AD edge), along the horizontal positive direction Unit vector Scan point by point with the step length of 1, ending at the opposite side BC of AD, and obtain w lines of scanning points parallel to the transverse direction AB of the minimum circumscribed rectangle of the insulator. That is, for each point D in the point set D i , will be obtained by horizontal scanning A parallel row of points D ij (j∈[0,w)). According to each row of horizontal scanning point D ij The symmetrical position relationship with the central axis can be used to obtain the symmetrical point coordinates of each point relative to the central axis, such as D ij The symmetric point of the central axis is D i(w-j) .

[0055] On the long side AD of the minimum circumscribed rectangle, along the axial direction For each row of horizontal scanning point set D ij Extract the two-dimensional coordinates point by point, and read the depth value of the point at the corresponding coordinate position of the depth map. If the depth value is abnormal, that is, the depth value is 0 or the depth value exceeds the depth range of the insulator, use the symmetrical point D of the point relative to the central axis to obtain the depth value of the point. i(w-j) The depth value of the point D is calculated by the corresponding position relationship between the axis equation in space. ij The more accurate depth value is obtained, and the abnormal depth value is replaced by this depth value to complete the initial repair of the depth map.

[0056] Step 5: Use the axis-to-edge scanning filter algorithm to repair the regional depth map

[0057] For a small number of points, the depth values ​​of the points themselves and the points symmetrical about the central axis are missing or abnormal, which makes it impossible for the symmetrical point scanning and filling algorithm to effectively process them. In this case, the axis-to-edge scanning filtering algorithm is used to predict the depth value of the point based on the depth values ​​of the pixels adjacent to these points. Figure 5 The figure shows the process of secondary restoration of the depth map by the axis-to-edge scanning filter algorithm. On the central axis of the minimum circumscribed rectangle, a unit vector is drawn along the positive direction of the axis. Scan point by point with the step length. Then take each scanning point on the central axis of the long side as the starting point and scan along the negative direction of the horizontal scan. Scan point by point with a unit vector as the step size, and read the depth value corresponding to each scanned point on the depth map after the initial repair. If the depth value is still abnormal, construct a 3×3 convolution kernel with the point as the center, read the other 8 depth values ​​in the convolution kernel, and select the median of several depth values ​​that meet the conditions as the depth value of the point to replace the abnormal depth value.

[0058] Then, take each scanning point on the central axis as the starting point and scan along the positive direction of the horizontal scan with a unit vector Scan point by point with the step size, perform the same scanning and filtering operation, and complete the secondary restoration of the depth map.

[0059] Step 6: 3D reconstruction of the insulator based on accurate depth information

[0060] With all the point sets in the mask area as (X, Y) coordinates and the corresponding depth values ​​in the depth map of the area after two repairs as Z coordinates, high-precision three-dimensional reconstruction of the insulator is achieved.

[0061] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0062] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0063] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0064] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for spatial posture positioning and three-dimensional reconstruction of an insulator based on Realsense, characterized in that: In view of the spatial symmetry of the insulator, the axial posture is used as a guide, and the depth map is accurately repaired and filled according to the depth information of the symmetrical position of the void point. Then, the plane information and depth information of the insulator are integrated to achieve 3D reconstruction: The specific implementation method includes the following steps: S1. Realsense camera collects RGB images and depth images of insulators, and uses the deep learning model Mask RCNN network to identify and segment the insulators to obtain a single-channel binary mask image of the insulator after removing the background. S2. Using the insulator region mask image described in S1, the edge portion of the insulator mask region is repaired and improved according to the region division of the HSV color space to complete the main region missed during the Mask RCNN segmentation process. S3. Using the repaired insulator mask image described in S2, extract the two-dimensional pixel coordinates of the central axis and key points of the insulator in the mask area, map the three-dimensional coordinates of the key points in the camera coordinate system, perform linear fitting on all key points, and obtain the spatial straight line equation of the central axis of the insulator, thereby determining the spatial coordinates and axial posture of the key points of the insulator. S4. Using the repaired insulator mask image described in S2, all point sets in the mask area are obtained by pixel scanning, the depth values ​​at the corresponding point set area positions on the depth map are extracted, and the information of the two is fused to obtain the regional depth map. S5. Using the regional depth map described in S4, guided by the spatial straight line equation of the central axis of the insulator, the symmetrical point scanning and filling algorithm is used to fill black holes and repair depth values ​​in the regional depth map to complete the initial repair of the depth map. S6. Using the regional depth map initially repaired in S5, an axis-to-edge scanning filtering algorithm is applied to perform a secondary repair on the depth map to obtain a complete and accurate regional depth map after repair. S7. Using the repaired regional depth map described in S6, the plane information extracted by the mask map and the accurate depth information of the depth map are integrated to achieve three-dimensional reconstruction of the insulator.

2. The Realsense-based insulator spatial posture positioning and three-dimensional reconstruction according to claim 1, characterized in that: In step S2, the edge of the insulator mask area is repaired and perfected, and the specific method is as follows: S21. For the insulator mask area obtained by Mask RCNN network segmentation, extract the RGB values ​​of all points under the mask area, convert them into HSV pixel values ​​through mapping relationship, and extract the H channel and S channel values ​​of all points. S22. Sort all the values ​​of the H channel and obtain the distribution column of all H values ​​in the range of -180° to 180°, calculate the mean value μ1 of the H value of the valid point, determine the angle range σ1 and the lower limit μ2 of the radius S value according to the area division relationship of the HSV color space. S23. Perform selective dilation on the edge of the mask area. If the HSV pixel value of a point in the area closer to the edge of the mask image satisfies H∈(μ1+σ1, μ1-σ1) and S∈(μ2, 1), add this point to the mask area.

3. The Realsense-based insulator spatial posture positioning and three-dimensional reconstruction according to claim 1 is characterized in that: The step S3 is to determine the key point coordinates and axial posture of the insulator, and the specific method is as follows: S31. Construct a rotatable minimum circumscribed rectangle for the repaired insulator mask area to extract the central axis of the insulator, select 10 equally spaced key points on the central axis, obtain the two-dimensional pixel coordinates, read the depth values ​​of the key points and multiply them with the camera's intrinsic parameter matrix to obtain the three-dimensional coordinates of the 10 key points, and obtain the spatial straight line equation of the central axis after linear fitting. S32. Determine the central axis from the spatial straight line equation of the central axis Equisection point, midpoint, The three-dimensional coordinates of the equally divided points are used to determine the spatial position of the insulator, and the direction vector of the spatial straight line equation is used as the axial posture of the insulator.

4. The Realsense-based insulator spatial posture positioning and three-dimensional reconstruction according to claim 1, characterized in that: The specific method of step S5, using the symmetrical point scanning and filling algorithm to repair the insulator depth map is as follows: S51. Extract the minimum rotatable circumscribed rectangle of the insulator mask area after contour repair, and return the coordinates of the four foot points, with the longer side The axial scanning direction is the shorter side. is the horizontal scanning direction, and the vector is calculated from the foot point coordinates and Then normalize and calculate the axial scanning unit vector and the transverse scanning unit vector S52. On the long side AD of the minimum circumscribed rectangle, from point A to point D along the positive axial direction Unit vector Scan point by point with the step length, and get h scanning points D i (i∈[0,h)). Then take each scan point D on the AD edge i As the starting point, along the horizontal positive direction Unit vector Scan point by point with a step length of 1, ending at BC opposite to AD, and obtain h rows of scan points parallel to the horizontal direction of the circumscribed rectangle, and each row has w points. This h×w scan point set is recorded as D ij (i∈[0,h),j∈[0,w)). Since the lateral scanning direction is symmetrical about the central axis, we can get D ij The symmetric point of the central axis is D i(w-j) ; S53. On the long side AD of the minimum circumscribed rectangle, along the axial direction For each row of horizontal scanning point set D ij Extract the 2D coordinates point by point and read the depth value of the point on the depth map. ij If the depth value of the point is missing or abnormal, that is, the depth value is 0 or exceeds the depth range of the insulator, then according to D ij The symmetrical position relationship between the point and the spatial equation of the central axis is determined by the symmetrical point D of the point. i(w-j) The depth value D is calculated ij The actual depth value of the point is used to replace the abnormal depth value to complete the initial repair of the depth map, as shown in the following formula: Depth[D ij ] is D ij The actual depth value of the point, Depth[D i(w-j) ] is D ij The depth value of the symmetric point. Depth[D ij ]=f(Depth[D i(w-j) ])。 5. The Realsense-based insulator spatial posture positioning and three-dimensional reconstruction according to claim 1, characterized in that: The specific method of the step S6, using the axis-to-edge scanning filter algorithm to repair the depth map twice is as follows: S61. On the median axis of the minimum circumscribed rectangle, along the positive axial direction with a unit vector Scan point by point with the step length of . Then take each scanning point on the central axis of the long side as the starting point, and scan in the negative direction of the horizontal scan with a unit vector Scan point by point with a step size of 1, and read the depth value corresponding to each scanning point on the depth map after the initial repair. If the depth value is still abnormal, construct a 3x3 convolution kernel with the point as the center, read the other 8 depth values ​​in the convolution kernel, and select the median of several depth values ​​that meet the conditions as the depth value of the point to replace the abnormal depth value. S62. Take each scanning point on the central axis of the long side as the starting point and scan along the positive direction of the horizontal scan with the unit vector v d Scan point by point with the step size, perform the same scanning and filtering operation, and complete the secondary restoration of the depth map.

Citation Information

Cited By

  • Long material positioning method based on machine vision

    CN121616615A

  • Image-based insulator digital three-dimensional attitude detection method and system

    CN122453931A

  • A digital three-dimensional attitude detection method and system for insulators based on images

    CN122453931B