A visual-based photovoltaic module counting method and system

CN117197691BActive Publication Date: 2026-06-26ZHUHAI SHANGFANG CLEAN ENERGY TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHUHAI SHANGFANG CLEAN ENERGY TECH CO LTD
Filing Date
2023-09-01
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing methods for counting the number of photovoltaic modules are inefficient and inaccurate, relying mainly on manual counting, which cannot meet the needs of engineering applications.

Method used

A set of distance images captured by drones is used to identify the number of photovoltaic modules using a preset image recognition algorithm. Accuracy is ensured by weighted average calculation and difference verification, and recognition precision is improved by combining image enhancement and rectangular contour detection.

Benefits of technology

It effectively improved the efficiency of photovoltaic module quantity statistics, reduced labor costs, and improved the accuracy and consistency of statistics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117197691B_ABST
    Figure CN117197691B_ABST
Patent Text Reader

Abstract

The application discloses a kind of visual-based photovoltaic module statistics method and system, it is related to computer vision technical field.In the method, the distance image set photographed by unmanned aerial vehicle is acquired;Distance image set includes n distance images collected at different distances, wherein n is greater than or equal to 2 positive integer;Distance image set is input to the preset image recognition algorithm, and multiple recognition results are obtained;The number of photovoltaic modules identified in the distance image collected at different distances is the recognition result;Difference value calculation is carried out on multiple recognition results two by two, and multiple difference value calculation results are obtained;When each difference value calculation result is less than or equal to preset threshold value, weighted average calculation is carried out on multiple recognition results, and final statistical result is obtained.The technical scheme provided in the application can effectively improve the efficiency and accuracy of statistics when the number of photovoltaic modules is counted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer vision technology, specifically to a vision-based statistical method and system for photovoltaic modules. Background Technology

[0002] Photovoltaic modules are the core components used in solar power generation, often also called solar panels or photovoltaic panels. They convert sunlight into electrical energy and are one of the basic building blocks of a solar power generation system. A photovoltaic module consists of many solar cells connected together to form a large panel to maximize the absorption of sunlight.

[0003] In some engineering applications, it is necessary to ensure the quantity of installed photovoltaic (PV) modules to facilitate business-level decision-making. Currently, the methods for counting PV modules are mainly based on initial installation statistics and manual counting, which is highly inefficient. Therefore, how to effectively improve the efficiency and accuracy of PV module quantity counting has become a pressing issue.

[0004] Therefore, there is an urgent need for a vision-based statistical method for photovoltaic modules to solve the problems existing in the current technology. Summary of the Invention

[0005] This application provides a vision-based method and system for counting photovoltaic modules, which can effectively improve the efficiency and accuracy of counting the number of photovoltaic modules.

[0006] In a first aspect, this application provides a vision-based method for statistical analysis of photovoltaic modules. The method includes: acquiring a set of distance images captured by a drone; the set of distance images includes n distance images acquired at different distances, where n is a positive integer greater than or equal to 2; inputting the set of distance images into a preset image recognition algorithm to obtain multiple recognition results; the recognition result is the number of photovoltaic modules identified in the distance images acquired at different distances; performing pairwise difference calculations on the multiple recognition results to obtain multiple difference calculation results; when each of the difference calculation results is less than or equal to a preset threshold, performing a weighted average calculation on the multiple recognition results to obtain a final statistical result.

[0007] By employing the above technical solution, distance images captured by drones can significantly reduce labor costs and effectively improve the efficiency of counting photovoltaic modules. The set of distance images is then input into a preset image recognition algorithm to obtain the number of photovoltaic modules identified in multiple distance images collected at different distances, thus effectively improving the efficiency of counting photovoltaic modules. Pairwise differences are calculated from multiple recognition results to obtain multiple difference calculation results. When each difference calculation result is less than or equal to a preset threshold, a weighted average is calculated from the multiple recognition results to obtain the final statistical result. By determining whether each difference calculation result is less than or equal to the preset threshold, it is ensured that the preset image recognition algorithm can accurately identify the number of photovoltaic modules in distance images at different distances, thereby ensuring the accuracy of the final statistical result.

[0008] Optionally, inputting the set of distance images into a preset image recognition algorithm to obtain multiple recognition results specifically includes: performing weighted processing on the multiple distance images to obtain multiple weighted distance images; performing image enhancement processing on each weighted distance image to obtain multiple enhanced distance images; determining whether each enhanced distance image meets preset image requirements; if so, performing rectangular bounding box detection on each enhanced distance image to obtain multiple rectangular bounding box areas and a number of rectangular bounding boxes; determining whether the area of ​​each rectangular bounding box is within a preset range corresponding to the current distance; if so, obtaining multiple recognition results based on the number of rectangular bounding boxes corresponding to each enhanced distance image.

[0009] By employing the above technical solution, multiple distance images are weighted to obtain multiple weighted distance images. The purpose of weighting multiple distance images is to highlight a certain region in the distance images by emphasizing the pixels in that region, thus facilitating subsequent analysis and processing. Image enhancement processing is then performed on each weighted distance image to obtain multiple enhanced distance images. Rectangular bounding box detection is then performed to obtain multiple recognition results, thereby effectively improving the accuracy of the recognition results.

[0010] Optionally, the weighted processing of the multiple distance images to obtain multiple weighted distance images specifically includes: performing smoothing filtering on each distance image to obtain a first distance image corresponding to each distance image; determining whether the SSIM value corresponding to the first distance image is greater than a preset value; if so, calculating the gradient histogram for each first distance image to obtain multiple regions of interest; determining whether the feature information of the photovoltaic module in each region of interest is empty; if not, comparing the pixels of each region of interest with the pixels of the distance image corresponding to the region of interest to obtain pixel factors of multiple regions of interest; obtaining the true pixel value of each region of interest; calculating the weighted pixel value of multiple regions of interest based on the pixel factor and the true pixel value; and weighting the pixels of each region of interest based on the weighted pixel value of multiple regions of interest to obtain multiple weighted distance images.

[0011] By employing the above technical solution, smoothing filtering of the distance image can remove some noise and make the distance image smoother. Then, gradient histogram calculation is performed on the first distance image to obtain the region of interest (ROI); and based on the weighted pixel values ​​of multiple ROIs, the pixels of each ROI are correspondingly weighted to obtain multiple weighted distance images. This weighting process plays an important role in image processing and target recognition, highlighting the importance of the ROI within the overall image.

[0012] Optionally, before determining whether the area of ​​each rectangular outline is within a preset range corresponding to the current distance, the method further includes obtaining a preset range corresponding to the current distance; the preset range corresponding to the current distance is obtained by the following method: obtaining the pixel area S of the rectangular region of a single component in the image at the current distance. ground_l ; Obtain the floating range value 'a'; Calculate the pixel area S of the rectangular region of a single component in the image at the current distance. ground_l Subtracting the floating range value 'a' yields the preset lower limit value corresponding to the current distance, and the pixel area S of the rectangular region of a single component in the image at the current distance is calculated. ground_l Adding the floating range value 'a', we obtain the upper limit of the preset range corresponding to the current distance; the preset range corresponding to the current distance is represented as [S ground_l -a,S ground_l +a].

[0013] Optionally, calculating the weighted pixel value of the region of interest based on the pixel factor and the true pixel value specifically includes: the weighted pixel value of the region of interest is calculated using the following formula:

[0014] pixel image-value =alpha×pixel value

[0015]

[0016] Among them, pixel image-value The weighted pixel values ​​are alpha and pixel weight. value The pixel's true value, pixel factor The pixel factor is mentioned.

[0017] Optionally, the step of calculating a weighted average of the multiple recognition results to obtain the final statistical result specifically includes: the final statistical result is calculated using the following formula:

[0018]

[0019] Where n≥2; N result The final statistical result; β i Let β1+…+β be the weights corresponding to the recognition results at the i-th distance. i +…+β n =1; N i This represents the recognition result for the i-th distance.

[0020] Optionally, acquiring the set of distance images captured by the drone specifically includes: receiving a photovoltaic module statistics request, sending a first control signal to the drone to make the vertical distance between the drone and the photovoltaic module area a first distance; acquiring a first distance image captured when the vertical distance between the drone and the photovoltaic module area is the first distance; sending an i-th control signal to the drone to make the vertical distance between the drone and the photovoltaic module area an i-th distance; where i∈(1,n]; and acquiring an i-th distance image captured when the vertical distance between the drone and the photovoltaic module area is the i-th distance.

[0021] A second aspect of this application provides a vision-based photovoltaic module statistical system, the system comprising: an acquisition module, an image recognition module, and a processing module; the acquisition module is used to acquire a set of distance images captured by a drone; the set of distance images includes n distance images acquired at different distances, where n is a positive integer greater than or equal to 2; the image recognition module is used to input the set of distance images into a preset image recognition algorithm to obtain multiple recognition results; the recognition result is the number of photovoltaic modules identified in the distance images acquired at different distances; the processing module is used to perform pairwise difference calculations on the multiple recognition results to obtain multiple difference calculation results; the processing module is further used to perform a weighted average calculation on the multiple recognition results when each difference calculation result is less than or equal to a preset threshold to obtain a final statistical result.

[0022] A third aspect of this application provides an electronic device including a processor, a memory, a user interface, and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any of the first aspects of this application.

[0023] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and executed as described in any of the first aspects of this application.

[0024] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:

[0025] 1. By using drones to capture distance images, labor costs can be greatly reduced and the efficiency of counting photovoltaic modules can be effectively improved. The set of distance images is input into a preset image recognition algorithm to obtain the number of photovoltaic modules identified in multiple distance images collected at different distances, thus effectively improving the efficiency of counting photovoltaic modules. The pairwise differences of multiple recognition results are calculated to obtain multiple difference calculation results. When each difference calculation result is less than or equal to a preset threshold, the multiple recognition results are weighted and averaged to obtain the final statistical result. By judging whether each difference calculation result is less than or equal to the preset threshold, it is ensured that the preset image recognition algorithm can accurately identify the number of photovoltaic modules in distance images at different distances, thus ensuring the accuracy of the final statistical result.

[0026] 2. By weighting multiple distance images, multiple weighted distance images are obtained. The purpose of weighting multiple distance images is to highlight a certain region in the distance images by emphasizing the pixels in that region, thus facilitating subsequent analysis and processing. Image enhancement processing is then performed on each weighted distance image to obtain multiple enhanced distance images. Rectangular bounding box detection is then performed to obtain multiple recognition results, thereby effectively improving the accuracy of the recognition results.

[0027] 3. By applying smoothing filters to the distance image, some noise in the image can be removed, making the distance image smoother. Then, gradient histogram calculation is performed on the first distance image to obtain the region of interest (ROI). Based on the weighted pixel values ​​of multiple ROIs, the pixels of each ROI are weighted accordingly, resulting in multiple weighted distance images. This weighting process plays an important role in image processing and target recognition, highlighting the importance of the ROI within the overall image. Attached Figure Description

[0028] Figure 1 This is one of the flowcharts illustrating a vision-based statistical method for photovoltaic modules provided in this application embodiment;

[0029] Figure 2 This is a second schematic flowchart of a vision-based photovoltaic module statistical method provided in this application embodiment;

[0030] Figure 3 This is a second schematic flowchart of a vision-based photovoltaic module statistical method provided in this application embodiment;

[0031] Figure 4 This is a schematic diagram of the structure of a vision-based photovoltaic module statistical system provided in an embodiment of this application;

[0032] Figure 5 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application.

[0033] Explanation of reference numerals in the attached drawings: 1. Acquisition module; 2. Image recognition module; 3. Processing module; 500. Electronic device; 501. Processor; 502. Communication bus; 503. User interface; 504. Network interface; 505. Memory. Detailed Implementation

[0034] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0035] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.

[0036] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0037] This application provides a vision-based statistical method for photovoltaic modules, referring to... Figure 1 This illustration shows one of the flowcharts of a vision-based photovoltaic module statistical method provided in an embodiment of this application. The method includes steps S11-S14, as follows:

[0038] Step S11: Obtain a set of distance images captured by the drone; the set of distance images includes n distance images collected at different distances, where n is a positive integer greater than or equal to 2.

[0039] In the above steps, the server acquires a set of distance images captured by the drone.

[0040] Specifically, in this technical solution, the set of example images captured by the drone includes n distance images collected under different examples, where n is a positive integer greater than or equal to 2. Since photovoltaic module areas often occupy a very large area, manually counting the number of photovoltaic modules is extremely time-consuming, labor-intensive, and inefficient. Therefore, using drone photography can significantly save labor costs and effectively improve the efficiency of counting photovoltaic modules.

[0041] In one possible implementation, step S11 specifically includes the following steps:

[0042] Accept the photovoltaic module statistics request, send a first control signal to the drone so that the vertical distance between the drone and the photovoltaic module area is a first distance; acquire a first distance image when the vertical distance between the drone and the photovoltaic module area is the first distance; send the i-th control signal to the drone so that the vertical distance between the drone and the photovoltaic module area is the i-th distance; where i∈(1,n]; acquire the i-th distance image when the vertical distance between the drone and the photovoltaic module area is the i-th distance.

[0043] Specifically, in this technical solution, the server receives a photovoltaic module statistics request sent by a user terminal, which includes, but is not limited to, electronic devices such as mobile phones, computers, and tablets. The server sends a first control signal to the drone, controlling the drone to fly to a location at a first vertical distance from the photovoltaic module area, so that the drone can take a top-down view of the photovoltaic module area. It should be noted that the drone must take a vertical shot to ensure that the captured image of the photovoltaic module area is clear and accurate. The first distance is a minimum distance, meaning that the image taken by the drone at this distance can completely present the entire photovoltaic module area. Therefore, the setting of the first distance needs to be specifically determined based on the area of ​​the photovoltaic module area, and thus, no further limitations are imposed in this application.

[0044] After the server controls the drone to capture an image of the photovoltaic module area at a vertical distance of a first distance, the server sends the i-th control signal to make the vertical distance between the drone and the photovoltaic module area the i-th distance; where i∈(1,n]; and acquires the i-th distance image when the vertical distance between the drone and the photovoltaic module area is the i-th distance. In this application, the n-th distance is the minimum limit distance at which the server can identify the captured photovoltaic module area image, that is, the server cannot clearly and accurately perform subsequent analysis and processing on photovoltaic module area images captured at distances greater than n.

[0045] It should be noted that when the server sends the i-th control signal to the drone for distance adjustment, the adjustment example should be a fixed distance adjustment, meaning that the example for each adjustment should be consistent to ensure uniform changes in the captured distance images. For example, if the minimum distance is 30m and the maximum distance is 70m, the adjusted distance can be 30m, 50m, 70m or 30m, 40m, 50m, 60m, 70m. If the adjusted distance is 30m, 50m, 70m, it means that the server sends the first control signal to the drone to control the drone to be at a vertical distance of 30m from the photovoltaic module area to capture the first distance image; then sends the second control signal to control the drone to be at a vertical distance of 50m from the photovoltaic module area to capture the second distance image; and then sends the third control signal to control the drone to be at a vertical distance of 70m from the photovoltaic module area to capture the third distance image.

[0046] Step S12: Input the distance image set into the preset image recognition algorithm to obtain multiple recognition results; the recognition result is the number of photovoltaic modules identified in the distance images collected at different distances.

[0047] In the above steps, the server inputs the distance image set into a preset image recognition algorithm to obtain multiple recognition results.

[0048] Specifically, in this technical solution, the server inputs a set of distance images into a preset image recognition algorithm, that is, performs multiple rounds of algorithmic processing on each distance image in the set. Finally, the number of photovoltaic modules in each distance image is obtained. The specific steps of inputting the set of distance images into the preset image recognition algorithm to obtain multiple recognition results will be described in detail in subsequent embodiments, and therefore will not be limited here.

[0049] Step S13: Perform pairwise difference calculations on multiple recognition results to obtain multiple difference calculation results.

[0050] In the above steps, the server performs pairwise difference calculations on multiple recognition results to obtain multiple difference calculation results.

[0051] Specifically, in this technical solution, pairwise differences are calculated for multiple recognition results. First, the sizes of each pair of recognition results are compared. Then, the smaller recognition result is subtracted from the larger one to obtain a difference calculation result. If two recognition results are equal, the difference calculation result is 0.

[0052] Step S14: When the result of each difference calculation is less than or equal to the preset threshold, perform a weighted average calculation on the multiple recognition results to obtain the final statistical result.

[0053] In the above steps, when the server determines that the result of each difference calculation is less than or equal to the preset threshold, it performs a weighted average calculation on multiple recognition results to obtain the final statistical result.

[0054] Specifically, in this technical solution, the preset threshold is preferably 4, but the preset threshold can also be set according to actual conditions. When the server determines that the calculation result of each difference is less than or equal to the preset threshold, it performs a weighted average calculation on multiple recognition results to obtain the final statistical result. If the server determines that any calculation result of a difference is greater than the preset threshold, it means that the preset image recognition algorithm has an error, and the parameters of the preset image recognition algorithm need to be adjusted so that the preset image recognition algorithm can accurately recognize. The step of performing a weighted average calculation on multiple recognition results to obtain the final statistical result will be described in detail in subsequent embodiments, so it will not be elaborated on here.

[0055] For example, in the above example, the server adjusts the distances to 30m, 50m, and 70m. At 30m, the first distance image shows 50 photovoltaic modules; at 50m, the second distance image shows 51; and at 70m, the third distance image shows 52. Since the differences between any two images are less than 4, a weighted average is calculated to obtain the final statistical result. If the third distance image at 70m shows 55 photovoltaic modules, then there is a difference greater than 4. This indicates that the preset image recognition algorithm is inaccurate in recognizing the third distance image taken at 70m from the photovoltaic module area. Therefore, the parameters of the preset image recognition algorithm need to be adjusted to ensure accurate recognition of the third distance image.

[0056] In one possible implementation, refer to Figure 2 This illustrates a second flowchart of a vision-based photovoltaic module statistical method provided in this application embodiment. Step S12 specifically includes steps S121-S126:

[0057] Step S121: Perform weighted processing on multiple distance images to obtain multiple weighted distance images.

[0058] Specifically, in this technical solution, the server performs weighted processing on multiple distance images to obtain multiple weighted distance images. The purpose of weighting multiple distance images is to highlight a certain region in the distance images by emphasizing the pixels in that region, thus facilitating subsequent analysis and processing. Detailed implementation steps will be described in detail in subsequent embodiments, and therefore will not be elaborated upon here.

[0059] Step S122: Perform image enhancement processing on each weighted distance image to obtain multiple enhanced distance images.

[0060] Specifically, in this technical solution, the server performs image enhancement processing on each weighted distance image to obtain multiple enhanced distance images. Performing image enhancement processing on each weighted distance image involves HSV processing. HSV processing refers to converting the color space of pixels in an image or video, converting the RGB (red, green, blue) color space to the HSV (hue, saturation, brightness) color space.

[0061] Step S123: Determine whether the enhanced distance image of each image meets the preset image requirements.

[0062] Specifically, in this technical solution, the server determines whether the distance image after each image enhancement meets preset image requirements. Determining whether the preset image requirements are met means determining whether the H, S, and V values ​​corresponding to the image after HSV processing meet the requirements: H... min <H<H max ,S min <S<S max V min <V<V max If H min <H<H max ,S min <S<S max V min <V<V max This indicates that the enhanced distance image meets the preset image requirements.

[0063] Step S124: If yes, then perform rectangular bounding box detection on each enhanced distance image to obtain the area and number of rectangular bounding boxes.

[0064] Specifically, in this technical solution, when the server determines that the enhanced distance image meets the preset image requirements, it performs rectangular bounding box detection on each enhanced distance image to obtain the areas of multiple rectangular bounding boxes. The rectangular bounding box detection method can utilize contour detection algorithms in image processing (such as the `findContours` function in OpenCV) to detect all contours in the image. Contours that do not meet the requirements are then excluded using certain filtering conditions. For example, the selection can be based on features such as area, aspect ratio, and shape, retaining only contours that meet the conditions. For the retained contours, a rectangle fitting algorithm (such as the `minAreaRect` function in OpenCV) is used to fit a rotating rectangle with the minimum area, which can completely enclose the target object. After rectangular bounding box detection, the areas and number of rectangular bounding boxes corresponding to each enhanced distance image are obtained.

[0065] It should be noted that if the server determines that the distance image after image enhancement does not meet the preset image requirements, the parameters of HSV processing need to be adjusted, and steps S122 and S123 need to be executed again.

[0066] Step S125: Determine whether the area of ​​each rectangular outline is within the preset range corresponding to the current distance.

[0067] Specifically, in this technical solution, the server determines whether the area of ​​each rectangular outline is within the preset range corresponding to the current distance.

[0068] In one possible implementation, before step S125, the method further includes obtaining a preset range corresponding to the current distance; the preset range corresponding to the current distance is obtained by the following method: obtaining the pixel area S of a rectangular region of a single component in the image at the current distance. ground_l ; Get the floating range value 'a'; ; Get the rectangular pixel area S of a single component in the image at the current distance. ground_l Subtracting the floating range value 'a' yields the preset lower limit value corresponding to the current distance, and the pixel area S of the rectangular region of a single component in the image at the current distance is calculated. ground_l Adding the floating range value 'a', we obtain the upper limit of the preset range corresponding to the current distance; the preset range corresponding to the current distance is represented as [S ground_l -a,S ground_l +a].

[0069] Specifically, in this technical solution, before executing the steps of this solution, the technicians will collect a large amount of data on the pixel area S of a rectangular region in the image for a single component at the current distance. ground_l For example, in this solution, technicians will acquire an image of a single photovoltaic module taken by a drone at a vertical distance of 30m from the photovoltaic module area, and obtain the pixel area S of the rectangular region of the single module in the image. ground_30 Then, images of individual photovoltaic modules are captured when the drone is 50m vertically away from the module area, and the pixel area S of the rectangular region of the individual module in the image is obtained. ground_50 .

[0070] Based on extensive experimental data, the floating range value 'a' was determined, with an optimal value of 30. The floating range value 'a' can also be specifically set according to the area of ​​the specific photovoltaic module region.

[0071] Therefore, in step S125, S is used. rect_l Let S represent the area of ​​the rectangular outline at the current distance. Then, when all the areas of the rectangular outlines at the current distance are within the preset range corresponding to the current distance, in the aforementioned example, that is, when S... ground_30 -30≤S rect_30 ≤S ground_30 +30, and S ground_50 -30≤S rect_50 ≤S ground_50 +30, and S ground_70 -30≤S rect_70 ≤S ground_70 At +30

[0072] Step S126: If so, multiple recognition results are obtained based on the number of rectangular outlines corresponding to the distance image after each image enhancement.

[0073] Specifically, in this technical solution, if the server determines that the area of ​​each rectangular outline is within the preset range corresponding to the current distance, then multiple recognition results are obtained based on the number of rectangular outlines detected corresponding to each image-enhanced distance image.

[0074] In one possible implementation, refer to Figure 3 This illustrates the third flowchart of a vision-based photovoltaic module statistical method provided in this application embodiment. Step S121 specifically includes steps S1211-S1218:

[0075] Step S1211: Perform smoothing filtering on each distance image to obtain the first distance image corresponding to each distance image.

[0076] Specifically, in this technical solution, the server performs smoothing filtering on each distance image to obtain a first distance image corresponding to each distance image.

[0077] Specifically, in this technical solution, a first distance image is obtained by smoothing and filtering. Smoothing and filtering the distance image can remove some noise and make it smoother. Commonly used smoothing filters include Gaussian filters and mean filters. The following are the steps for smoothing and filtering the distance image: 1.1. First, obtain the original distance image. 1.2. Select a suitable smoothing filter, such as a Gaussian filter or a mean filter. 1.3. Apply the selected filter to smooth the original distance image to obtain the smoothed distance image, i.e., the first distance image.

[0078] Step S1212: Determine whether the SSIM value corresponding to the first distance image is greater than a preset value.

[0079] Specifically, in this technical solution, SSIM (Structural Similarity Index) is a commonly used index for evaluating image quality, used to compare the similarity between the original image and the processed image. The method for calculating the SSIM value corresponding to the first distance image is not limited in this application. The preset value is preferably 0.9, but the preset value can also be set according to specific circumstances.

[0080] Step S1213: If so, perform gradient histogram calculation on each first distance image to obtain multiple regions of interest.

[0081] Specifically, in this technical solution, if the server determines that the SSIM value corresponding to the first distance image is greater than a preset value, then a gradient histogram is calculated for each first distance image to obtain multiple regions of interest. The gradient histogram calculation to obtain the regions of interest includes, but is not limited to, the following steps: 2.1. First, gradient calculation is performed on the first distance image. A common method is to use the Sobel or Scharr operator to calculate the horizontal and vertical gradients of the image. 2.2. The magnitudes of the horizontal and vertical gradients are combined into a single gradient image, i.e., the magnitude of the gradient is calculated at each pixel location. 2.3. A histogram is calculated on the gradient image. The histogram represents the number of pixels with different gradient magnitudes, thus allowing the identification of the edges or boundaries of the regions of interest. 2.4. The regions of interest are determined based on the peak value or threshold of the histogram.

[0082] It should be noted that if the server determines that the SSIM value corresponding to the first distance image is not greater than the preset value, the parameters of the smoothing filter process need to be adjusted, and steps S1211 and S1212 need to be executed again.

[0083] Step S1214: Determine whether the feature information of the photovoltaic module in each region of interest is empty.

[0084] Specifically, in this technical solution, the server will determine whether the feature information of the photovoltaic module in each region of interest is empty. The purpose of determining whether the feature information of the photovoltaic module in each region of interest is empty is to determine whether the region of interest has been successfully obtained.

[0085] Step S1215: If not, compare each region of interest with the pixels of the distance image corresponding to the region of interest to obtain the pixel factors of multiple regions of interest.

[0086] Specifically, in this technical solution, if the server determines that the feature information of the photovoltaic module in each region of interest is not empty, then the pixels of each region of interest are compared with the pixels of the distance image corresponding to that region of interest to obtain the pixel factors of multiple regions of interest. Comparing the pixels of each region of interest with the pixels of the distance image corresponding to that region of interest to obtain the pixel factors of multiple regions of interest can be achieved by first calculating the average, median, or other statistical characteristics of the pixel values ​​within each region of interest. Then, in the corresponding distance image, the average, median, or other statistical characteristics of the pixel values ​​in the distance image are calculated. The ratio of the two is the pixel factor of the region of interest.

[0087] It should be noted that if the server determines that the feature information of the photovoltaic module in each region of interest is empty, the parameters for the gradient histogram calculation process need to be adjusted, and steps S1213 and S1214 need to be executed again.

[0088] Step S1216: Obtain the true pixel value for each region of interest.

[0089] Specifically, in this technical solution, the server obtains the actual pixel values ​​of each region of interest. That is, it obtains the actual pixel values ​​of the regions that are the same as the region of interest in the original distance image.

[0090] Step S1217: Based on the pixel factor and the true pixel value, calculate the weighted pixel values ​​of multiple regions of interest.

[0091] Specifically, in this technical solution, the server calculates the weighted pixel values ​​of multiple regions of interest based on pixel factors and actual pixel values.

[0092] In one possible implementation, the weighted pixel values ​​of the region of interest are calculated using the following formula:

[0093] pixel image-value =alpha×pixel value

[0094]

[0095] Among them, pixel image-value These are weighted pixel values, where alpha represents the pixel weight and pixel is the pixel weight. value The actual pixel value. factor is the pixel factor.

[0096] Step S1218: Based on the weighted pixel values ​​of multiple regions of interest, the pixels of each region of interest are weighted accordingly to obtain multiple weighted distance images.

[0097] Specifically, in this technical solution, the server, based on the weighted pixel values ​​of multiple regions of interest (ROIs), correspondingly emphasizes the pixels of each ROI, resulting in multiple weighted distance images. This weighting process plays a crucial role in image processing and target recognition, for example, by weighting different target regions to highlight their importance within the overall image.

[0098] In one possible implementation, step S14 specifically includes the following steps:

[0099] The final statistical results are calculated using the following formula:

[0100]

[0101] Where n≥2; N result For the final statistical results; β iis the weight corresponding to the recognition result at the i-th distance, β1 + … + β i + … + β n = 1; N i is the recognition result at the i-th distance.

[0102] Specifically, in this technical solution, assume N1 < N i ≤ N n , then β1 > β i ≥ β n . In the foregoing example, when n is equal to 3, N1 = 30, N2 = 50, N3 = 70, then N1 < N2 < N3, so β1 > β2 > β3, that is, the closer the distance between the drone and the photovoltaic module area is, the greater the weight corresponding to the recognition result. The weight corresponding to the recognition result at the i-th distance needs to be specifically set in combination with the actual situation and is not overly limited in this application.

[0103] Refer to Figure 4 , which shows a schematic structural diagram of a vision-based photovoltaic module statistics system provided by an embodiment of this application. The system includes: an acquisition module 1, an image recognition module 2, and a processing module 3; the acquisition module 1 is used to acquire a set of distance images captured by a drone; the set of distance images includes distance images collected at n different distances, where n is a positive integer greater than or equal to 2; the image recognition module 2 is used to input the set of distance images into a preset image recognition algorithm to obtain multiple recognition results; the recognition result is the number of photovoltaic modules recognized in the distance images collected at different distances; the processing module 3 is used to perform pairwise difference calculations on the multiple recognition results to obtain multiple difference calculation results; the processing module 3 is further used to perform a weighted average calculation on the multiple recognition results when each difference calculation result is less than or equal to a preset threshold to obtain a final statistical result. [[ID=2�]]

[0104] It should be noted that: when the device provided in the above embodiment realizes its functions, only the above-mentioned division of each functional module is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment and will not be elaborated here.

[0105] This application also discloses an electronic device. Refer to Figure 5 [[ID=3󠄀]] Figure 5 is a schematic structural diagram of an electronic device disclosed in an embodiment of this application. The electronic device 500 may include: at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502.

[0106] The communication bus 502 is used to enable communication between these components.

[0107] The user interface 503 may include a display screen and a camera. Optionally, the user interface 503 may also include a standard wired interface and a wireless interface.

[0108] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0109] The processor 501 may include one or more processing cores. The processor 501 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 505, and by calling data stored in memory 505. Optionally, the processor 501 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 501 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 501 and may be implemented as a separate chip.

[0110] The memory 505 may include random access memory (RAM) or read-only memory. Optionally, the memory 505 may include a non-transitory computer-readable storage medium. The memory 505 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 505 may also be at least one storage device located remotely from the aforementioned processor 501. (Refer to...) Figure 5 The memory 505, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and an application program.

[0111] exist Figure 5 In the illustrated electronic device 500, the user interface 503 is mainly used to provide an input interface for the user and to acquire user input data; while the processor 501 can be used to call an application stored in the memory 505. When executed by one or more processors 501, the electronic device 500 performs one or more methods as described in the above embodiments. It should be noted that, for the foregoing method embodiments, for the sake of simplicity, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

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

[0113] In the various embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.

[0114] 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 network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0115] 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.

[0116] 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 device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, 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 memory 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 of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0117] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will readily conceive of those skilled in the art upon consideration of the specification and the disclosure of practical truths.

[0118] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.

Claims

1. A vision-based statistical method for photovoltaic modules, characterized in that, The method includes: Acquire a set of distance images captured by a drone; the set of distance images includes n distance images acquired at different distances, where n is a positive integer greater than or equal to 2; The distance image set is input into a preset image recognition algorithm to obtain multiple recognition results, including: weighting the multiple distance images to obtain multiple weighted distance images, including: performing smoothing filtering on each distance image to obtain a first distance image corresponding to each distance image; determining whether the SSIM value corresponding to the first distance image is greater than a preset value; if so, calculating the gradient histogram for each first distance image to obtain multiple regions of interest; determining whether the feature information of the photovoltaic module in each region of interest is empty; if not, comparing the pixels of each region of interest with the pixels of the distance image corresponding to the region of interest to obtain the pixel factors of multiple regions of interest, wherein... The pixel factor is the ratio of the average pixel value within the region of interest (ROI) to the average pixel value of the corresponding distance image, or the ratio of the median pixel value within the ROI to the median pixel value of the corresponding distance image, or the ratio of other statistical features of the pixel values ​​within the ROI to other statistical features of the pixel values ​​of the corresponding distance image. The true pixel value of each ROI is obtained. Based on the pixel factor and the true pixel value, weighted pixel values ​​for multiple ROIs are calculated. Based on the weighted pixel values ​​of multiple ROIs, the pixels of each ROI are weighted accordingly to obtain multiple weighted distance images. Image enhancement processing is performed on each weighted distance image to obtain multiple enhanced distance images; it is determined whether each enhanced distance image meets preset image requirements; if so, rectangular bounding box detection is performed on each enhanced distance image to obtain multiple rectangular bounding box areas and rectangular bounding box numbers; it is determined whether the area of ​​each rectangular bounding box is within a preset range corresponding to the current distance; if so, multiple recognition results are obtained based on the number of rectangular bounding boxes corresponding to each enhanced distance image; the recognition result is the number of photovoltaic modules identified in the distance images collected at different distances; Perform pairwise difference calculations on multiple recognition results to obtain multiple difference calculation results; When each of the difference calculation results is less than or equal to a preset threshold, a weighted average is calculated on the multiple identification results to obtain the final statistical result.

2. The method according to claim 1, characterized in that, Before determining whether the area of ​​each rectangular outline is within a preset range corresponding to the current distance, the method further includes obtaining the preset range corresponding to the current distance; the preset range corresponding to the current distance is obtained by the following method: Get the pixel area of ​​a rectangular region of a single component in the image at the current distance. ; Get the floating range value 'a'; The pixel area of ​​the rectangular region of the single component in the image at the current distance. Subtracting the floating range value 'a' yields the preset lower limit value corresponding to the current distance, and the pixel area of ​​the rectangular region of a single component in the image at the current distance is then calculated. Adding the floating range value 'a', we obtain the upper limit of the preset range corresponding to the current distance; the preset range corresponding to the current distance is represented as... .

3. The method according to claim 1, characterized in that, The step of calculating weighted pixel values ​​for multiple regions of interest based on the pixel factor and the true pixel value specifically includes: The weighted pixel values ​​of the region of interest are calculated using the following formula: ; in, The weighted pixel value, For pixel weights, The actual value of the pixel. The pixel factor is mentioned.

4. The method according to claim 1, characterized in that, The acquisition of the distance image set captured by the drone specifically includes: Upon receiving a photovoltaic module statistics request, a first control signal is sent to the drone to make the vertical distance between the drone and the photovoltaic module area a first distance. Obtain a first distance image when the vertical distance between the UAV and the photovoltaic module area is a first distance; Send the i-th control signal to the UAV to make the vertical distance between the UAV and the photovoltaic module area the i-th distance; where... ; The image at the i-th distance is obtained when the vertical distance between the UAV and the photovoltaic module area is the i-th distance.

5. A vision-based photovoltaic module statistical system for implementing the method described in any one of claims 1 to 4, characterized in that, The system includes: an acquisition module (1), an image recognition module (2), and a processing module (3); The acquisition module (1) is used to acquire a set of distance images captured by the UAV; the set of distance images includes n distance images acquired at different distances, where n is a positive integer greater than or equal to 2; The image recognition module (2) is used to input the distance image set into a preset image recognition algorithm to obtain multiple recognition results; the recognition result is the number of photovoltaic modules identified in the distance images collected at different distances; The processing module (3) is used to perform pairwise difference calculation on multiple recognition results to obtain multiple difference calculation results; The processing module (3) is also used to perform a weighted average calculation on multiple identification results when each difference calculation result is less than or equal to a preset threshold, so as to obtain the final statistical result.

6. An electronic device, characterized in that, The device includes a processor (501), a memory (505), a user interface (503), and a network interface (504). The memory (505) is used to store instructions. The user interface (503) and the network interface (504) are used to communicate with other devices. The processor (501) is used to execute the instructions stored in the memory (505) to cause the electronic device (500) to perform the method as described in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the steps of the method as described in any one of claims 1-4.