Method for calculating angular point pose of photovoltaic module
By combining the pose calculation method of two-dimensional images and three-dimensional point clouds, and using MaskRCNN and Canny edge detection algorithms, the x, y, and z-axis unit vectors of photovoltaic modules are calculated, which solves the problem of photovoltaic module pose calculation accuracy and stability in the existing technology. It solves the problem of insufficient accuracy and achieves high-precision and stable positioning.
Patent Information
- Application Number
- CN202410796857.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-17
AI Technical Summary
Existing photovoltaic module corner point pose calculation methods have low accuracy when dealing with complex scenes, occluding objects, illumination and viewing angle changes, are sensitive to noise, have high computational complexity, and poor robustness, making it difficult to achieve stable and high-precision poses. estimate.
It uses a pose calculation method that combines two-dimensional images and three-dimensional point clouds, uses the MaskRCNN algorithm for instance segmentation, Canny edge detection to extract edge information, and calculates x, y, z-axis unit vectors through plane fitting and PCA algorithms, combined with deep learning processing and fusion to improve calculation stability and accuracy.
It significantly improves the stability and accuracy of photovoltaic module pose calculation, reduces the average error, enhances the stability and reliability of the system, and is suitable for high-precision pose positioning under different lighting and environmental conditions.
Smart Images

Figure CN118657830A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of photovoltaic technology, and in particular to a method for calculating the corner point position of a photovoltaic component. Background Art
[0002] Traditionally, there are the following methods for calculating the corner pose of photovoltaic modules:
[0003] 1. The pose calculation method based on two-dimensional images usually includes two steps:
[0004] a. Object detection and segmentation
[0005] YOLO: A real-time object detection system that takes the entire image as input and outputs the detection results at once, including the category and location of the object. Its advantages are fast speed, but its disadvantages are low accuracy, inaccurate positioning, difficulty in handling dense and complex scenes, and lack of robustness to scale and perspective changes.
[0006] Faster RCNN: A region-based object detection method that first generates candidate regions and then performs classification and regression in these regions. This method has high accuracy, but is slow, has high complexity, increases the time for debugging and training, consumes a lot of memory, and has limited effect on small object detection. Mask RCNN is an extension of Fast RCNN, and has similar shortcomings to Fast RCNN, and does not handle occluded objects well.
[0007] b. Pose estimation:
[0008] PnP technology: Based on the matched feature points, the PnP algorithm is used to estimate the position and orientation of the target object, that is, to solve the rotation and translation of the object in space. Its disadvantages are that it relies heavily on the initial estimate, is sensitive to noise, has high computational complexity, may fall into a local optimal solution, and has poor robustness.
[0009] Yolo6D is an extension based on YOLO. Its disadvantages are low accuracy, unfriendly to small targets, poor handling of occluded objects, high computing resource requirements and poor robustness, making it difficult to capture all the features of complex objects.
[0010] The DPOD method has high requirements for training data, consumes a lot of computing resources, has limited ability to handle occluded objects, has poor robustness to changes in illumination and perspective, takes a long time to train, and has insufficient generalization ability.
[0011] 2. Posture calculation method based on 3D point cloud
[0012] a. Object detection and segmentation
[0013] VoxelNet: A method of voxelizing point cloud data and then processing it through a 3D convolutional neural network, suitable for target detection tasks. The disadvantages are high computational complexity, high memory consumption, and resolution loss.
[0014] SECOND (Sparsely Embedded Convolutional Detection): A sparse convolutional neural network for efficient processing of large-scale point cloud data. Its disadvantages are that it is complex to implement, has limited detection of small targets, and is sensitive to data distribution.
[0015] 3DSSD (3D Single Shot Detector): A single-stage 3D object detection method with high efficiency and high accuracy. The disadvantages are limited performance in complex scenes, insufficient processing of details, and high training difficulty.
[0016] 3DSSD (3D Single Shot Detector): A single-stage 3D object detection method with high efficiency and high accuracy. The disadvantages are high computing resource requirements, large demand for labeled data, and limited processing of complex scenes.
[0017] b. Pose estimation
[0018] ICP (Iterative Closest Point): A classic point cloud registration algorithm that iteratively finds the best rotation and translation between two point clouds to minimize the distance between them, thereby estimating the target's pose. The disadvantages are that it relies on initial alignment, may converge to the wrong local optimal solution, has high computational complexity, is sensitive to noise and outliers, has poor robustness, and lacks diversity.
[0019] In Chinese patent CN202311278745, edge contour detection and polygon fitting are performed on the grayscale image to obtain the fitted quadrilateral image and the coordinates of the quadrilateral corner points of the photovoltaic component to be clamped, and then the pose is estimated in combination with the three-dimensional information. This method has very high requirements on the camera's shooting field of view and requires long-distance shooting to ensure the complete shooting of the target. Long-distance shooting will result in insufficient corner point positioning accuracy, which ultimately leads to poor pose estimation accuracy.
[0020] In Chinese patent CN202410097114, a method for calculating the pose of a photovoltaic module based on a monocular camera is proposed. The monocular camera cannot directly obtain the depth information of the scene and needs to be estimated through other visual clues and algorithms, which may lead to a decrease in the accuracy of pose estimation. Due to the lack of three-dimensional information, it is difficult for the monocular camera to determine the exact size and distance of the object, which will affect the accuracy of pose calculation. Summary of the invention
[0021] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a method for calculating the corner point position of a photovoltaic module.
[0022] In order to achieve the above object, the present invention adopts the following technical solutions:
[0023] A method for calculating the position and posture of corner points of a photovoltaic module, the identification method comprises the following steps:
[0024] Step 1: Segmentation of two-dimensional images: Use the MaskRCNN algorithm to perform instance segmentation on the photovoltaic module image to obtain the target panel;
[0025] Step 2: Extract the edge of the photovoltaic module frame in the two-dimensional image, and use the Canny edge detection algorithm to extract the edge information of the frame of the target panel;
[0026] Step 3: 3D point cloud data processing, read the visualized 3D point cloud, and extract the point cloud within the segmented area of the target PV module: segmented points = points [mask [v,u] = 255];
[0027] Step 4: Eliminate the background noise point cloud, extract the mask of the component area according to the instance segmentation result of the target photovoltaic component, eliminate the background points according to the depth threshold, and only retain the point cloud of the photovoltaic component area: filteredpoints = segmentedpoints[depth≤depththreshold];
[0028] Step 5: Extract the point cloud data of the metal frame area around the photovoltaic module, extract the edge contour according to the instance segmentation result of the target photovoltaic module, expand the edge area, obtain the mask area of the module frame area, and use the mask area to filter the point cloud data obtained in Step 4 to obtain the point cloud set corresponding to the edge of the module frame;
[0029] Step 6: Calculate the x, y, and z axis unit vectors corresponding to the target panel corner point posture. Use the plane fitting algorithm to fit the plane where the photovoltaic module is located for the three-dimensional point cloud set in Step 4 to obtain the plane normal vector of the target photovoltaic module, that is, the z axis unit vector z = [a, b, c] T , for the Step 5 three-dimensional point cloud set, use the straight line fitting algorithm to fit the straight line where the edge of the photovoltaic module frame is located, and obtain the unit vector x=[a,b,c]T of the x-axis and the unit vector y=[a,b,c]T of the y-axis of the target photovoltaic module.
[0030] Preferably, the steps for calculating the x-axis and y-axis unit vectors corresponding to the target panel corner point posture matrix are as follows:
[0031] a. For the three-dimensional point cloud set in Step 4, use the plane fitting algorithm to fit the plane where the photovoltaic module is located, and obtain the plane normal vector of the target photovoltaic module, that is, the unit vector of the z axis z = [a, b, c] T ;
[0032] b. Use the PCA algorithm to calculate the main directions of the edge points obtained in Step 5, determine the x-axis and y-axis, and centralize the edge point cloud data:
[0033] X=edgePoints-mean(edgePoints,axis=0)
[0034] c. Calculate the covariance matrix C = X T X / (n-1);
[0035] d. Calculate the eigenvalue and eigenvector Cv i =λ i vi;
[0036] e. Use the eigenvector of the largest eigenvalue as the tentative x-axis direction x0, and the eigenvector corresponding to the second largest eigenvalue as the tentative y-axis direction y0;
[0037] f. Use Schmidt orthogonalization:
[0038] x=x0-(x0*·z / z·z)·z
[0039] x=x / ||x||
[0040] Y=y0-(y 0· z / z·z)·z-(y0·x / x·x)·x
[0041] y=y / ||y||
[0042] Preferably, in Step 2, the input photovoltaic module image is smoothed by a Gaussian filter to reduce noise and improve the effect of subsequent edge detection: blurred = GaussianBlur (gray, (5,5), 0), the edge of the image is detected using the Canny edge detection algorithm, and the edge contour of the target photovoltaic module frame is extracted by contour detection: edges = Canny (blurred, 50, 150).
[0043] Preferably, in Step 4, the extracted component area includes the surrounding metal frame and internal area of the photovoltaic component.
[0044] Preferably, in Step 6, the plane fitting algorithm includes RANSAC algorithm, SVD, PCA and least squares method.
[0045] Preferably, the devices used for image acquisition are 2D visible light cameras and 3D cameras.
[0046] Compared with the prior art, the present invention has the following beneficial effects: the present invention improves the stability and accuracy of the pose calculation of photovoltaic modules: the pose calculation method combining two-dimensional images and three-dimensional point clouds improves stability and reduces average error. The method is carried out under different lighting and environmental conditions, using high-resolution cameras and depth cameras to obtain data, combined with deep learning algorithm processing and fusion. Traditional methods mainly rely on a single two-dimensional image or three-dimensional point cloud, which is easily affected by environmental factors and has low recognition accuracy. The present invention combines two-dimensional images and three-dimensional point clouds and uses deep learning methods to significantly improve the stability and accuracy of the calculation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more specifically and intuitively illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0048] Figure 1 The principle of the present invention is shown in FIG. Figure 1 ;
[0049] Figure 2 The principle of the present invention is shown in FIG. Figure 2 . DETAILED DESCRIPTION
[0050] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0051] Reference Figure 1-2 , a method for calculating the corner point position of a photovoltaic module, the identification method comprises the following steps:
[0052] Step 1: Segmentation of two-dimensional images: Use the MaskRCNN algorithm to perform instance segmentation on the photovoltaic module image to obtain the target panel;
[0053] Step 2: Extract the edge of the photovoltaic module frame in the two-dimensional image, and use the Canny edge detection algorithm to extract the edge information of the frame of the target panel;
[0054] Step 3: 3D point cloud data processing, read the visualized 3D point cloud, and extract the point cloud within the segmented area of the target PV module: segmented points = points [mask [v,u] = 255];
[0055] Step 4: Eliminate the background noise point cloud, extract the mask of the component area according to the instance segmentation result of the target photovoltaic component, eliminate the background points according to the depth threshold, and only retain the point cloud of the photovoltaic component area: filteredpoints = segmentedpoints[depth≤depththreshold];
[0056] Step 5: Extract the point cloud data of the metal frame area around the photovoltaic module, extract the edge contour according to the instance segmentation result of the target photovoltaic module, expand the edge area, obtain the mask area of the module frame area, and use the mask area to filter the point cloud data obtained in Step 4 to obtain the point cloud set corresponding to the edge of the module frame;
[0057] Step 6: Calculate the x, y, and z axis unit vectors corresponding to the target panel corner point posture. Use the plane fitting algorithm to fit the plane where the photovoltaic module is located for the three-dimensional point cloud set in Step 4 to obtain the plane normal vector of the target photovoltaic module, that is, the z axis unit vector z = [a, b, c] T , for the Step 5 three-dimensional point cloud set, use the straight line fitting algorithm to fit the straight line where the edge of the photovoltaic module frame is located, and obtain the unit vector x of the x-axis of the target photovoltaic module = [a, b, c] T and the unit vector of the y-axis y=[a,b,c] T .
[0058] In this implementation, the steps for calculating the x, y, and z axis unit vectors of the target panel are as follows:
[0059] a. For the three-dimensional point cloud set in Step 4, use the plane fitting algorithm to fit the plane where the photovoltaic module is located, and obtain the plane normal vector of the target photovoltaic module, that is, the unit vector of the z axis z = [a, b, c] T ;
[0060] b. Use the PCA algorithm to calculate the main directions of the edge points obtained in Step 5, determine the x-axis and y-axis b, and centralize the edge point cloud data:
[0061] X=edgePoints-mean(edgePoints,axis=0)
[0062] c. Calculate the covariance matrix C = X T X / (n-1);
[0063] d. Calculate the eigenvalue and eigenvector Cv i =λ i vi;
[0064] e. Use the eigenvector of the largest eigenvalue as the tentative x-axis direction x0, and the eigenvector corresponding to the second largest eigenvalue as the tentative y-axis direction y0;
[0065] f. Use Schmidt orthogonalization:
[0066] x=x0-(x0*·z / z·z)·z
[0067] x=x / ||x||
[0068] Y=y0-(y 0· z / z·z)·z-(y0·x / x·x)·x
[0069] y=y / ||y||
[0070] In Step 2, the input PV module image is smoothed by a Gaussian filter to reduce noise and improve the effect of subsequent edge detection: blurred = GaussianBlur(gray,(5,5),0), the Canny edge detection algorithm is used to detect the edge of the image, and the edge contour of the target PV module frame is extracted by contour detection: edges = Canny(blurred,50,150).
[0071] The steps of Canny edge detection algorithm are as follows:
[0072] 1) Gaussian filter denoising: Use a Gaussian filter to smooth the image to remove noise. The Gaussian filter is a low-pass filter that can effectively reduce noise in the image.
[0073] 2) Calculate gradient: Calculate the gradient of the image in the horizontal direction (Gx) and the vertical direction (Gy) through the Sobel operator.
[0074] 3) Non-maximum suppression (NMS): In the gradient image, only the local maximum points in the gradient direction are retained and non-maximum points are suppressed to obtain refined edges.
[0075] 4) Double threshold detection: Use two thresholds (high threshold and low threshold) to connect the edge of the image after non-maximum suppression. Pixels above the high threshold are considered strong edges, pixels below the low threshold are suppressed, and pixels in between are classified as weak edges. If they are connected to a strong edge, they are retained, otherwise they are suppressed.
[0076] In this embodiment, in Step 4, the extracted component area includes the surrounding metal frame and internal area of the photovoltaic component.
[0077] In this implementation, in Step 6, the plane fitting algorithm includes the RANSAC algorithm, SVD, PCA and the least squares method.
[0078] 1. Acquisition and processing of two-dimensional color images:
[0079] Use a visible light camera to obtain color images of photovoltaic modules.
[0080] A deep learning algorithm is used to perform instance segmentation on the color image, preliminarily locate the approximate position of the target photovoltaic module, and an image processing algorithm such as the Canny algorithm is used to extract the edge information of the border.
[0081] 2. Acquisition of 3D point cloud information:
[0082] Depth information is obtained through any 3D camera (binocular stereo camera, lidar, TOF, structured light camera) and converted into 3D point cloud data.
[0083] 3. Three-dimensional plane fitting:
[0084] The three-dimensional point cloud corresponding to the target photovoltaic module area is extracted, and the three-dimensional point cloud data is fitted into a three-dimensional plane through algorithms such as RANSAC, SVD, PCA or least squares method to obtain the plane normal vector information of the photovoltaic module (i.e., the Z-axis vector corresponding to the photovoltaic module corner point attitude matrix).
[0085] 4. Combine 2D and 3D data:
[0086] The edge information of the target photovoltaic module is extracted from the color image and combined with the three-dimensional point cloud data for accurate pose calculation.
[0087] By fusing two-dimensional plane position information and three-dimensional point cloud posture information, the accuracy of overall posture calculation is improved.
[0088] By extracting the edges of the component frame area of the target PV component image and obtaining the corresponding point set in the 3D point cloud, the PCA algorithm is used to perform 3D straight line fitting, the X and Y axis vectors corresponding to the attitude matrix are calculated, and the Schmidt orthogonalization method is used to ensure the orthogonality of the x, y, and z axes, further improving the accuracy and reliability of the analysis.
[0089] The position of the PV module is determined by calculating the intersection of two three-dimensional straight lines corresponding to the X and Y axes in space to obtain the translation vector T.
[0090] The pose matrix is a mathematical tool used in robotics and computer vision to represent the position and orientation of an object in space. The pose matrix is usually composed of a rotation matrix and a translation vector, which can be expressed as:
[0091] T=[R·t]
[0092] in:
[0093] R is a rotation matrix, which is used to describe the rotation of an object around each coordinate axis.
[0094] t is a translation vector that represents the position offset of the center of the object or a specific point from the reference coordinate system to the target coordinate system.
[0095] The rotation matrix (R) is used to describe the rotation of an object relative to a coordinate system. It can be calculated by the rotation axis and rotation angle of the object, or constructed using other representation methods such as Euler angles or quaternions. In this patent, we use the unit direction vectors corresponding to the total XYZ axes of the three-dimensional space to construct the rotation matrix R.
[0096]
[0097] A rotation matrix treats each column as a unit vector corresponding to each coordinate axis.
[0098] 1. The first column represents the coordinate of the x-axis of the corresponding posture in the global coordinate system.
[0099] 2. The second column represents the coordinate of the y-axis of the corresponding posture in the global coordinate system.
[0100] 3. The third column represents the coordinate of the z-axis of the corresponding posture in the global coordinate system.
[0101] A rotation matrix has the following properties:
[0102] Orthogonality: R T R = I, where I is the identity matrix, R T is the transpose of R.
[0103] The determinant is 1: det(R) = 1, indicating that pure rotation does not involve mirror flipping.
[0104] The translation vector (t) is a three-dimensional vector that represents the linear movement of a reference point (such as the center of mass) of an object from the origin of the reference coordinate system to the target location. The translation vector can be written as (x, y, z), where x, y, and z are the translation distances along the three coordinate axes respectively.
[0105] The present invention proposes a method for calculating the corner position of photovoltaic modules, which uses advanced visual recognition technology to accurately locate the position of photovoltaic modules. The purpose of this technology is to provide accurate coordinate information for the automated handling of photovoltaic modules, thereby improving the efficiency and accuracy of the automated process.
[0106] In order to improve the accuracy of posture calculation, especially when the photovoltaic module is partially blocked, the present invention also provides a posture correction method. The method extracts the edge information and corner point information of the photovoltaic module, and can accurately calculate the posture of the photovoltaic module even when the edge information is incomplete.
[0107] The method of the present invention involves using a visible light camera to capture an image of a photovoltaic module, and simultaneously using any 3D camera to collect corresponding point cloud information. Importantly, the collected RGB image and point cloud image must be strictly aligned to ensure the accuracy of the pose calculation. Then, the pose of the photovoltaic module is calculated by combining this information through image and point cloud processing algorithms.
[0108] In terms of specific implementation, the present invention first obtains the corresponding color image and the point cloud data aligned with it through a 2D visible light camera and a 3D camera. Using the two-dimensional color image as auxiliary information, the edge segmentation of the color image is performed through a deep learning algorithm, such as an instance segmentation algorithm such as MaskRCNN, to preliminarily determine the approximate posture of the photovoltaic module, and then extract the point cloud data of the corresponding area for three-dimensional plane fitting, and combine the edge (frame) information of the photovoltaic module extracted from the two-dimensional image, extract the corresponding three-dimensional point cloud, and fit the three-dimensional straight line to calculate the posture of the photovoltaic module. The position of the photovoltaic module is determined by calculating the intersection of two edge (frame) three-dimensional straight lines in space.
[0109] By combining 3D point cloud and 2D color image, the method of the present invention can accurately determine the posture and position of photovoltaic modules. This method not only greatly improves the accuracy of posture calculation, but also enhances the stability and reliability of the system, providing strong technical support for the realization of automated installation of photovoltaic modules and power station operation and maintenance.
[0110] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for calculating the corner point position of a photovoltaic module, characterized in that: The identification method comprises the following steps: Step 1: Segmentation of two-dimensional images: Use the MaskRCNN algorithm to perform instance segmentation on the photovoltaic module image to obtain the target panel; Step 2: Extract the edge of the photovoltaic module frame in the two-dimensional image, and use the Canny edge detection algorithm to extract the edge information of the frame of the target panel; Step 3: 3D point cloud data processing, read the visualized 3D point cloud, and extract the point cloud within the segmented area of the target PV module: segmented points = points [mask [v,u] = 255]; Step 4: Eliminate the background noise point cloud, extract the mask of the component area according to the instance segmentation result of the target photovoltaic component, eliminate the background points according to the depth threshold, and only retain the point cloud of the photovoltaic component area: filteredpoints = segmentedpoints[depth≤depththreshold]; Step 5: Extract the point cloud data of the metal frame area around the photovoltaic module, extract the edge contour according to the instance segmentation result of the target photovoltaic module, expand the edge area, obtain the mask area of the module frame area, and use the mask area to filter the point cloud data obtained in Step 4 to obtain the point cloud set corresponding to the edge of the module frame; Step 6: Calculate the x, y, and z axis unit vectors corresponding to the target panel corner point posture. Use the plane fitting algorithm to fit the plane where the photovoltaic module is located for the three-dimensional point cloud set in Step 4 to obtain the plane normal vector of the target photovoltaic module, that is, the z axis unit vector z = [a, b, c] T , for the Step 5 three-dimensional point cloud set, use the straight line fitting algorithm to fit the straight line where the edge of the photovoltaic module frame is located, and obtain the unit vector x=[a,b,c]T of the x-axis and the unit vector y=[a,b,c]T of the y-axis of the target photovoltaic module.
2. A method for calculating the corner point position of a photovoltaic module according to claim 1, characterized in that: The calculation steps of the x and y axis unit vectors corresponding to the target panel corner point posture matrix are as follows: a. For the three-dimensional point cloud set in Step 4, use the plane fitting algorithm to fit the plane where the photovoltaic module is located to obtain the plane normal vector of the target photovoltaic module, that is, the unit vector of the z-axis z=[a,b,c] T ; b. Use the PCA algorithm to calculate the main directions of the edge points obtained in Step 5, determine the x-axis and y-axis, and centralize the edge point cloud data: X=edgePoints-mean(edgePoints,axis=0) c. Calculate the covariance matrix C = X T X / (n-1); d. Calculate the eigenvalue and eigenvector Cv i =λ i vi; e. Use the eigenvector of the largest eigenvalue as the tentative x-axis direction x0, and the eigenvector corresponding to the second largest eigenvalue as the tentative y-axis direction y0; f. Use Schmidt orthogonalization: x=x0-(x0*·z / z·z)·z x=x / ||x|| Y=y0-(y 0· z / z·z)·z-(y0·x / x·x)·x y=y / ||y||.
3. A method for calculating the corner point position of a photovoltaic module according to claim 2, characterized in that: In Step 2, the input PV module image is smoothed by a Gaussian filter to reduce noise and improve the effect of subsequent edge detection: blurred = GaussianBlur(gray,(5,5),0), the Canny edge detection algorithm is used to detect the edge of the image, and the edge contour of the target PV module frame is extracted by contour detection: edges = Canny(blurred,50,150).
4. A method for calculating the corner point position of a photovoltaic module according to claim 3, characterized in that: In Step 4, the extracted component area includes the surrounding metal frame and internal area of the photovoltaic component.
5. A method for calculating the corner point position of a photovoltaic module according to claim 4, characterized in that: In Step 6, the plane fitting algorithms include RANSAC algorithm, SVD, PCA and least squares method.
6. A method for calculating the corner point position of a photovoltaic module according to claim 5, characterized in that: The equipment used for image acquisition is a 2D visible light camera and a 3D camera.
Citation Information
Cited By
Photovoltaic module paving method, storage medium and paving equipment
CN121033163A
Photovoltaic panel pose recognition method and storage medium
CN122336001A
