Method and apparatus for acquiring photovoltaic module template, and nonvolatile storage medium

CN115619796BActive Publication Date: 2026-09-11SUNGROW SMART MAINTENANCE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211296786.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-21
Publication Date
2026-09-11
Estimated Expiration
2042-10-21

AI Technical Summary

Technical Problem

[0004]本申请实施例提供了一种获取光伏组件模板的方法及装置、非易失性存储介质,以至少解决由于组串表面存在倾斜,阴影和色差不一致造成的采用单一模板进行全景地图的组件分割时难匹配,以及分割难度大的技术问题

Benefits of technology

[0014] According to another aspect of the embodiments of this application, an electronic device is also provided, the electronic device including: a memory and a processor, the processor being configured to run a program stored in the memory, wherein the program executes the above-described method for obtaining a photovoltaic module template when it runs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115619796B_ABST
    Figure CN115619796B_ABST
Patent Text Reader

Abstract

The application discloses a method and device for obtaining photovoltaic module templates, and a nonvolatile storage medium. The method comprises the following steps: obtaining a panoramic map of a target area; performing string segmentation on the panoramic map to obtain a string segmentation mask, wherein the panoramic map is an image spliced from a visible light image; and performing module segmentation on the string segmentation mask to obtain a plurality of photovoltaic module templates, wherein each photovoltaic module template in the plurality of photovoltaic module templates corresponds to each string in the panoramic map in a one-to-one manner. The application solves the technical problems of difficult matching when a single template is used for module segmentation of the panoramic map due to the existence of inclination, shadows and inconsistent color differences on the surface of the string, and difficult segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing, and more specifically, to a method and apparatus for obtaining a photovoltaic module template, and a non-volatile storage medium. Background Technology

[0002] With the continuous development of image processing and drone technologies, drone-based intelligent inspection has gradually become an important means of operation and maintenance for large power plants. To facilitate faster troubleshooting by users at the station, it is necessary to quantify the logical numbers of strings and components in the panoramic map to correspond with the as-built drawings at the time of station commissioning. Therefore, the component segmentation and numbering of the panoramic map is particularly important. Existing technologies for component segmentation and numbering of panoramic maps suffer from problems such as unclear component levels, high segmentation difficulty, or inapplicability to components in certain areas.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This application provides a method and apparatus for obtaining photovoltaic module templates, as well as a non-volatile storage medium, to at least solve the technical problems of difficulty in matching modules when using a single template for panoramic map segmentation due to the tilt of the string surface, inconsistent shadows and color differences, and the high difficulty of segmentation.

[0005] According to one aspect of the embodiments of this application, a method for obtaining photovoltaic module templates is provided, comprising: obtaining a panoramic map of a target area; performing string segmentation on the panoramic map to obtain a string segmentation mask, wherein the panoramic map is an image stitched together from visible light images; and performing component segmentation on the string segmentation mask to obtain multiple photovoltaic module templates, wherein each photovoltaic module template in the multiple photovoltaic module templates corresponds one-to-one with each string in the panoramic map.

[0006] Optionally, the string segmentation mask is segmented into multiple photovoltaic module templates, including: preprocessing the string segmentation mask to obtain a preprocessed string segmentation mask; and postprocessing the preprocessed string segmentation mask to obtain multiple photovoltaic module templates that correspond one-to-one with multiple strings in the panoramic map.

[0007] Optionally, the string segmentation mask is preprocessed, including: denoising the string segmentation mask to obtain a denoised string segmentation mask; and initially segmenting the photovoltaic modules using an adaptive threshold method, wherein the photovoltaic modules exist in the denoised string segmentation mask.

[0008] Optionally, preprocessing the string segmentation mask further includes: detecting the edge contour of the photovoltaic module after initial segmentation and performing etching on the photovoltaic module; extracting the contour value of the edge contour of the etched photovoltaic module, wherein the contour value is the area of ​​the photovoltaic module.

[0009] Optionally, the preprocessed string segmentation mask is post-processed, including: filtering out photovoltaic modules with contour values ​​less than a first preset value, and retaining photovoltaic modules with contour values ​​greater than or equal to the first preset value; selecting the mode from the contour values ​​greater than or equal to the first preset value, and taking the contour value whose value is equal to the mode as the target contour value, wherein the mode is the contour value that appears most frequently among the multiple contour values ​​greater than or equal to the first preset value; and taking the photovoltaic module with the contour value of the target contour value as the photovoltaic module template.

[0010] Optionally, after post-processing the pre-processed string segmentation mask using a photovoltaic module whose contour value is the target contour value as a photovoltaic module template, the method for obtaining the photovoltaic module template further includes: determining a first area value, wherein the first area value is the area value of the photovoltaic module template of the first string; determining a second area value, wherein the second area value is the average area of ​​the photovoltaic module template of the second string, wherein the first string and the second string are different strings in the same power plant, and the second string is all strings located before the first string; and determining the difference between the first area value and the second area value.

[0011] Optionally, after determining the difference between the first area value and the second area value, the method for obtaining the photovoltaic module template further includes: if the absolute value of the difference is greater than a second preset value, deleting the photovoltaic module template of the first string and using the photovoltaic module template of the third string as the photovoltaic module template of the first string, wherein the third string is a string located before the first string; if the absolute value of the difference is less than or equal to the second preset value, retaining the photovoltaic module template of the first string.

[0012] According to another aspect of the embodiments of this application, an apparatus for obtaining photovoltaic module templates is also provided, comprising: an acquisition module for acquiring a panoramic map of a target area; a string segmentation module for performing string segmentation on the panoramic map to obtain a string segmentation mask, wherein the panoramic map is an image stitched together from visible light images; and a component segmentation module for performing component segmentation on the string segmentation mask to obtain multiple photovoltaic module templates, wherein each photovoltaic module template in the multiple photovoltaic module templates corresponds one-to-one with each string in the panoramic map.

[0013] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-described method for obtaining a photovoltaic module template by running the computer program.

[0014] According to another aspect of the embodiments of this application, an electronic device is also provided, the electronic device including: a memory and a processor, the processor being configured to run a program stored in the memory, wherein the program executes the above-described method for obtaining a photovoltaic module template when it runs.

[0015] According to another aspect of the embodiments of this application, a processor is also provided for running a program stored in a memory, wherein the program executes the above-described method for obtaining a photovoltaic module template.

[0016] In this embodiment, a panoramic map of the target area is acquired, and the panoramic map is segmented into strings to obtain a string segmentation mask. The panoramic map is an image stitched together from visible light images. The string segmentation mask is then segmented into components to obtain photovoltaic module templates. By segmenting the panoramic map of the entire power station down to the level of each string, extracting the component template corresponding to each string, and filling the obtained component templates internally, the filling of the strings achieves the goal of ensuring that each string has a unique photovoltaic module template. This achieves the technical effect of accurately segmenting photovoltaic modules and solves the technical problems of difficulty in matching components when using a single template for panoramic map segmentation due to the tilt, shadows, and color differences on the string surface, as well as the high segmentation difficulty. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0018] Figure 1 This is a flowchart of a method for obtaining a photovoltaic module template according to an embodiment of this application;

[0019] Figure 2 This is a schematic diagram of noise reduction processing of a string segmentation mask according to an embodiment of this application;

[0020] Figure 3 This is a schematic diagram of the initial segmentation of a photovoltaic module according to an embodiment of this application;

[0021] Figure 4 This is a schematic diagram of edge detection of a photovoltaic module after initial segmentation, according to an embodiment of this application;

[0022] Figure 5 This is a schematic diagram of the etching process of a photovoltaic module according to an embodiment of this application;

[0023] Figure 6This is a structural diagram of an apparatus for obtaining a photovoltaic module template according to an embodiment of this application;

[0024] Figure 7a This is a flowchart illustrating the method for obtaining a monocrystalline shingled photovoltaic module template according to an embodiment of this application;

[0025] Figure 7b This is a flowchart for obtaining templates for monocrystalline shingled photovoltaic modules based on relevant technologies;

[0026] Figure 8 This is a flowchart illustrating the process of obtaining a photovoltaic module template according to an embodiment of this application;

[0027] Figure 9 This is a flowchart illustrating the application of photovoltaic module templates. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0030] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:

[0031] Panoramic map: The visible light images of the power plant obtained by drones are input into mapping software, and the panoramic map of the power plant is obtained by stitching the images together.

[0032] Photovoltaic modules: These refer to solar cell modules. In panoramic maps, photovoltaic modules are often depicted as rectangles.

[0033] A string is an area containing multiple photovoltaic modules. A power plant contains multiple string areas, and a string area contains multiple photovoltaic modules.

[0034] Monocrystalline shingled modules: Monocrystalline shingled modules are a relatively special type of module. There is a white line in the middle of the monocrystalline shingled module. This white line has a great impact on the segmentation of the module and can cause mis-segmentation.

[0035] In related technologies, when segmenting and numbering components in a panoramic map, the panoramic map is first segmented into strings. Based on the segmentation results, a manually extracted photovoltaic module template is used to match each string area: first, the four corner coordinates of the module are matched, and then the string area is filled. Although the method of manually extracting photovoltaic modules can solve the problem of the difficulty in segmenting photovoltaic modules due to the unclear component level in the panoramic map, the extraction of photovoltaic modules depends on manual labor and is prone to errors. Furthermore, since the same template is used for all components in a power plant in related technologies, the method of using one template per power plant is not applicable when components in different areas of the power plant are vertical or long, or when they are tilted. Therefore, when using related technologies to extract photovoltaic modules, there are problems such as the limited applicability of photovoltaic module templates and the difficulty in segmenting components. To solve the above problems, this application provides a method for obtaining photovoltaic module templates. This method automatically extracts the module template corresponding to each string, effectively solving the problem that a single template for a power plant cannot adapt, reducing the segmentation difficulty; at the same time, it also solves the problem of difficulty in extracting monocrystalline shingled modules.

[0036] According to an embodiment of this application, a method for obtaining a photovoltaic module template is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0037] Figure 1 This is a flowchart of a method for obtaining a photovoltaic module template according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:

[0038] Step S102: Obtain a panoramic map of the target area;

[0039] In step S102, images captured by the UAV are acquired and processed to obtain a panoramic map of the target area. It should be noted that the images acquired by the UAV include both infrared and visible light images. Infrared images are mainly used for fault detection and location. Fault identification and location can accurately output the GPS location information of fault points (such as missing, non-generating strings, hot spots, etc.). The fault information is superimposed on the panoramic map according to the severity level and color, which can roughly show the location of the fault point. Visible light images are mainly input into the mapping software to reconstruct the panoramic map of the power station. In this embodiment, the panoramic map is obtained by inputting the visible light images into the mapping software and stitching them together.

[0040] Step S104: Perform string segmentation on the panoramic map to obtain a string segmentation mask, wherein the panoramic map is an image stitched together from visible light images;

[0041] In step S104, the panoramic map generated from the visible light image captured by the UAV in step S102 is subjected to string segmentation to generate a string segmentation mask, which is usually displayed in black and white.

[0042] Step S106: Perform component segmentation on the string segmentation mask to obtain multiple photovoltaic module templates, wherein each photovoltaic module template corresponds one-to-one with each string in the panoramic map.

[0043] In step S106, the string segmentation mask obtained in step S104 is segmented into components to obtain multiple strings of the panoramic map, and photovoltaic module templates corresponding to the multiple strings in the panoramic map are automatically extracted.

[0044] Through the above steps, the panoramic map of the entire power station is segmented and reduced to the level of each string. The corresponding template of each string in the power station is automatically extracted and the string is filled. This achieves the goal of accurate component segmentation and solves the problem that a single template cannot adapt when using a single template to extract components for the same power station. It realizes the technical effect of component segmentation for panoramic maps of power stations in both simple and complex environments.

[0045] According to an optional embodiment of this application, the string segmentation mask is used to segment components, including the following steps: preprocessing the string segmentation mask to obtain a preprocessed string segmentation mask; and postprocessing the preprocessed string segmentation mask to obtain multiple photovoltaic module templates that correspond one-to-one with multiple strings in the panoramic map.

[0046] It should also be noted that, since the drone flies at an altitude of about 120 meters each time it takes visible light images, the resolution and clarity of the photovoltaic modules captured are guaranteed; and since the panoramic map (TIF map) obtained from the mapping software is a JPG image compressed using a unified compression service, the size of the modules is not affected by image compression; therefore, the panoramic maps of the power plants mentioned in this application embodiment all exhibit the following characteristics: 1) The size of the modules in the same power plant is consistent, mainly manifested in the consistent module area or the consistent module perimeter; 2) The colors of the modules are inconsistent, among which reflection, color difference and shooting shadows will affect the color of the modules; 3) The size of the strings is inconsistent.

[0047] To obtain multiple photovoltaic module templates that correspond one-to-one with each string in the panoramic map, after segmenting the panoramic map with the above characteristics into strings, the resulting string segmentation mask is preprocessed and postprocessed. The preprocessing of the string segmentation mask includes, but is not limited to, at least one of the following steps: noise reduction, initial segmentation, erosion, filling, etc. The postprocessing of the string segmentation mask includes steps such as filtering and comparison (i.e., the postprocessing of the preprocessed string segmentation mask described below).

[0048] According to another optional embodiment of this application, the preprocessing of the string segmentation mask includes the following steps: denoising the string segmentation mask to obtain a denoised string segmentation mask; and initially segmenting the photovoltaic modules using an adaptive threshold method, wherein the photovoltaic modules are present in the denoised string segmentation mask.

[0049] In some embodiments of this application, the steps of denoising and initial segmentation are performed during the preprocessing of the string segmentation mask. Figure 2 This is a schematic diagram of noise reduction processing for string splitting masks, such as... Figure 2 As shown, Gaussian filtering is used to denoise the string segmentation mask. The denoising process includes the following steps: Step 1: Convert the light string image (i.e., the string segmentation mask) into a grayscale image: Set each pixel of the light string image between 0 and 255, so that the originally colored light string image is displayed in grayscale. Step 2: Call the Gaussian blur function (cv2.GaussianBlur) in the computer vision processing library (OPENCV) to denoise the string region using Gaussian filtering. The process of using Gaussian filtering to denoise the string segmentation mask is actually a weighted averaging process of the entire light string image (i.e., the string segmentation mask); through Gaussian filtering, the value of each pixel in the light string image is replaced with a value obtained by weighted averaging of its own value and the values ​​of other pixels in its neighborhood; the image obtained after Gaussian filtering has a higher signal-to-noise ratio than the original image, and therefore reflects the real signal better. Figure 3This is a schematic diagram of the initial segmentation of photovoltaic modules, such as... Figure 3 As shown, after denoising the photovoltaic string image, an adaptive thresholding method is used to initially segment the photovoltaic modules within the string region: the adaptive thresholding function (cv2.adaptiveThreshold) is used to calculate a corresponding threshold for each region corresponding to each module within the string region, and the original image is re-displayed using the calculated threshold; therefore, the image obtained after adaptive thresholding can reflect the overall / local features of the image compared to the original image; thus achieving the purpose of initial segmentation of the modules.

[0050] As mentioned above, a series of preprocessing steps can be performed on the string segmentation mask, including the following steps: detecting the edge contour of the photovoltaic module after initial segmentation and performing etching on the photovoltaic module; extracting the contour value of the edge contour of the etched photovoltaic module, wherein the contour value is the area of ​​the photovoltaic module.

[0051] In some embodiments, the etching and filling steps are performed during the preprocessing of the string splitting mask. Figure 4 This is a schematic diagram of edge detection performed on the initially segmented photovoltaic modules, such as... Figure 4 As shown, before performing erosion and filling processes, the edge detection method (cv2.Canny) is first used to detect the edge contours of the initially segmented photovoltaic module image obtained in the previous embodiment: identifying points with significant brightness changes in the initially segmented photovoltaic module image to obtain an image that reflects the structure of the photovoltaic module; and edge detection can also remove irrelevant information, significantly reducing the amount of data and accelerating the process of obtaining the photovoltaic module template. Figure 5 This is a schematic diagram of the corrosion treatment of photovoltaic modules, such as... Figure 5 As shown, the cv2.erode function is used to erode the component and fill its surface. For each pixel in the photovoltaic module image obtained after edge detection, for pixels with a value of 0, the pixel values ​​of all pixels within a region centered on that pixel and with a preset value as the radius are set to 0. For pixels with a value of 1, the pixel values ​​of all pixels within a region centered on that pixel and with a preset value as the radius are set to 1. This method of eroding the photovoltaic module image after edge detection reduces the area with a pixel value of 1 in the original image and eliminates burrs in the image.

[0052] Filling the surface of the photovoltaic module image involves dilating the etched image of the photovoltaic module. This includes: traversing each pixel in the etched image of the photovoltaic module; for a pixel with a value of 0, if there is a pixel with a value of 1 within a region centered on that pixel and with a radius of a preset value, then the pixel value of all pixels within that region is set to 1; if there is no pixel with a value of 1 within that region, then the pixel value of all pixels within that region is set to 1. Set to 0; for a pixel with a pixel value of 1, if there is a pixel with a pixel value of 0 in a region centered on that pixel and with a radius of a preset value, then set the pixel value of all pixels in that region centered on that pixel and with a radius of the preset value to 0; if there is no pixel with a pixel value of 0 in a region centered on that pixel and with a radius of the preset value, then set the pixel value of all pixels in that region centered on that pixel and with a radius of the preset value to 1; through the above steps, the image dilation process is achieved, filling the hole areas in the photovoltaic module image, and eliminating small particle noise in the photovoltaic module image.

[0053] It should also be noted that since both erosion and filling are performed on the image after it has been processed by the adaptive thresholding method, i.e., the binarized image, the pixel with a value of 0 mentioned above is a pixel in the dark / black area of ​​the binarized image, and the pixel with a value of 1 mentioned above is a pixel in the bright / white area of ​​the binarized image.

[0054] According to some optional embodiments of this application, post-processing of the pre-processed string segmentation mask includes the following steps: filtering out photovoltaic modules with contour values ​​less than a first preset value, and retaining photovoltaic modules with contour values ​​greater than or equal to the first preset value; selecting the mode from the contour values ​​greater than or equal to the first preset value, and taking the contour value whose value is equal to the mode as the target contour value, wherein the mode is the contour value that appears most frequently among the multiple contour values ​​greater than or equal to the first preset value; and taking the photovoltaic module with the contour value of the target contour value as the photovoltaic module template.

[0055] In some embodiments of this application, the area of ​​each photovoltaic module segmented after the above processing is calculated. Based on the aforementioned characteristic of the consistency of module size (i.e., the size of modules in the same power station is consistent), photovoltaic module images with an area smaller than a preset value (i.e., the first preset value) are filtered out, while photovoltaic modules with an area greater than or equal to the preset value (i.e., the first preset value) are retained. Specifically, when the first preset value is determined to be 100, images of photovoltaic modules with an area less than 100 are filtered out, and images of photovoltaic modules with an area greater than or equal to 100 are retained. For the images of the retained photovoltaic modules, the mode of their contour values ​​is selected, and the value represented by the mode is used as the contour value (i.e., the target contour value) of the photovoltaic module template. Images of photovoltaic modules whose contour values ​​conform to the target contour value are used as photovoltaic module templates. Since the modules in the same string have the characteristic of consistent size, the photovoltaic module template determined above will be used as the template for all photovoltaic modules in the string to which it belongs.

[0056] In addition, when selecting the mode of the contour values, there are two cases: 1) If there is a unique contour value that appears most frequently among multiple contour values, then the unique contour value is the mode; 2) If there are several contour values ​​that appear most frequently among multiple contour values, then the average of these several contour values ​​is taken as the mode.

[0057] According to an optional embodiment of this application, after post-processing the pre-processed string segmentation mask using a photovoltaic module with a contour value of a target contour value as a photovoltaic module template, obtaining the photovoltaic module template further includes the following method: determining a first area value, wherein the first area value is the area value of the photovoltaic module template of the first string; determining a second area value, wherein the second area value is the average area of ​​the photovoltaic module template of the second string, wherein the first string and the second string are different strings in the same power station, and the second string is all strings located before the first string; and determining the difference between the first area value and the second area value.

[0058] In this embodiment, considering the consistency of components within the same power station, abnormal photovoltaic module templates are corrected by the following steps: First, the photovoltaic module template of any string (i.e., the first string) in the power station is determined using the above method, and the area of ​​the photovoltaic module template is calculated. Next, the same method is used to determine the photovoltaic module templates of all strings (i.e., the second string) in the same power station that are located in front of the first string in the panoramic map, and the average area of ​​these photovoltaic module templates is calculated. The difference between the area of ​​the photovoltaic module template (i.e., the first area value) and the average area of ​​the photovoltaic module templates of all strings located in front of the first string (i.e., the second area value) is calculated.

[0059] According to an optional embodiment of this application, after determining the difference between the first area value and the second area value, the method for obtaining the photovoltaic module template further includes: if the absolute value of the difference is greater than a second preset value, deleting the photovoltaic module template of the first string and using the photovoltaic module template of the third string as the photovoltaic module template of the first string, wherein the third string is a string located before the first string; if the absolute value of the difference is less than or equal to the second preset value, retaining the photovoltaic module template of the first string.

[0060] In this embodiment, the difference obtained in the previous embodiment determines whether the photovoltaic module template of the current string (i.e., the first string) needs to be corrected. If the difference is greater than a preset value (i.e., the second preset value), it is confirmed that the photovoltaic module template needs to be corrected, and the photovoltaic module template of the current string is corrected to the photovoltaic module template of the previous string (i.e., the third string). Otherwise, if the difference is less than or equal to the preset value (i.e., the second preset value), it is confirmed that the photovoltaic module template does not need to be corrected. Specifically, when the second preset value is determined to be 60, the photovoltaic module template is corrected when the difference is greater than 60; when the difference is less than or equal to 60, the photovoltaic module template is not corrected.

[0061] Figure 6 This is a structural diagram of an apparatus for obtaining a photovoltaic module template according to an embodiment of this application, as shown below. Figure 6 As shown, the device includes: an acquisition module 60 for acquiring a panoramic map of the target area; a string segmentation module 62 for segmenting the panoramic map into strings to obtain a string segmentation mask, wherein the panoramic map is an image stitched together from visible light images; and a component segmentation module 64 for segmenting the string segmentation mask into components to obtain multiple photovoltaic component templates, wherein each photovoltaic component template corresponds one-to-one with each string in the panoramic map.

[0062] It should be noted that, Figure 6 Preferred embodiments of the shown examples can be found in [reference needed]. Figure 1 The relevant descriptions of the embodiments shown will not be repeated here.

[0063] In this embodiment, the device for obtaining photovoltaic module templates is used to obtain monocrystalline shingled photovoltaic modules. Figure 7a This is a flowchart of obtaining a template for a monocrystalline shingled photovoltaic module according to the method of this application, such as... Figure 7a As shown, a visible light image is acquired, converted into a grayscale image, and Gaussian filtered to obtain a denoised Gaussian filtered image. Adaptive threshold segmentation is performed on the Gaussian filtered image, and then edge detection and image erosion are performed on the image with a clearer component structure after adaptive threshold segmentation to finally obtain a monocrystalline shingled photovoltaic module template. Figure 7bThis is a flowchart for obtaining templates for monocrystalline shingled photovoltaic modules based on relevant technologies, such as... Figure 7b As shown, obtaining a monocrystalline shingled photovoltaic module template using related technologies includes the following steps: converting a visible light image to a grayscale image, performing Gaussian filtering to denoise the grayscale image to obtain a Gaussian filtered image, and performing edge detection and image erosion on the Gaussian filtered image to obtain the monocrystalline shingled photovoltaic module template. Compared to the method in this application, the related technologies lack the step of using an adaptive threshold method for initial image segmentation. Figure 7a and 7b As can be seen, the photovoltaic module template image obtained by the method of this application has no redundant areas and matches the monocrystalline shingled photovoltaic module. It can be seen that, since the method of this application adds an adaptive threshold segmentation method after Gaussian filtering, and uses Gaussian convolution as the threshold, the threshold of each pixel is determined by the pixel threshold of the neighborhood window centered on itself, the adaptiveness of the segmentation is achieved, the error of extracting the photovoltaic module template is reduced, and the difficult matching problem of string surface tilt, shadow and color difference inconsistency is further solved.

[0064] It should also be noted that after obtaining the photovoltaic module template, when applying the photovoltaic module template, it is matched with the visible light string area to obtain the matching coordinate points, and then numbered and sorted.

[0065] Figure 8 This is a flowchart for obtaining a photovoltaic module template, such as... Figure 8 As shown, the photovoltaic module template of the target string is obtained by acquiring a visible light string, converting it to a grayscale image, performing Gaussian blurring, adaptive thresholding, edge detection image erosion, and contour extraction. If the contour value of the photovoltaic module template is less than a preset value (e.g., less than 100), the contour extraction step is repeated to correct the photovoltaic module template. If the contour value of the photovoltaic module template is greater than or equal to the preset value (e.g., greater than or equal to 100), the mode of the contour value is obtained, the mode is saved, and the average value is calculated. If the difference between the mode and the average value is less than another preset value that is different from the previous preset value, and if the difference is less than 60, the contour value corresponding to the current mode is obtained as the contour value of the photovoltaic module template. Otherwise, if the difference is greater than or equal to 60, the contour value corresponding to the previous mode is taken as the contour value of the photovoltaic module template. The photovoltaic module template with the contour value equal to the mode is used as the photovoltaic module template of the target string.

[0066] Figure 9 This is a flowchart illustrating the application of photovoltaic module templates, such as... Figure 9As shown, based on the panoramic map of the power plant and the corresponding string segmentation mask, each string is obtained one by one. Using the photovoltaic module template obtained in the above steps, the module template is automatically extracted for each string and matched with the visible light string region. During the matching, the tilt angle of the photovoltaic module image is calculated using the Huffman line detection method. If the image is determined to have a tilt angle, the rotation matrix is ​​calculated, and the photovoltaic module image is inversely rotated. Then, template matching, threshold limiting (i.e., adaptive threshold processing), contour acquisition, and module filling are performed on the photovoltaic module template and the inversely rotated image. If the image is determined not to have a tilt angle, template matching, threshold limiting (i.e., adaptive threshold processing), contour acquisition, and module filling are performed directly on the photovoltaic module image without tilt angle and the photovoltaic module template to complete the matching between the photovoltaic module template and the visible light string region. After the matching is completed, the matching coordinate points are obtained and then numbered and sorted, thus achieving the goal of accurate photovoltaic module segmentation.

[0067] This application embodiment also provides a non-volatile storage medium, which includes a stored computer program, wherein the device containing the non-volatile storage medium executes the above-described method for obtaining a photovoltaic module template by running the computer program.

[0068] The aforementioned non-volatile storage medium is used to store a program that performs the following functions: acquiring a panoramic map of the target area, and performing string segmentation on the panoramic map to obtain a string segmentation mask, wherein the panoramic map is an image stitched together from visible light images; and performing component segmentation on the string segmentation mask to obtain a photovoltaic module template.

[0069] This application also provides an electronic device, which includes a memory and a processor. The processor is used to run a program stored in the memory, wherein the program executes the above-described method for obtaining a photovoltaic module template.

[0070] The aforementioned electronic device is used to perform the following functions: acquire a panoramic map of the target area, and perform string segmentation on the panoramic map to obtain a string segmentation mask, wherein the panoramic map is an image stitched together from visible light images; and perform component segmentation on the string segmentation mask to obtain a photovoltaic module template.

[0071] This application also provides a processor for running a program stored in a memory, wherein the program executes the above-described method for obtaining a photovoltaic module template.

[0072] The processor described above is used to run a program that performs the following functions: acquire a panoramic map of the target area, and perform string segmentation on the panoramic map to obtain a string segmentation mask, wherein the panoramic map is an image stitched together from visible light images; and perform component segmentation on the string segmentation mask to obtain a photovoltaic module template.

[0073] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0074] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0075] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0076] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0077] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0078] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to related technologies, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0079] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for obtaining a photovoltaic module template, characterized in that, include: Obtain a panoramic map of the target area; The panoramic map is segmented into segments to obtain a segmentation mask, wherein the panoramic map is an image stitched together from visible light images; The string segmentation mask is segmented into components to obtain multiple photovoltaic module templates. Each photovoltaic module template corresponds one-to-one with each string in the panoramic map. The string segmentation mask is used to segment the photovoltaic modules to obtain multiple photovoltaic module templates, including: The string segmentation mask is preprocessed to obtain a preprocessed string segmentation mask; the preprocessed string segmentation mask is then postprocessed to obtain multiple photovoltaic module templates that correspond one-to-one with multiple strings in the panoramic map. Preprocessing the string splitting mask includes: The photovoltaic module is initially segmented using an adaptive threshold method. The edge contour of the photovoltaic module after initial segmentation is detected, and the photovoltaic module is subjected to erosion processing. The image of the eroded photovoltaic module is then subjected to dilation processing to fill the hole areas in the image of the photovoltaic module. Extract the contour value of the edge contour of the photovoltaic module after the above processing, wherein the contour value is the area of ​​the photovoltaic module; Post-processing of the preprocessed string segmentation mask includes: Filter out photovoltaic modules whose contour value is less than a first preset value, and retain photovoltaic modules whose contour value is greater than or equal to the first preset value; The mode is selected from the contour values ​​that are greater than or equal to a first preset value. The contour value whose value is equal to the mode is taken as the target contour value. The mode is the contour value that appears most frequently among the multiple contour values ​​that are greater than or equal to the first preset value. The photovoltaic module whose contour value is the target contour value is taken as the photovoltaic module template. When applying the photovoltaic module template, it is determined whether the image of the photovoltaic module has a tilt angle. If the image of the photovoltaic module has a tilt angle, the image of the photovoltaic module is subjected to inverse rotation transformation, and template matching is performed on the photovoltaic module template and the image of the photovoltaic module after inverse rotation transformation.

2. The method according to claim 1, characterized in that, Preprocessing the string splitting mask includes: The string segmentation mask is denoised to obtain the denoised string segmentation mask. The photovoltaic module is initially segmented using an adaptive threshold method, wherein the photovoltaic module exists in the denoised string segmentation mask.

3. The method according to claim 1, characterized in that, After using the photovoltaic module with the contour value of the target contour value as a photovoltaic module template, the method further includes: Determine a first area value, wherein the first area value is the area value of the photovoltaic module template of the first string; Determine a second area value, wherein the second area value is the average area of ​​the photovoltaic module templates of the second string, wherein the first string and the second string are different strings in the same power station, and the second string is all strings located before the first string; Determine the difference between the first area value and the second area value.

4. The method according to claim 3, characterized in that, After determining the difference between the first area value and the second area value, the method further includes: If the absolute value of the difference is greater than the second preset value, delete the photovoltaic module template of the first string and use the photovoltaic module template of the third string as the photovoltaic module template of the first string, wherein the third string is a string located before the first string. If the absolute value of the difference is less than or equal to the second preset value, the photovoltaic module template of the first string is retained.

5. An apparatus for obtaining a photovoltaic module template, characterized in that, include: The acquisition module is used to acquire a panoramic map of the target area; A string segmentation module is used to perform string segmentation on the panoramic map to obtain a string segmentation mask, wherein the panoramic map is an image stitched together from visible light images; The component segmentation module is used to segment the string segmentation mask into components to obtain multiple photovoltaic component templates. Each photovoltaic component template in the multiple photovoltaic component templates corresponds one-to-one with each string in the panoramic map. The string segmentation mask is used to segment the photovoltaic modules to obtain multiple photovoltaic module templates, including: The string segmentation mask is preprocessed to obtain a preprocessed string segmentation mask; the preprocessed string segmentation mask is then postprocessed to obtain multiple photovoltaic module templates that correspond one-to-one with multiple strings in the panoramic map. Preprocessing the string splitting mask includes: The photovoltaic (PV) module is initially segmented using an adaptive threshold method. The edge contours of the initially segmented PV module are detected, and the PV module undergoes erosion processing. The image of the eroded PV module is then dilated to fill in any voids in the image. The contour values ​​of the processed PV module's edge contours are extracted, where the contour value is the area of ​​the PV module. The pre-processed string segmentation mask is then post-processed, including: filtering out PV modules with contour values ​​less than a first preset value, and retaining PV modules with contour values ​​greater than or equal to the first preset value; selecting the mode from the contour values ​​greater than or equal to the first preset value, and using the contour value equal to the mode as the target contour value, where the mode is the contour value that appears most frequently among the multiple contour values ​​greater than or equal to the first preset value; and using the PV module with the contour value of the target contour value as a PV module template. The device for obtaining the photovoltaic module template is further configured to determine whether the image of the photovoltaic module has a tilt angle when applying the photovoltaic module template, and if the image of the photovoltaic module has a tilt angle, to perform an inverse rotation transformation on the image of the photovoltaic module, and to perform template matching on the photovoltaic module template and the image of the photovoltaic module after the inverse rotation transformation.

6. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored computer program, wherein the device containing the non-volatile storage medium executes the method for obtaining a photovoltaic module template as described in any one of claims 1 to 4 by running the computer program.

7. An electronic device, characterized in that, include: A memory and a processor, the processor being configured to run a program stored in the memory, wherein the program, when running, performs the method for obtaining a photovoltaic module template as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method for automatically generating photovoltaic panel templates based on region-line primitive association framework (RLPAF)

    CN108022245A

  • Infrared image photovoltaic module visual identification method based on semantic segmentation

    CN113538453A

  • Photovoltaic module positioning method and device and electronic equipment

    CN115147597A