Photovoltaic panel fault three-dimensional positioning method based on multi-source image mapping
By combining thermal infrared images and RGB images, using object detection models and three-dimensional point cloud technology, high-precision three-dimensional positioning of photovoltaic panel faults is achieved, solving the problem of insufficient fault positioning accuracy in the existing technology, and improving drone inspection autonomy and efficiency.
Patent Information
- Application Number
- CN202411212465.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-11-29
AI Technical Summary
The existing photovoltaic panel fault positioning methods are insufficient, which leads to inspection personnel needing assistance in positioning, which consumes manpower and is not very autonomous, making it difficult to quickly and accurately identify the fault location of the photovoltaic panel.
Using multi-source image mapping method, combining thermal infrared images and RGB images, using pre-trained object detection model and three-dimensional point cloud reconstruction technology, the three-dimensional coordinates of the fault location are obtained, and the coordinate mapping relationship is established through edge detection and matching point calculation. , improve positioning accuracy and autonomy.
It improves the accuracy of fault positioning of photovoltaic panels, reduces manpower consumption and time, realizes autonomous inspection of drones, and can quickly and accurately identify fault locations.
Smart Images

Figure CN119048599A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of photovoltaic panel fault positioning, and in particular to a photovoltaic panel fault three-dimensional positioning method based on multi-source image mapping. Background Art
[0002] Since photovoltaic panels are kept outdoors for a long time, they may crack, fail, or be blocked, which may cause abnormal heating of the photovoltaic panels and form hot spots, which will greatly affect the power generation and efficiency of the photovoltaic power station, and may even burn the panels and cause fires. Therefore, timely and efficient positioning and repair of these faults are of great significance to the stable operation and maintenance of photovoltaic power stations and the personal safety of maintenance personnel.
[0003] Regarding the research on photovoltaic area positioning, the current research of scholars is mainly divided into two directions. The first is to locate the specific location of the photovoltaic panel by adding hardware equipment. After installing a controller with PLC control function on the photovoltaic panel, the data interaction between the photovoltaic inverter and each photovoltaic panel controller is realized. In addition to adding hardware equipment to realize information exchange, the method of completing the positioning of the photovoltaic area based on the existing location information through mathematical relationships such as coordinate transformation is also used. Specifically, the coordinate information of the photovoltaic component in the picture is obtained by combining the GPS signal with the angle relationship between the drone lens and the photovoltaic component, with an accuracy of meters; or after obtaining the GPS information of the initial point of the drone, the location information of the target point is obtained through coordinate transformation; in addition, there is a method of integrating the geographic information data of the GNSS system of the platform with the results of the photovoltaic template matching algorithm in computer image processing to realize the positioning of photovoltaic component faults. The above mainstream methods for photovoltaic panel fault positioning can only obtain the location information of the photovoltaic panel fault point with an accuracy of meters. The meter-level accuracy of positioning the fault in a photovoltaic panel is obviously not enough, and subsequent inspection personnel are required to assist in positioning, which is time-consuming and laborious.
[0004] In addition, with the development of drone technology and deep learning, a method of detecting photovoltaic panel faults by combining the perspective of an aerial infrared camera with a ground station target detection algorithm has been widely used. After detecting a photovoltaic panel fault, this method returns information about the photovoltaic area code where the fault is located. Inspection personnel find the faulty photovoltaic panel based on the location code information. This method is also labor-intensive and not very autonomous. Summary of the invention
[0005] The purpose of the present invention is to provide a photovoltaic panel fault three-dimensional positioning method using multi-source image mapping to improve fault positioning accuracy.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] A photovoltaic panel fault three-dimensional positioning method based on multi-source image mapping comprises the following steps:
[0008] Collect thermal infrared images and multi-directional RGB images of the target photovoltaic panel to be fault located;
[0009] Inputting the thermal infrared image into a pre-trained target detection model to perform fault detection, and obtaining a fault location of the target photovoltaic panel, wherein the fault location is calibrated with a rectangular frame, and the rectangular frame includes vertex coordinates;
[0010] Reconstructing based on the multi-directional RGB image to obtain three-dimensional point cloud data of the target photovoltaic panel, and separating the Z-axis coordinates of the three-dimensional point cloud data to obtain two-dimensional point cloud data of the target photovoltaic panel;
[0011] Detecting four straight edge lines of the target photovoltaic panel in the thermal infrared image, and selecting any three intersection points of the four straight edge lines as first matching points;
[0012] Filtering out four points from the two-dimensional point cloud data, and selecting corresponding three points from the four points as second matching points according to a principle of position correspondence of matching points between the thermal infrared image and the two-dimensional point cloud data;
[0013] Associating the first matching point with the second matching point to obtain a coordinate mapping relationship matrix between the thermal infrared image and the two-dimensional point cloud data;
[0014] According to the coordinate mapping relationship matrix and the vertex coordinates of the fault position, the two-dimensional point cloud coordinates of the vertex of the fault position are calculated, and the Z-axis coordinates are restored to obtain the three-dimensional point cloud coordinates of the fault position of the photovoltaic panel.
[0015] Furthermore, the training step of the target detection model includes:
[0016] Collect thermal infrared images and corresponding RGB images of photovoltaic panels;
[0017] Based on the thermal infrared image and the corresponding RGB image, the hot spots in the thermal infrared image are marked with rectangular frames using Make Sense image annotation software, and the thermal infrared image and its annotated hot spots are made into a thermal infrared image detection data set;
[0018] Build a target detection model, input the thermal infrared image detection data set for training, and obtain a trained target detection model.
[0019] Furthermore, the target detection model is trained using a Yolov8 network model.
[0020] Furthermore, the step of obtaining the two-dimensional point cloud data of the target photovoltaic panel includes:
[0021] Based on the multi-directional RGB image, the target photovoltaic panel is reconstructed using Contexcapture software to obtain three-dimensional point cloud data of the target photovoltaic panel;
[0022] The Z-axis coordinates of each point in the three-dimensional point cloud data are separated to obtain the two-dimensional point cloud data of the target photovoltaic panel, wherein the separated Z-axis coordinates are stored and have the same index as the corresponding X-axis and Y-axis coordinates.
[0023] Furthermore, the step of selecting the first matching point includes:
[0024] The edge of the target photovoltaic panel in the thermal infrared image is detected using the Canny edge detection method;
[0025] Based on the thermal infrared image with detected edges, the straight line is detected using the Hough transform straight line detection method;
[0026] Set the straight line slope threshold, sort the detected straight lines, and select the four edge straight lines of the target photovoltaic panel;
[0027] Select any three of the four intersection points of the four edge lines as the first matching points.
[0028] Furthermore, the process of obtaining the four edge lines is expressed as:
[0029] 0<=k(L m )<=v 1 or k(L m )>=v 2 ,
[0030] L h ∪L v =L m
[0031] L h = sortrows(L h ),L v = sortrows(L v )
[0032] first(L h ),last(L h ),first(L v ),last(L v )
[0033] Where L{} is the set of all straight lines, v 1 and v 2 is the slope threshold, L m {} is a straight line that meets the conditions, and the photovoltaic panel edge straight line is included in L m {}; L m {} is divided into horizontal line L h {} and vertical line L v{}, and sort by coordinate value, that is, the horizontal lines are sorted by the size of the y coordinate value, and the vertical lines are sorted by the size of the x coordinate value. After the sorting is completed, L h The first and last straight lines in {} are the two edge straight lines of the photovoltaic panel in the thermal infrared image, L v The first straight line and the last straight line in {} are the other two edge straight lines of the photovoltaic panel in the thermal infrared image.
[0034] Furthermore, the step of selecting four points from the two-dimensional point cloud data includes:
[0035] A point is randomly selected in the two-dimensional point cloud data as the origin and divided into four quadrants;
[0036] According to the principle of maximum Euclidean distance from all points in each quadrant to the origin, four points are selected, where the calculation expression of Euclidean distance is:
[0037]
[0038] In the formula, d is, (x a ,y a ) is a point in the quadrant, (x b ,y b ) represents the origin.
[0039] Furthermore, the process of obtaining the second matching point is expressed as:
[0040] d p =Max(d 1 ,d 2 ,d 3 ,······,d n ) and RGB(p)=r
[0041] Where, d p is the Euclidean distance from the matching point to the origin, Max(d 1 ,d 2 ,d 3 ,……,d n ) represents the maximum value of the Euclidean distance from all points in the quadrant to the origin, RGB(p)=r means that the RGB value of point p is r, and p is the second matching point.
[0042] Furthermore, the coordinate mapping relationship matrix is expressed as:
[0043]
[0044]
[0045] In the formula, A 1 is the thermal infrared image plane, A 2is the two-dimensional point cloud data plane, (x a ,y a )、(x b ,y b )、(x c ,y c ) is A 1 The three first matching points on (x i ,y i )、(x j ,y j )、(x k ,y k ) is A 2 The three second matching points on (x a ,y a )、(x b ,y b )、(x c ,y c ) and (x i ,y i )、(x j ,y j )、(x k ,y k ) respectively correspond to the positions, (x b ,y b ) is A 1 The origin on (x j ,y j ) is A 2 The origin on , T is the coordinate mapping relationship matrix.
[0046] Furthermore, the step of obtaining the three-dimensional point cloud coordinates of the photovoltaic panel fault position includes:
[0047] Mapping is performed based on the coordinate mapping relationship matrix and the vertex coordinates of the fault position to obtain the two-dimensional point cloud coordinates of the vertex of the initial fault position, where the mapping relationship is:
[0048]
[0049] In the formula, (x m ,y m ) is the vertex coordinate of the fault location, (x j ,y j ) is the second matching point, (x b ,y b ) is the first matching point, (x n ,y n ) is the two-dimensional point cloud coordinate of the vertex corresponding to the fault location, and T is the coordinate mapping relationship matrix;
[0050] Each point in the two-dimensional point cloud of the vertex of the initial fault position is traversed, and the nearest neighbor distance is used to find the point that actually exists in the two-dimensional point cloud data to replace the mapping result. At the same time, the Z-axis coordinate is restored according to the index to obtain the three-dimensional point cloud coordinates of the photovoltaic panel fault position.
[0051] Compared with the prior art, the present invention has the following beneficial effects:
[0052] (1) The present invention combines thermal infrared images, RGB images and three-dimensional point clouds to locate faults, performs defect detection on thermal infrared images, obtains three-dimensional point clouds based on RGB images, further separates Z coordinates to obtain two-dimensional point clouds, and selects respective matching points from the thermal infrared image and two-dimensional point cloud data to perform coordinate mapping between two two-dimensional planes. That is, the mapping of thermal infrared images to two-dimensional point cloud data is completed using the coordinate mapping relationship, the point cloud coordinates of the fault position are obtained, and then the three-dimensional point cloud of the fault position is obtained by restoring the Z axis. Compared with the prior art, the present invention can improve the accuracy of fault location.
[0053] (2) The present invention calculates the coordinate mapping relationship matrix through matching points to achieve the relationship mapping of coordinate positions, and can directly obtain the three-dimensional point cloud coordinates of the fault location, thereby improving the autonomy of drone inspections, and does not require external intervention, reducing manpower and time consumption during photovoltaic inspections. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0055] Figure 2 It is a schematic diagram of the target detection example of the present invention;
[0056] Figure 3 A schematic diagram of an example of obtaining a first matching point in a thermal infrared image of a photovoltaic panel according to the present invention;
[0057] Figure 4 A schematic diagram of a photovoltaic panel point cloud reconstruction example of the present invention;
[0058] Figure 5 A schematic diagram of an example of obtaining a second matching point in a photovoltaic panel point cloud according to the present invention;
[0059] Figure 6 A schematic diagram of obtaining a fault location in an RGB image of a photovoltaic panel according to the present invention;
[0060] Figure 7 This is a schematic diagram of a photovoltaic panel fault area mapping example of the present invention. DETAILED DESCRIPTION
[0061] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0062] The present embodiment provides a method for three-dimensional positioning of photovoltaic panel faults by multi-source image mapping, the method includes collecting photovoltaic panel thermal infrared images and corresponding RGB images on site, constructing a photovoltaic panel thermal infrared image data set, reconstructing photovoltaic panel three-dimensional point cloud data, and using a target detection algorithm to calibrate a rectangular frame of the fault area in the photovoltaic panel thermal infrared image, and record the pixel coordinates of the vertices of the rectangular frame. The photovoltaic panel thermal infrared image and the photovoltaic panel two-dimensional point cloud are regarded as two planes, and three pairs of corresponding position matching points are extracted. The three points extracted in each plane are non-collinear. The coordinate mapping relationship between the two planes is obtained based on the three pairs of matching points. The mapping of the photovoltaic panel thermal infrared image to the photovoltaic panel point cloud can be completed by using the coordinate mapping relationship to obtain the point cloud coordinates of the fault position. The embodiment of the present invention defines the fault mapping result of the photovoltaic panel RGB image to the photovoltaic panel point cloud as the true value to judge the quality of the fault mapping result of the photovoltaic panel thermal infrared image to the photovoltaic panel point cloud. The results show that the fault positioning can achieve ideal accuracy. The embodiment of the present invention provides a method for autonomously positioning the fault position of a photovoltaic panel by a drone. Specifically, Figure 1 As shown, the method comprises the following steps:
[0063] S1: Use a thermal infrared imager to collect images of photovoltaic panels on site. A single shot can obtain thermal infrared images and RGB images at the same time. The shooting angle is as vertical as possible to the photovoltaic panels. Use Make Sense image annotation software to annotate the hot spots in the thermal infrared images of photovoltaic panels and make a target detection dataset.
[0064] The purpose of simultaneously acquiring the RGB image of the photovoltaic panel is to verify the accuracy of the result of mapping the thermal infrared image to the point cloud by mapping the RGB image to the point cloud.
[0065] Among them, the thermal infrared image data of photovoltaic panels are divided into training set, verification set and test set according to 6:2:2.
[0066] S2: Collect multi-directional RGB images of the target photovoltaic panel, reconstruct the target photovoltaic panel using Contexcapture software, obtain the three-dimensional point cloud data of the target photovoltaic panel, separate the Z coordinate of each point in the three-dimensional point cloud of the photovoltaic panel, obtain the two-dimensional point cloud data of the photovoltaic panel, store the separated Z coordinates and have the same index as the corresponding X and Y coordinates.
[0067] The purpose of maintaining the index consistency between the Z coordinate of the point cloud and the X and Y coordinates is to facilitate the subsequent restoration of the two-dimensional point cloud to the three-dimensional point cloud.
[0068] S3: A photovoltaic panel thermal infrared image dataset produced by training the Yolov8 target detection algorithm is used to predict the fault location of the photovoltaic panel in the input image and obtain the coordinates of the four vertices of the marked rectangular box in the thermal infrared image.
[0069] The rectangular box represents the fault area in the photovoltaic panel.
[0070] The steps of obtaining the pixel coordinates of the photovoltaic panel fault position in the thermal infrared image based on the Yolov8 target detection algorithm include:
[0071] Image annotation software is used to mark the fault location in the thermal infrared image data of the photovoltaic panel with a rectangular box to make a target detection dataset. The Yolov8 target detection algorithm is used to train the dataset, and the trained model is used to obtain the vertex pixel coordinates of the rectangular box of the photovoltaic panel fault area in the target thermal infrared image.
[0072] S4: First, the edge of the photovoltaic panel in the thermal infrared image is detected using Canny edge detection, and then the straight line is detected using Hough transform line detection, and the straight line slope threshold is set. Then, the horizontal and vertical lines are sorted separately to screen out the four edge edges of the photovoltaic panel, and any three points among the four intersection points of the edge straight lines are selected as the first matching points. The process is as follows Figure 3 shown.
[0073] The process of obtaining the edge of the photovoltaic panel in the thermal infrared image is as follows:
[0074] 0<=k(L m )<=v 1 or k(L m )>=v 2 ,
[0075] L h ∪L v =L m
[0076] L h = sortrows(L h ),L v = sortrows(L v )
[0077] first(L h ),last(L h ),first(L v ),last(L v )
[0078] Among them, L{} is the set of all straight lines, v 1 and v 2 is the slope threshold, L m{} is a straight line that meets the conditions, and the edge of the photovoltaic panel is included in L m {}; L m {} is divided into horizontal line L h {} and vertical line L v {}, and sort by coordinate value, that is, the horizontal lines are sorted by the size of the y coordinate value, and the vertical lines are sorted by the size of the x coordinate value. After the sorting is completed, L h The first and last straight lines in {} are the two edges of the photovoltaic panel in the thermal infrared image. v The first and last straight lines in {} are the other two edges of the photovoltaic panel in the thermal infrared image.
[0079] S5: Randomly select a point in the 2D point cloud of the photovoltaic panel as the origin, divide it into four quadrants, and select four points based on the principle of the maximum Euclidean distance between all matching points in the quadrant and the origin. According to the principle of position correspondence between the matching points in the thermal infrared image of the photovoltaic panel and the 2D point cloud, select three points from these four points as the second matching points. Figure 5 shown.
[0080] The extraction of the second matching point in the 2D point cloud of the photovoltaic panel is based on the principle of the farthest Euclidean distance and the RGB information of the photovoltaic edge point cloud as the screening conditions, including:
[0081] The Euclidean distance formula in a two-dimensional point cloud is:
[0082]
[0083] The conditions for obtaining matching points in the two-dimensional point cloud of photovoltaic panels are:
[0084] d p =Max(d 1 ,d 2 ,d 3 ,······,d n ) and RGB(p)=r
[0085] Among them, p is the second matching point, d p is the Euclidean distance from the matching point to the origin, Max(d 1 ,d 2 ,d 3 ,……,d n ) represents the maximum value of the Euclidean distance from all points in the quadrant to the origin, and RGB(p)=r means that the RGB value of point p is r.
[0086] S6: Associate the thermal infrared image of the photovoltaic panel with the three pairs of matching points in the two-dimensional point cloud to obtain the coordinate mapping relationship matrix between the two planes.
[0087] The coordinate mapping relationship matrix T solution process is:
[0088]
[0089] Among them, A 1 and A 2 are scale representations of two planes. In the embodiment of the present invention, A 1 represents the thermal infrared image plane of the photovoltaic panel, A 2 Represents the 2D point cloud plane of the photovoltaic panel, (x a ,y a )、(x b ,y b )、(x c ,y c ) is A 1 The three first matching points on (x i ,y i )、(x j ,y j )、(x k ,y k ) is A 2 The three second matching points on (x a ,y a )、(x b ,y b )、(x c ,y c ) and (x i ,y i )、(x j ,y j )、(x k ,y k ) respectively correspond to each other, define (x b ,y b ) is A 1 The origin on (x j ,y j ) is A 2 The origin on .
[0090] Let (x m ,y m ) is the pixel coordinate of the photovoltaic panel fault point in the thermal infrared image, and the two-dimensional point cloud coordinate of the photovoltaic panel fault point at the corresponding position is (x n ,y n ), (x m ,y m ) to (x n ,y n ) is:
[0091]
[0092] S7: Using the coordinate mapping relationship matrix and the coordinates of the vertices of the fault rectangular area in the thermal infrared image of the photovoltaic panel, the two-dimensional point cloud coordinates of the vertices of the fault rectangular area are calculated.
[0093] S8: Since the two-dimensional point cloud may not contain the mapped coordinate points, each point in the photovoltaic two-dimensional point cloud is traversed, and the nearest neighbor distance is used to find the point that actually exists in the photovoltaic two-dimensional point cloud to replace the mapping result. At the same time, the Z coordinate of the point is restored according to the index to obtain the three-dimensional point cloud coordinates of the photovoltaic panel fault area.
[0094] The embodiment of the present invention also provides verification results for the above-mentioned photovoltaic panel fault three-dimensional positioning method based on multi-source image mapping, wherein the coordinates of the photovoltaic panel fault area in the thermal infrared image are obtained by the Yolov8 target detection algorithm, and the target detection image is as follows: Figure 2 , the first matching point in the thermal infrared image of the photovoltaic panel is obtained, for example Figure 3 , photovoltaic panel point cloud reconstruction map, for example Figure 4 , the second matching point in the photovoltaic panel point cloud is obtained as follows Figure 5 The fault location in the RGB image of the photovoltaic panel is obtained by using the distance proportional method based on the fault location in the thermal infrared image of the photovoltaic panel. For example, Figure 6 ,exist Figure 6 In the figure, the photovoltaic edge vertices a, b and a', b' respectively form triangles with the fault area vertices g, g'. The two triangles should follow the principle of equal length ratio of the three sides. In the test phase, the result of mapping the RGB image to the point cloud is defined as the true value, and the error of the thermal infrared image mapping to the point cloud result is calculated. The photovoltaic panel fault area mapping diagram is as follows: Figure 7 ,exist Figure 7 In the present invention, the photovoltaic edge vertices in the thermal infrared image and the photovoltaic edge vertices in the RGB image are respectively mapped to the corresponding points in the photovoltaic point cloud by establishing coordinate mapping relationships. Based on their respective mapping relationships, the fault area vertices in the thermal infrared and RGB images are respectively mapped to the photovoltaic point cloud, forming two incompletely overlapping areas in the photovoltaic point cloud.
[0095] To verify the technical effect of the method in this embodiment, this embodiment conducts a fault location experiment on a fault area in a photovoltaic panel, and uses scientific demonstration to test the results to verify the real effect of this method. Figure 2 The first of three samples.
[0096] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0097] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take 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.) containing computer-usable program codes. The schemes in the embodiments of the present invention may be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0098] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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 produce 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.
[0099] 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 comprising 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.
[0100] 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. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0101] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0102] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A three-dimensional location method for photovoltaic panel faults based on multi-source image mapping. It is characterized in that The following steps are involved: Collect thermal infrared images and multi-directional RGB images of the target photovoltaic panel to be fault located; Inputting the thermal infrared image into a pre-trained target detection model to perform fault detection, and obtaining a fault location of the target photovoltaic panel, wherein the fault location is calibrated with a rectangular frame, and the rectangular frame includes vertex coordinates; Reconstructing based on the multi-directional RGB image to obtain three-dimensional point cloud data of the target photovoltaic panel, and separating the Z-axis coordinates of the three-dimensional point cloud data to obtain two-dimensional point cloud data of the target photovoltaic panel; Detecting four straight edge lines of the target photovoltaic panel in the thermal infrared image, and selecting any three intersection points of the four straight edge lines as first matching points; Selecting four points from the two-dimensional point cloud data, and selecting three points from the four points as second matching points according to a principle of position correspondence of matching points between the thermal infrared image and the two-dimensional point cloud data; Associating the first matching point with the second matching point to obtain a coordinate mapping relationship matrix between the thermal infrared image and the two-dimensional point cloud data; According to the coordinate mapping relationship matrix and the vertex coordinates of the fault position, the two-dimensional point cloud coordinates of the vertex of the fault position are calculated, and the Z-axis coordinates are restored to obtain the three-dimensional point cloud coordinates of the fault position of the photovoltaic panel.
2. According to the method of claim 1, a photovoltaic panel fault three-dimensional positioning method based on multi-source image mapping, It is characterized in that The training steps of the target detection model include: Collect thermal infrared images and corresponding RGB images of photovoltaic panels; Based on the thermal infrared image and the corresponding RGB image, the hot spots in the thermal infrared image are marked with rectangular frames using Make Sense image annotation software, and the thermal infrared image and its annotated hot spots are made into a thermal infrared image detection data set; Build a target detection model, input the thermal infrared image detection data set for training, and obtain a trained target detection model.
3. The photovoltaic panel fault three-dimensional positioning method based on multi-source image mapping according to claim 1, It is characterized in that The target detection model is trained using the Yolov8 network model.
4. The photovoltaic panel fault three-dimensional positioning method based on multi-source image mapping according to claim 1, It is characterized in that The step of obtaining the two-dimensional point cloud data of the target photovoltaic panel comprises: Based on the multi-directional RGB image, the target photovoltaic panel is reconstructed using Contexcapture software to obtain three-dimensional point cloud data of the target photovoltaic panel; The Z-axis coordinates of each point in the three-dimensional point cloud data are separated to obtain the two-dimensional point cloud data of the target photovoltaic panel, wherein the separated Z-axis coordinates are stored and have the same index as the corresponding X-axis and Y-axis coordinates.
5. The photovoltaic panel fault three-dimensional positioning method based on multi-source image mapping according to claim 1, It is characterized in that The step of selecting the first matching point includes: The edge of the target photovoltaic panel in the thermal infrared image is detected using the Canny edge detection method; Based on the thermal infrared image with detected edges, the straight line is detected using the Hough transform straight line detection method; Set the straight line slope threshold, sort the detected straight lines, and select the four edge straight lines of the target photovoltaic panel; Select any three of the four intersection points of the four edge lines as the first matching points.
6. The photovoltaic panel fault three-dimensional positioning method based on multi-source image mapping according to claim 5, It is characterized in that The process of obtaining the four edge lines is expressed as follows: 0<=k(L m )<=v 1 or L h ∪L v =L m L h =sortrows(L h ),L v =sortrows(L v ) first(L h ),last(L h ),first(L v ),last(L v ) Where L{} is the set of all straight lines, v 1 and v 2 is the slope threshold, L m {} is a straight line that meets the conditions, and the photovoltaic panel edge straight line is included in L m {}; L m {} is divided into horizontal line L h {} and vertical line L v {}, and sort by coordinate value, that is, the horizontal lines are sorted by the size of the y coordinate value, and the vertical lines are sorted by the size of the x coordinate value. After the sorting is completed, L h The first and last straight lines in {} are the two edge straight lines of the photovoltaic panel in the thermal infrared image, L v The first straight line and the last straight line in {} are the other two edge straight lines of the photovoltaic panel in the thermal infrared image.
7. The photovoltaic panel fault three-dimensional positioning method based on multi-source image mapping according to claim 1, It is characterized in that The step of selecting four points from the two-dimensional point cloud data includes: A point is randomly selected in the two-dimensional point cloud data as the origin and divided into four quadrants; According to the principle of maximum Euclidean distance from all points in each quadrant to the origin, four points are selected, where the calculation expression of Euclidean distance is: In the formula, d is, (x a ,y a ) is a point in the quadrant, (x b ,y b ) represents the origin.
8. The photovoltaic panel fault three-dimensional positioning method based on multi-source image mapping according to claim 1, It is characterized in that The process of obtaining the second matching point is expressed as: d p =Max(d 1 ,d 2 ,d 3 ,······,d n ) and RGB(p)=r Where, d p is the Euclidean distance from the matching point to the origin, Max(d 1 ,d 2 ,d 3 ,……,d n ) represents the maximum value of the Euclidean distance from all points in the quadrant to the origin, RGB(p)=r means that the RGB value of point p is r, and p is the second matching point.
9. The photovoltaic panel fault three-dimensional positioning method based on multi-source image mapping according to claim 1, It is characterized in that The coordinate mapping relationship matrix is expressed as: In the formula, A 1 is the thermal infrared image plane, A 2 is the two-dimensional point cloud data plane, (x a ,y a )、(x b ,y b )、(x c ,y c ) is A 1 The three first matching points on (x i ,y i )、(x j ,y j )、(x k ,y k ) is A 2 The three second matching points on (x a ,y a )、(x b ,y b )、(x c ,y c ) and (x i ,y i )、(x j ,y j )、(x k ,y k ) respectively correspond to each other, (x b ,y b ) is A 1 The origin on (x j ,y j ) is A 2 The origin on , T is the coordinate mapping relationship matrix.
10. The photovoltaic panel fault three-dimensional positioning method based on multi-source image mapping according to claim 1, It is characterized in that The step of obtaining the three-dimensional point cloud coordinates of the photovoltaic panel fault position includes: Mapping is performed based on the coordinate mapping relationship matrix and the vertex coordinates of the fault position to obtain the two-dimensional point cloud coordinates of the vertex of the initial fault position, where the mapping relationship is: In the formula, (x m ,y m ) is the vertex coordinate of the fault location, (x j ,y j ) is the second matching point, (x b ,y b ) is the first matching point, (x n ,y n ) is the two-dimensional point cloud coordinate of the vertex corresponding to the fault location, and T is the coordinate mapping relationship matrix; Each point in the two-dimensional point cloud of the vertex of the initial fault position is traversed, and the nearest neighbor distance is used to find the point that actually exists in the two-dimensional point cloud data to replace the mapping result. At the same time, the Z-axis coordinate is restored according to the index to obtain the three-dimensional point cloud coordinates of the photovoltaic panel fault position.
