Method for detecting installation inclination angle of photovoltaic panel and related equipment
By taking images of the photovoltaic panel area by drones and combining elevation information, the installation inclination of the photovoltaic panel is calculated using stitching and image recognition technology, solving the problem of high detection costs in the existing technology and achieving efficient and low-cost batch detection.
Patent Information
- Application Number
- CN202510149264.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the inclination detection of photovoltaic panels requires additional electronic angle sensor equipment or laser rangefinder, which is costly and is not suitable for large-scale inspection.
Multiple sequential images of the target area were captured by the drone, orthogonal two-dimensional images and three-dimensional point cloud data were generated using stitching and image recognition technology, and the installation inclination angle of the photovoltaic panel was calculated based on the elevation information.
The batch inspection of photovoltaic panel installation inclination angle is realized, which improves the detection efficiency and reduces the detection cost.
Smart Images

Figure CN119624949A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a method for detecting an installation inclination angle of a photovoltaic panel, a device for detecting an installation inclination angle of a photovoltaic panel, an electronic device, and a computer-readable storage medium. Background Art
[0002] Photovoltaic panels, as devices that convert light energy into electrical energy, play a vital role in the power supply system. Photovoltaic power stations usually need to detect the installation angle of photovoltaic panels to ensure that the installation of photovoltaic panels complies with the specifications and can receive sunlight at the best angle to improve the power generation efficiency of photovoltaic panels.
[0003] In the related art, the detection of the installation inclination angle of photovoltaic panels requires the installation of additional electronic angle sensor equipment, or the use of a laser rangefinder to measure different positions of the photovoltaic panels. The equipment costs are high and are not conducive to large-scale detection. Similarly, manual handheld angle measuring instruments are not suitable for frequent large-scale measurements. Summary of the invention
[0004] The present invention aims to solve one of the technical problems in the related art to at least a certain extent. To this end, the first purpose of the present invention is to propose a method for detecting the installation inclination angle of photovoltaic panels, which can perform batch detection of the installation inclination angle of photovoltaic panels by splicing, clipping and further identifying images taken by drones, and calculating the installation inclination angle of photovoltaic panels in combination with the elevation information of the taken images, thereby improving the efficiency of photovoltaic panel installation inclination angle detection and reducing the detection cost.
[0005] The second objective of the present invention is to provide a photovoltaic panel installation inclination detection device.
[0006] A third objective of the present invention is to provide an electronic device.
[0007] A fourth object of the present invention is to provide a computer-readable storage medium.
[0008] To achieve the above object, a first embodiment of the present invention provides a method for detecting the installation inclination of a photovoltaic panel, comprising: Acquire multiple sequence images taken by the drone targeting the target area; wherein the surface scenery of the target area includes multiple target photovoltaic panels and other scenery; Obtain the shooting point information and elevation information corresponding to each sequence of images; the shooting point information is the first geographic coordinate when the drone shoots the sequence of images, and the elevation information represents the vertical distance from the surface scenery of the target area when the drone shoots the sequence of images; According to the shooting point information and elevation information, multiple sequence images are stitched together to obtain an orthophoto 2D image of the target area, and 3D point cloud data of the orthophoto 2D image is obtained; wherein the 3D point cloud data includes the second geographic coordinates and elevation information of the surface scene corresponding to each pixel point in the orthophoto 2D image; Processing the orthophoto two-dimensional image to obtain a first slice image; wherein the first slice image includes a single target photovoltaic panel and other scenes; Obtaining a mask corresponding to a single target photovoltaic panel in the first slice image, assigning pixels in a non-masked area in the first slice image to a preset RGB value, and obtaining a second slice image; wherein the second slice image includes a single target photovoltaic panel; The second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel in the second slice image are determined according to the mask, and the installation inclination angle of the single target photovoltaic panel is calculated according to the second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel.
[0009] In addition, the photovoltaic panel installation inclination detection method according to the above embodiment of the present invention may also have the following additional technical features: According to some embodiments of the present invention, multiple sequence images are stitched together according to shooting point information and elevation information to obtain an orthophoto two-dimensional image of a target area, including: Determine the conjugate point between each sequence image, and splice the multiple sequence images according to the conjugate point and the first geographic coordinate to obtain an orthophoto two-dimensional image; wherein the conjugate point represents the same pixel point in any two sequence images.
[0010] According to some embodiments of the present invention, processing the orthophoto two-dimensional image to obtain a first slice image includes: Determine preset parameters for sliding window slicing processing, segment the orthophoto two-dimensional image according to the preset parameters, and obtain a sliding window slicing image; The position of a single target photovoltaic panel in the sliding window slice image is identified, and the outer contour of the single target photovoltaic panel is marked to obtain an anchor frame of the single target photovoltaic panel; wherein the anchor frame represents the minimum circumscribed rectangle of the single target photovoltaic panel; Expand the range of the anchor frame to a preset multiple of the original one to obtain an updated anchor frame; The sliding window slice image is segmented according to the updated anchor frame to obtain a first slice image.
[0011] According to some embodiments of the present invention, obtaining a mask corresponding to a single target photovoltaic panel in a first slice image includes: Converting the first slice image into a grayscale image; Performing Gaussian filtering on the grayscale image to remove noise in the grayscale image and obtain a grayscale image after Gaussian filtering; Extract edge features of a single target photovoltaic panel in the grayscale image after Gaussian filtering, and determine the edge contour of the single target photovoltaic panel based on the edge features; Determine the mask based on edge contours.
[0012] According to some embodiments of the present invention, calculating the installation inclination angle of a single target photovoltaic panel according to the second geographic coordinates and elevation information corresponding to four vertices of the single target photovoltaic panel includes: Calculate the elevation difference and horizontal distance from the vertex of the first long side to the vertex of the second long side of a single target photovoltaic panel; wherein the vertex of the first long side is adjacent to the vertex of the second long side; The installation inclination angle of a single target photovoltaic panel is calculated based on the elevation difference and the horizontal distance.
[0013] According to some embodiments of the present invention, calculating the installation inclination angle of a single target photovoltaic panel according to the elevation difference and the horizontal distance includes:
[0014] in, is the installation inclination angle of a single target photovoltaic panel, is the elevation difference, is the horizontal distance.
[0015] According to some embodiments of the present invention, the method further comprises: Determining whether the installation inclination angle is within a preset inclination angle range; In response to the installation inclination angle not being within the preset inclination angle range, determining that the installation angle of the target photovoltaic panel does not meet the requirement; In response to the installation inclination angle being within the preset inclination angle range, it is determined that the installation angle of the target photovoltaic panel meets the requirement.
[0016] According to the method for detecting the installation inclination angle of photovoltaic panels in an embodiment of the present invention, two-dimensional modeling is performed on the collected images, and the image is processed using a secondary fine segmentation technology of computer vision image recognition to obtain the outline of a single photovoltaic panel, and the installation inclination angle of the single photovoltaic panel is further calculated. While ensuring high-precision detection, the installation inclination angles of multiple photovoltaic panels can be calculated in batches, thereby improving the efficiency of photovoltaic panel installation inclination detection and reducing detection costs.
[0017] To achieve the above-mentioned purpose, a second embodiment of the present invention provides a photovoltaic panel installation inclination detection device, comprising: The first acquisition module is configured to acquire a plurality of sequence images obtained by the drone shooting the target area; wherein the surface scenery of the target area includes a plurality of target photovoltaic panels and other scenery; The second acquisition module is configured to acquire shooting point information and elevation information corresponding to each sequence of images; the shooting point information is the first geographic coordinate when the drone shoots the sequence of images, and the elevation information represents the vertical distance between the drone and the surface scenery of the target area when the drone shoots the sequence of images; A stitching module is configured to stitch multiple sequence images according to the shooting point information and the elevation information to obtain an orthophoto 2D image of the target area and obtain 3D point cloud data of the orthophoto 2D image; wherein the 3D point cloud data includes the second geographic coordinates and elevation information of the surface scene corresponding to each pixel point in the orthophoto 2D image; A first slicing module is configured to process the orthophoto two-dimensional image to obtain a first slicing image; wherein the first slicing image includes a single target photovoltaic panel and other scenes; The second slicing module is configured to obtain a mask corresponding to a single target photovoltaic panel in the first slicing image, assign pixels in a non-masked area in the first slicing image to a preset RGB value, and obtain a second slicing image; wherein the second slicing image includes a single target photovoltaic panel; The detection module is configured to determine the second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel in the second slice image according to the mask, and calculate the installation inclination angle of the single target photovoltaic panel according to the second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel.
[0018] According to a photovoltaic panel installation inclination detection device provided by an embodiment of the present invention, the outline of a single photovoltaic panel is obtained by two-dimensional modeling of the collected image and the image is processed using a secondary fine segmentation technology of computer vision image recognition, and the installation inclination of the single photovoltaic panel is further calculated. While ensuring high-precision detection, the installation inclination angles of multiple photovoltaic panels can be calculated in batches, thereby improving the efficiency of photovoltaic panel installation inclination detection and effectively reducing the detection cost.
[0019] To achieve the above-mentioned purpose, the third aspect of the present invention proposes an electronic device, including a memory, a processor and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the method for detecting the installation inclination of the photovoltaic panel as described above is implemented.
[0020] In order to achieve the above-mentioned purpose, a fourth aspect of the present invention proposes a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the above-mentioned photovoltaic panel installation inclination detection method.
[0021] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 A flow chart of a method for detecting the installation inclination angle of a photovoltaic panel provided in an embodiment of the present invention.
[0024] Figure 2 A flow chart of obtaining a first slice image of a method for detecting an installation inclination angle of a photovoltaic panel provided in an embodiment of the present invention.
[0025] Figure 3 A schematic diagram of a sliding window slice image provided by an embodiment of the present invention.
[0026] Figure 4 A schematic diagram of a second slice image provided by an embodiment of the present invention.
[0027] Figure 5 A flowchart of obtaining a mask corresponding to a single target photovoltaic panel in a first slice image provided by an embodiment of the present invention.
[0028] Figure 6 A flow chart for calculating the installation inclination angle of a single target photovoltaic panel provided by an embodiment of the present invention.
[0029] Figure 7 A schematic diagram of the vertices of a single target photovoltaic panel provided by an embodiment of the present invention.
[0030] Figure 8 A schematic diagram of a photovoltaic panel installation inclination detection device provided in an embodiment of the present invention.
[0031] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention.
[0032] Figure numerals: 800 - installation inclination detection device for photovoltaic panel; 810 - first acquisition module; 820 - second acquisition module; 830 - splicing module; 840 - first slicing module; 850 - second slicing module; 860 - detection module; 910 - processor; 920 - memory; 930 - input / output interface; 940 - communication interface; 950 - bus. DETAILED DESCRIPTION
[0033] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.
[0034] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0035] As mentioned in the background technology section, photovoltaic panels are the main equipment for solar power generation, and their installation inclination has a great impact on the power generation efficiency of photovoltaic panels. In photovoltaic power stations, it is usually necessary to detect the installation inclination of photovoltaic panels to determine whether the installation of photovoltaic panels meets the specifications, so that photovoltaic panels can receive sunlight at the best angle to ensure the maximum power generation efficiency of photovoltaic panels.
[0036] In the process of realizing the present invention, the applicant discovered that in the related art, electronic angle sensors are used to calculate the installation inclination angle of photovoltaic panels through collected data. The electronic angle sensors are installed on the frame of photovoltaic panels as additional hardware devices, which increases the manufacturing cost of photovoltaic panel equipment and is not suitable for large-scale detection of photovoltaic panels. In addition, the use of laser rangefinders or manual handheld angle measuring instruments for measurement and calculation is not suitable for large-scale detection. Therefore, how to detect the installation inclination angle of photovoltaic panels efficiently and at low cost has become a problem that needs to be solved at present.
[0037] The technical solution of the present invention is further described in detail below through specific embodiments.
[0038] refer to Figure 1 , which is a flow chart of a method for detecting the installation inclination angle of a photovoltaic panel provided in an embodiment of the present invention.
[0039] Step S101, obtaining a plurality of sequence images taken by a drone targeting a target area; wherein the surface scenery of the target area includes a plurality of target photovoltaic panels and other scenery.
[0040] Specifically, the drone can be equipped with a laser rangefinder, which is used to obtain elevation information of the ground and photovoltaic panel surface of the target area. In an embodiment of the present invention, the flight altitude is preferably 60-80 meters, which can take into account both the efficiency and quality of shooting. The drone shoots the orthographic image of the target area vertically downward.
[0041] Drones can be equipped with GPS (Global Positioning System) and high-precision IMU (Inertial Measurement Unit) camera equipment to obtain high-resolution orthophoto sequence images of different areas on the ground of the target area through aerial photography. The sequence images are taken in chronological order and usually have overlapping areas.
[0042] It should be noted that orthophotos are images that have undergone geometric correction and projection transformation. They can eliminate the impact of terrain undulations and lighting angles, ensuring that each pixel on the image corresponds one-to-one to a specific point on the surface. Each orthophoto sequence image includes multiple target photovoltaic panels and other scenes.
[0043] Step S102, obtaining shooting point information and elevation information corresponding to each sequence image; the shooting point information is the first geographic coordinate when the drone shoots the sequence images, and the elevation information represents the vertical distance from the surface scenery of the target area when the drone shoots the sequence images.
[0044] Specifically, when using a drone for shooting, the drone will record the shooting point and elevation information of each image in the sequence of images, where the shooting point is the first geographic coordinate (x1, y1) when the drone shoots the sequence of images, representing the specific longitude and latitude coordinates of the drone when shooting the sequence of images, and the elevation information represents the vertical distance between the drone and the surface scenery of the target area when shooting the sequence of images, which may include the vertical distance between the drone and the highest point of the photovoltaic panel, the vertical distance between the drone and the lowest point of the photovoltaic panel, and the vertical distance between the drone and the ground, etc.
[0045] Step S103, stitching multiple sequence images according to the shooting point information and the elevation information to obtain an orthophoto two-dimensional image of the target area, and obtaining three-dimensional point cloud data of the orthophoto two-dimensional image; wherein the three-dimensional point cloud data includes the second geographic coordinates and elevation information of the surface scene corresponding to each pixel point in the orthophoto two-dimensional image.
[0046] As an optional embodiment, multiple sequence images are stitched together according to shooting point information and elevation information to obtain an orthophoto two-dimensional image of the target area, including: determining the conjugate point between each sequence image, and stitching the multiple sequence images together according to the conjugate point and the first geographic coordinate to obtain the orthophoto two-dimensional image; wherein the conjugate point represents the same pixel point in any two sequence images.
[0047] Specifically, the sequence images taken of the target area are stitched together using modeling software. The modeling software can automatically stitch the overlapping parts between images through an image matching algorithm. The modeling software will analyze the conjugate points between each image in the sequence images, and stitch them together according to the matching of the conjugate points to obtain an orthophotoed two-dimensional image of the entire target area.
[0048] During the stitching process, the modeling software can also use multi-view stereo matching (Multi-view Stereo) technology to further generate three-dimensional point cloud data of the target area, where the point cloud data includes the spatial coordinates of each pixel point in the orthographic two-dimensional image. The spatial coordinates include the second geographic coordinates and corresponding elevation information. The second geographic coordinates are the longitude and latitude of each pixel point.
[0049] By performing high-precision stitching of multiple sequence images, we can further obtain three-dimensional point cloud data of the stitched orthophoto two-dimensional image, thereby realizing the fusion of two-dimensional image and elevation information, providing rich geographic information, and facilitating the refined analysis and application of the stitched orthophoto two-dimensional image.
[0050] It should be noted that the conjugate points of two sequential images usually refer to the corresponding projection points of the same point in the actual space on two images with different viewing angles. In the embodiments of the present invention, they can be understood as the same pixel points in the two sequential images. By matching the conjugate points in the two images, they can be seamlessly spliced together. At the same time, the three-dimensional coordinates of the actual space points can be calculated based on the conjugate points, thereby realizing the generation of three-dimensional point cloud data of the target area.
[0051] Step S104, processing the orthophoto two-dimensional image to obtain a first slice image; wherein the first slice image includes a single target photovoltaic panel and other objects.
[0052] Specifically, the photovoltaic panel may be tilted in the sliding window slice image, so the size of the background area contained in the anchor frame of a single target photovoltaic panel is also different. The more background, the greater the interference to image recognition. To solve the problem of background interference, the following embodiments are provided: refer to Figure 2 , which is a flow chart of obtaining a first slice image of a method for detecting the installation inclination of a photovoltaic panel provided in an embodiment of the present invention.
[0053] As an optional embodiment, processing the orthophoto two-dimensional image to obtain a first slice image includes: Step S21, determining preset parameters for sliding window slicing processing, segmenting the orthophoto two-dimensional image according to the preset parameters, and obtaining a sliding window slicing image.
[0054] Specifically, the pixels of the spliced orthophoto 2D images are usually very large (ranging from 10000×10000 to 100000×100000 pixels). Direct recognition requires the device to have a high-performance CPU and GPU. Therefore, it is necessary to perform sliding window slicing on the orthophoto 2D images and crop them into multiple small slices. The size of the sliding window is a preset parameter. The sliding window slice images cropped by sliding window slicing overlap, and the overlap rate of the sliding window slices is 0.1, ensuring that the orthophoto 2D images can be completely recognized and cropped. For example, the preset parameter of the sliding window size is 640×640, and the pixel size of the spliced orthophoto 2D images is , each time the image is cropped by moving a distance of 640×0.1 along the x-axis and y-axis, a sliding window slice image with a pixel size of 640×640 is obtained. The number of slices finally obtained is , where [x] in the formula means rounding up.
[0055] It should be noted that sliding window slicing divides the input image into multiple windows of fixed size (i.e. slices), and then processes the pixels in each window. The window slides on the image with a certain step size to cover the entire image. During the sliding process, various operations and processing can be performed on the data in each window.
[0056] refer to Figure 3 , is a schematic diagram of a sliding window slice image provided in an embodiment of the present invention.
[0057] Step S22, identifying the position of a single target photovoltaic panel in the sliding window slice image, and marking the outer contour of the single target photovoltaic panel to obtain an anchor frame of the single target photovoltaic panel; wherein the anchor frame represents the minimum circumscribed rectangle of the single target photovoltaic panel; Specifically, the sliding window slice image is input into the image recognition model, the position of a single target photovoltaic panel in the sliding window slice image is identified, and an anchor frame of the single target photovoltaic panel is obtained based on the single target photovoltaic panel, wherein the anchor frame is the minimum circumscribed rectangle obtained based on the four vertices of the single target photovoltaic panel.
[0058] Step S23, expanding the range of the anchor frame to a preset multiple of the original to obtain an updated anchor frame; Specifically, to ensure that each target photovoltaic panel can be completely cut out, the sliding window slice image is identified according to the vertex coordinates of the anchor frame and enlarged by a preset multiple, and the updated anchor frame is further obtained. For example, the vertex coordinates of the anchor frame are:
[0059] To ensure that the outline of a single target photovoltaic panel can be completely cropped, the four vertices of the anchor frame are expanded by 10 pixels respectively, and the vertex coordinates of the updated anchor frame are obtained as follows:
[0060] Step S24, segmenting the sliding window slice image according to the updated anchor frame to obtain a first slice image.
[0061] Specifically, according to the coordinates of the updated anchor frame, the sliding window slice image is segmented to obtain a first slice image.
[0062] It should be noted that the vertex coordinates of the anchor box and the vertex coordinates of the updated anchor box are the coordinates corresponding to the pixel points in the sliding window slice image, where x can represent the long side of the sliding window slice image and y can represent the wide side of the sliding window slice image.
[0063] refer to Figure 4 , is a schematic diagram of a second slice image provided in an embodiment of the present invention.
[0064] Step S105, obtaining a mask corresponding to a single target photovoltaic panel in the first slice image, assigning pixels in a non-masked area in the first slice image to preset RGB values, and obtaining a second slice image; wherein the second slice image includes a single target photovoltaic panel.
[0065] Specifically, in the embodiment of the present invention, the processing technology for the first slice image is preferably OpenCV.
[0066] refer to Figure 5 , is a flowchart of obtaining a mask corresponding to a single target photovoltaic panel in a first slice image provided by an embodiment of the present invention.
[0067] As an optional embodiment, obtaining a mask corresponding to a single target photovoltaic panel in the first slice image includes: Step S51, converting the first slice image into a grayscale image.
[0068] Specifically, the function provided by OpenCV is used to convert a color image into a grayscale image. During the conversion process, the weighted average of the red, green, and blue components of each pixel in the color image needs to be taken to obtain a grayscale value representing the brightness.
[0069] Step S52, performing Gaussian filtering on the grayscale image to remove noise in the grayscale image, and obtaining a grayscale image after Gaussian filtering.
[0070] Specifically, Gaussian filtering is a linear smoothing filter that reduces noise by performing weighted averaging on each pixel in an image and its neighborhood. The filtered image will contain less noise while maintaining the edges and details of the image.
[0071] Step S53, extracting edge features of a single target photovoltaic panel in the grayscale image after Gaussian filtering, and determining an edge contour of the single target photovoltaic panel according to the edge features.
[0072] Specifically, edge detection is used to identify areas in an image where brightness changes significantly. For photovoltaic panels, their edges are usually places where brightness changes greatly. Through edge detection algorithms, the edge features of photovoltaic panels can be identified and their edge contours can be further determined.
[0073] Step S54: determining a mask according to the edge contour.
[0074] Specifically, a mask is a binary image used in image processing where the area of interest is marked as white (or 1) and the area of no interest is marked as black (or 0). After determining the edge contour of the photovoltaic panel, a mask image of the same size as the original image can be created, and the contour area of the photovoltaic panel is marked as white and the rest of the area is marked as black.
[0075] Specifically, the masked area corresponding to the single target photovoltaic panel in the first slice image is retained as the original image. Furthermore, the pixel values of the non-masked area in the first slice image are assigned preset RGB values, and the preset RGB values are preferably black pixel values (0, 0, 0). The obtained image is named the second slice image.
[0076] Step S106, determining the second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel in the second slice image according to the mask, and calculating the installation inclination angle of the single target photovoltaic panel according to the second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel.
[0077] Specifically, the second slice image can be further trained to obtain a more accurate anchor frame and mask of a single target photovoltaic panel, and extract the four vertex coordinates of the single target photovoltaic panel through the mask, and further determine the second geographic coordinates of the four vertices of the single target photovoltaic panel according to the vertex coordinates.
[0078] Taking a sliding window slice image with a pixel size of 640×640 as an example, the starting position of the slice (slice_x, slice_y) can be:
[0079] where i and j are the indices of the slice in the x (length) and y (width) directions during the sliding process.
[0080] The vertex coordinates (x, y) of a single target photovoltaic panel are restored to the second geographic coordinates (x2, y2) of the original image:
[0081] Since the drone has obtained the elevation information corresponding to each sequence image when shooting multiple sequence images, that is, the elevation information of a single target photovoltaic panel is known, the installation inclination angle of the single target photovoltaic panel can be calculated based on the second geographic coordinates corresponding to the four vertices of the single target photovoltaic panel and the elevation information.
[0082] It should be noted that the further training of the second slice image in the embodiment of the present invention can be an instance segmentation algorithm of the yolov5-7.0 version. Yolov5 is an anchor-base-based algorithm, and its anchor box is a predefined set of aspect ratios for predicting the bounding box of the target at different scale feature maps and positions. These anchor boxes help the model to better fit the shape of the target, thereby improving the detection accuracy. In order to better detect objects with a large aspect ratio such as photovoltaic panels, this solution adjusts the anchor settings in the configuration file of the yolov5-7.0 version, and adds some more slender anchor boxes. These adjusted anchor boxes can help the model more accurately locate and segment the boundaries of the photovoltaic panels during the training process, thereby improving the detection accuracy, and using labeled data for algorithm model training. refer to Figure 6 , which is a flow chart of calculating the installation inclination angle of a single target photovoltaic panel provided by an embodiment of the present invention.
[0083] As an optional embodiment, calculating the installation inclination angle of a single target photovoltaic panel according to the second geographic coordinates and elevation information corresponding to four vertices of the single target photovoltaic panel includes: Step S61, calculating the elevation difference and horizontal distance from the vertex of the first long side to the vertex of the second long side of a single target photovoltaic panel; wherein the vertex of the first long side is adjacent to the vertex of the second long side.
[0084] Specifically, Figure 7 As shown, the vertex of the first long side of a single target photovoltaic panel is adjacent to the vertex of the second long side. According to the second geographic coordinates of the vertex of the first long side and the second geographic coordinates of the vertex of the second long side, the horizontal distance between the two vertices can be calculated. And elevation difference .
[0085] For example, the second geographic coordinates of the vertex of the first long edge are , the second geographic coordinates of the vertex of the first long side are , at this time, the elevation difference The horizontal distance between the two vertices They are:
[0086]
[0087] Step S62, calculating the installation inclination angle of a single target photovoltaic panel according to the elevation difference and the horizontal distance.
[0088] Specifically, the installation inclination angle of a single target photovoltaic panel is calculated according to the elevation difference and the horizontal distance. The calculation formula is:
[0089] in, is the installation inclination angle of a single target photovoltaic panel, is the elevation difference, is the horizontal distance.
[0090] As an optional embodiment, the photovoltaic panel installation inclination angle detection method also includes: determining whether the installation inclination angle is within a preset inclination angle range; in response to the installation inclination angle not being within the preset inclination angle range, determining that the installation angle of the target photovoltaic panel does not meet the requirements; in response to the installation inclination angle being within the preset inclination angle range, determining that the installation angle of the target photovoltaic panel meets the requirements.
[0091] Specifically, the calculated installation inclination angle of a single target photovoltaic panel needs to be compared with the preset inclination angle to detect whether the installation inclination angle of the single target photovoltaic panel meets the standard: when the installation inclination angle is not within the preset inclination angle range, it indicates that the installation angle of the target photovoltaic panel does not meet the requirements and needs further adjustment; when the installation inclination angle is within the preset inclination angle range, it indicates that the installation angle of the target photovoltaic panel meets the requirements and can be put into use.
[0092] As can be seen from the above, the photovoltaic panel installation inclination detection method provided by the present invention first obtains a plurality of sequence images obtained by shooting a target area by a drone; wherein the surface scenery of the target area includes a plurality of target photovoltaic panels and other scenery; secondly, obtains the shooting point information and elevation information corresponding to each sequence image; the shooting point information is the first geographic coordinate when the drone shoots the sequence images, and the elevation information represents the vertical distance from the surface scenery of the target area when the drone shoots the sequence images; Furthermore, multiple sequence images are spliced according to the shooting point information and the elevation information to obtain an orthophoto two-dimensional image of the target area, and three-dimensional point cloud data of the orthophoto two-dimensional image is obtained; wherein the three-dimensional point cloud data includes the second geographic coordinates and elevation information of the surface scenery corresponding to each pixel point in the orthophoto two-dimensional image; the orthophoto two-dimensional image is processed to obtain a first slice image; wherein the first slice image includes a single target photovoltaic panel and other scenery; further, a mask corresponding to the single target photovoltaic panel in the first slice image is obtained, and pixels in the non-mask area in the first slice image are assigned to preset RGB values to obtain a second slice image; wherein the second slice image includes a single target photovoltaic panel; finally, the second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel in the second slice image are determined according to the mask, and the installation inclination angle of the single target photovoltaic panel is calculated according to the second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel. This application performs two-dimensional modeling on the collected images and uses computer vision image recognition secondary fine segmentation technology to process the images to obtain the outline of a single photovoltaic panel, and further calculates the installation inclination angle of a single photovoltaic panel. While ensuring high-precision detection, it can batch calculate the installation inclination angles of multiple photovoltaic panels, thereby improving the detection efficiency of the photovoltaic panel installation inclination angle and reducing the detection cost.
[0093] It should be noted that the method of the embodiment of the present invention can be performed by a single device, such as a computer or a server. The method of this embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present invention, and the multiple devices will interact with each other to complete the described method.
[0094] It should be noted that some embodiments of the present invention are described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0095] Based on the same inventive concept, corresponding to the method provided in any of the above embodiments, the present invention further provides a photovoltaic panel installation inclination angle detection device.
[0096] refer to Figure 8 , is a schematic diagram of a photovoltaic panel installation inclination detection device 800 provided in an embodiment of the present invention.
[0097] The photovoltaic panel installation inclination detection device 800 includes: a first acquisition module 810, a second acquisition module 820, a splicing module 830, a first slicing module 840, a second slicing module 850 and a detection module 860: The first acquisition module 810 is configured to acquire a plurality of sequence images obtained by the drone shooting the target area; wherein the surface scenery of the target area includes a plurality of target photovoltaic panels and other scenery; The second acquisition module 820 is configured to acquire shooting point information and elevation information corresponding to each sequence of images; the shooting point information is the first geographic coordinate when the drone shoots the sequence of images, and the elevation information represents the vertical distance from the surface scenery of the target area when the drone shoots the sequence of images; The stitching module 830 is configured to stitch the multiple sequence images according to the shooting point information and the elevation information to obtain an orthophoto 2D image of the target area, and obtain 3D point cloud data of the orthophoto 2D image; wherein the 3D point cloud data includes the second geographic coordinates and elevation information of the surface scene corresponding to each pixel point in the orthophoto 2D image; The first slicing module 840 is configured to process the orthophoto 2D image to obtain a first slicing image; wherein the first slicing image includes a single target photovoltaic panel and other objects; The second slicing module 850 is configured to obtain a mask corresponding to a single target photovoltaic panel in the first slicing image, assign pixels in a non-masked area in the first slicing image to a preset RGB value, and obtain a second slicing image; wherein the second slicing image includes a single target photovoltaic panel; The detection module 860 is configured to determine the second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel in the second slice image according to the mask, and calculate the installation inclination angle of the single target photovoltaic panel according to the second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel.
[0098] Optionally, the splicing module 830 is further configured to: Determine the conjugate point between each sequence image, and splice the multiple sequence images according to the conjugate point and the first geographic coordinate to obtain an orthophoto two-dimensional image; wherein the conjugate point represents the same pixel point in any two sequence images.
[0099] Optionally, the first slicing module 840 is further configured to: Determine preset parameters for sliding window slicing processing, segment the orthophoto two-dimensional image according to the preset parameters, and obtain a sliding window slicing image; The position of a single target photovoltaic panel in the sliding window slice image is identified, and the outer contour of the single target photovoltaic panel is marked to obtain the anchor frame of the single target photovoltaic panel; wherein the anchor frame represents the minimum circumscribed rectangle of the single target photovoltaic panel. Expand the range of the anchor frame to a preset multiple of the original one to obtain an updated anchor frame; The sliding window slice image is segmented according to the updated anchor frame to obtain a first slice image.
[0100] Optionally, the second slicing module 850 is further configured to: Converting the first slice image into a grayscale image; Performing Gaussian filtering on the grayscale image to remove noise in the grayscale image and obtain a grayscale image after Gaussian filtering; Extract edge features of a single target photovoltaic panel in the grayscale image after Gaussian filtering, and determine the edge contour of the single target photovoltaic panel based on the edge features; Determine the mask based on edge contours.
[0101] Optionally, the detection module 860 is further configured to: Calculate the elevation difference and horizontal distance from the vertex of the first long side of a single target photovoltaic panel to the vertex of the second long side adjacent to it; The installation inclination angle of a single target photovoltaic panel is calculated based on the elevation difference and the horizontal distance.
[0102] Optionally, the detection module 860 is further configured to: Calculate the installation inclination of a single target photovoltaic panel based on the elevation difference and horizontal distance, including:
[0103] in, is the installation inclination angle of a single target photovoltaic panel, is the elevation difference, is the horizontal distance.
[0104] According to an installation inclination detection device for a photovoltaic panel provided by an embodiment of the present invention, firstly, a plurality of sequence images obtained by shooting a target area by a drone are obtained; wherein the surface scenery of the target area includes a plurality of target photovoltaic panels and other scenery; secondly, shooting point information and elevation information corresponding to each sequence image are obtained; the shooting point information is the first geographic coordinate when the drone shoots the sequence images, and the elevation information represents the vertical distance from the surface scenery of the target area when the drone shoots the sequence images; Furthermore, multiple sequence images are spliced according to the shooting point information and the elevation information to obtain an orthophoto two-dimensional image of the target area, and three-dimensional point cloud data of the orthophoto two-dimensional image is obtained; wherein the three-dimensional point cloud data includes the second geographic coordinates and elevation information of the surface scenery corresponding to each pixel point in the orthophoto two-dimensional image; the orthophoto two-dimensional image is processed to obtain a first slice image; wherein the first slice image includes a single target photovoltaic panel and other scenery; further, a mask corresponding to the single target photovoltaic panel in the first slice image is obtained, and pixels in the non-mask area in the first slice image are assigned to preset RGB values to obtain a second slice image; wherein the second slice image includes a single target photovoltaic panel; finally, the second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel in the second slice image are determined according to the mask, and the installation inclination angle of the single target photovoltaic panel is calculated according to the second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel. This application performs two-dimensional modeling on the collected images and uses computer vision image recognition secondary fine segmentation technology to process the images to obtain the outline of a single photovoltaic panel, and further calculates the installation inclination angle of a single photovoltaic panel. While ensuring high-precision detection, it can batch calculate the installation inclination angles of multiple photovoltaic panels, thereby improving the detection efficiency of the photovoltaic panel installation inclination angle and reducing the detection cost.
[0105] For the convenience of description, the above system is described as being divided into various modules according to their functions. Of course, when implementing the present invention, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0106] The photovoltaic panel installation inclination angle detection device of the above-mentioned embodiment is used to implement the corresponding method in any of the above-mentioned embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described in detail here.
[0107] Based on the same inventive concept, corresponding to the method for detecting the installation inclination of a photovoltaic panel described in any of the above embodiments, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any of the above embodiments when executing the program.
[0108] Fig. 9A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 910, a memory 920, an input / output interface 930, a communication interface 940, and a bus 950. The processor 910, the memory 920, the input / output interface 930, and the communication interface 940 are connected to each other through the bus 950 in the device.
[0109] The processor 910 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0110] The memory 920 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 920 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 920 and are called and executed by the processor 910.
[0111] The input / output interface 930 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0112] The communication interface 940 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0113] The bus 950 includes a path that transmits information between the various components of the device (eg, the processor 910 , the memory 920 , the input / output interface 930 , and the communication interface 940 ).
[0114] It should be noted that, although the above device only shows the processor 910, the memory 920, the input / output interface 930, the communication interface 940 and the bus 950, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0115] The electronic device of the above embodiment is used to implement the corresponding photovoltaic panel installation inclination detection method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0116] Based on the same inventive concept, corresponding to the method for detecting the installation inclination angle of a photovoltaic panel described in any of the above embodiments, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for detecting the installation inclination angle of a photovoltaic panel as described in any of the above embodiments.
[0117] The above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.
[0118] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the photovoltaic panel installation inclination detection method of any embodiment in the above exemplary method part, and have the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0119] In addition, although the operations of the method of the present invention are described in a specific order in the accompanying drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flow chart can be performed in a different order. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.
[0120] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0121] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the embodiments of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0122] Although the spirit and principle of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and this division is only for the convenience of expression. The present invention is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims. The scope of the attached claims conforms to the broadest interpretation, thereby including all such modifications and equivalent structures and functions.
Claims
1. A method for detecting the installation inclination of a photovoltaic panel, characterized in that: include: Acquire multiple sequence images taken by the drone targeting the target area; wherein the surface scenery of the target area includes multiple target photovoltaic panels and other scenery; Obtain the shooting point information and elevation information corresponding to each sequence of images; the shooting point information is the first geographic coordinate when the drone shoots the sequence of images, and the elevation information represents the vertical distance from the surface scenery of the target area when the drone shoots the sequence of images; According to the shooting point information and elevation information, multiple sequence images are stitched together to obtain an orthophoto 2D image of the target area, and 3D point cloud data of the orthophoto 2D image is obtained; wherein the 3D point cloud data includes the second geographic coordinates and elevation information of the surface scene corresponding to each pixel point in the orthophoto 2D image; Processing the orthophoto two-dimensional image to obtain a first slice image; wherein the first slice image includes a single target photovoltaic panel and other scenes; Obtaining a mask corresponding to a single target photovoltaic panel in the first slice image, assigning pixels in a non-masked area in the first slice image to a preset RGB value, and obtaining a second slice image; wherein the second slice image includes a single target photovoltaic panel; The second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel in the second slice image are determined according to the mask, and the installation inclination angle of the single target photovoltaic panel is calculated according to the second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel.
2. The method for detecting the installation inclination of a photovoltaic panel according to claim 1, characterized in that: The step of stitching the plurality of sequence images according to the shooting point information and the elevation information to obtain an orthophoto two-dimensional image of the target area includes: Determine the conjugate point between each sequence of images, and splice the multiple sequence images according to the conjugate point and the first geographic coordinates to obtain the orthophoto two-dimensional image; wherein the conjugate point represents the same pixel point in any two sequence images.
3. The photovoltaic panel installation inclination detection method according to claim 2, characterized in that: The step of processing the orthophoto two-dimensional image to obtain a first slice image includes: Determine preset parameters for sliding window slicing processing, and segment the orthophoto two-dimensional image according to the preset parameters to obtain a sliding window slicing image; Identify the position of a single target photovoltaic panel in the sliding window slice image, and mark the outer contour of the single target photovoltaic panel to obtain an anchor frame of the single target photovoltaic panel; wherein the anchor frame represents the minimum circumscribed rectangle of the single target photovoltaic panel; Expanding the range of the anchor frame to a preset multiple of the original range to obtain an updated anchor frame; The sliding window slice image is segmented according to the updated anchor frame to obtain the first slice image.
4. The method for detecting the installation inclination of a photovoltaic panel according to claim 3, characterized in that: The step of acquiring a mask corresponding to the single target photovoltaic panel in the first slice image includes: Converting the first slice image into a grayscale image; Performing Gaussian filtering on the grayscale image to remove noise in the grayscale image, thereby obtaining a grayscale image after Gaussian filtering; Extracting edge features of the single target photovoltaic panel in the grayscale image after Gaussian filtering, and determining an edge profile of the single target photovoltaic panel according to the edge features; The mask is determined based on the edge contour.
5. The method for detecting the installation inclination of a photovoltaic panel according to claim 4, characterized in that: The step of calculating the installation inclination angle of the single target photovoltaic panel according to the second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel includes: Calculating the elevation difference and horizontal distance from the vertex of the first long side to the vertex of the second long side of the single target photovoltaic panel; wherein the vertex of the first long side is adjacent to the vertex of the second long side; The installation inclination angle of the single target photovoltaic panel is calculated according to the elevation difference and the horizontal distance.
6. The method for detecting the installation inclination of a photovoltaic panel according to claim 5, characterized in that: The step of calculating the installation inclination angle of the single target photovoltaic panel according to the elevation difference and the horizontal distance includes: in, is the installation inclination angle of the single target photovoltaic panel, is the elevation difference, is the horizontal distance.
7. The method for detecting the installation inclination of a photovoltaic panel according to claim 6, characterized in that: The method further comprises: Determining whether the installation inclination angle is within a preset inclination angle range; In response to the installation inclination angle not being within the preset inclination angle range, determining that the installation angle of the target photovoltaic panel does not meet the requirement; In response to the installation inclination angle being within the preset inclination angle range, it is determined that the installation angle of the target photovoltaic panel meets the requirement.
8. A photovoltaic panel installation inclination detection device, characterized in that: include: A first acquisition module is configured to acquire a plurality of sequence images obtained by the drone shooting a target area; wherein the surface scenery of the target area includes a plurality of target photovoltaic panels and other scenery; The second acquisition module is configured to acquire shooting point information and elevation information corresponding to each sequence of images; the shooting point information is the first geographic coordinate when the drone shoots the sequence of images, and the elevation information represents the vertical distance between the drone and the surface scenery of the target area when the drone shoots the sequence of images; A stitching module is configured to stitch the multiple sequence images according to the shooting point information and the elevation information to obtain an orthophoto two-dimensional image of the target area, and obtain three-dimensional point cloud data of the orthophoto two-dimensional image; wherein the three-dimensional point cloud data includes a second geographic coordinate and elevation information of a surface scene corresponding to each pixel point in the orthophoto two-dimensional image; A first slicing module is configured to process the orthophoto two-dimensional image to obtain a first slicing image; wherein the first slicing image includes a single target photovoltaic panel and other scenes; A second slicing module is configured to obtain a mask corresponding to the single target photovoltaic panel in the first slicing image, assign pixels in a non-masked area in the first slicing image to a preset RGB value, and obtain a second slicing image; wherein the second slicing image includes the single target photovoltaic panel; The detection module is configured to determine the second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel in the second slice image according to the mask, and calculate the installation inclination angle of the single target photovoltaic panel according to the second geographic coordinates and elevation information corresponding to the four vertices of the single target photovoltaic panel.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for detecting the installation inclination angle of a photovoltaic panel as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer-readable storage medium to implement the method for detecting the installation inclination angle of a photovoltaic panel as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Component segmentation method and device of photovoltaic power station, electronic equipment and storage medium
CN115035051A
Method for determining dip angle of photovoltaic power station string and electronic equipment
CN115797310A
System for detecting concentration of accumulated dust on photovoltaic panel based on image method and application thereof
CN116465804A
Human body action detection method and device based on deep learning and storage medium
CN116682170A
Method for rapidly detecting and calculating dip angle of photovoltaic support based on aerial photography
CN119131619A