A method, system, device and medium for locating defective photovoltaic panels
By using the defect detection model and the image feature data captured by the drone to calculate the unit pixel distance and offset, the problem of low positioning efficiency of defective photovoltaic panels in photovoltaic power stations is solved, and fast and accurate positioning of defective photovoltaic panels is achieved.
Patent Information
- Application Number
- CN202410657938.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-05-27
AI Technical Summary
In existing photovoltaic power station inspections, the efficiency of rapid and accurate positioning of defective photovoltaic panels is low, and it is difficult to determine the specific location through reference objects.
Use a preset defect detection model to detect defects in images captured by drones, extract the feature data of the image, including resolution, longitude, latitude, and height, calculate the unit pixel distance, determine the longitude and latitude of the defective pixel, and use the UTM projection coordinate system and Offset calculation to accurately locate defective photovoltaic panels.
It achieves rapid and accurate positioning of defective photovoltaic panels and improves inspection efficiency and accuracy.
Smart Images

Figure CN118261067B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and more specifically, to a method, system, device and medium for locating a defective photovoltaic panel. Background Art
[0002] After a photovoltaic power station has been running for a period of time, the power generation will decrease due to problems with the photovoltaic panels themselves or other problems, so it is necessary to inspect the photovoltaic panels to find defective photovoltaic panels. Currently, the most efficient inspection method is to use drones to take infrared and visible light inspections. However, since there are no obvious reference objects in the photos taken during the inspection, most of the photos are similar, so it is difficult to determine the specific location through reference objects. In other words, how to quickly and accurately obtain the geographical location of abnormal photovoltaic panels is a technical problem that needs to be solved urgently. Summary of the invention
[0003] The purpose of the present application is to provide a method, system, device and medium for locating a defective photovoltaic panel, which can quickly and accurately locate the geographical location of a defective photovoltaic panel in a photovoltaic station.
[0004] This application is implemented as follows:
[0005] In a first aspect, the present application provides a method for locating a defective photovoltaic panel, comprising the following steps:
[0006] The pre-detection image is subjected to defect detection using a preset defect detection model to determine the defect pixel coordinates according to the defect detection results; the defect pixel coordinates are the pixel coordinates of the defect pixel in the pre-detection image, and the pre-detection image is an image including the target photovoltaic panel taken by a drone. Feature data of the pre-detection image is extracted; the feature data includes the resolution of the pre-detection image, the longitude and latitude corresponding to the central pixel point, and the height of the drone relative to the ground. The unit pixel distance is obtained according to the focal length and imaging pixel spacing of the drone's camera, and the height of the drone relative to the ground; the unit pixel distance is the distance between adjacent unit pixel points of the pre-detection image. The longitude and latitude of the defect pixel are determined according to the unit pixel distance, the defect pixel coordinates, the resolution of the pre-detection image, and the longitude and latitude corresponding to the central pixel point.
[0007] Further, based on the above scheme, the step of determining the longitude and latitude of the defective pixel according to the unit pixel distance, the defective pixel coordinates, the resolution of the pre-detection image and the longitude and latitude corresponding to the central pixel point includes:
[0008] The longitude and latitude corresponding to the center pixel point are converted into the UTM projection coordinate system to obtain the corresponding center pixel point projection coordinates; the coordinates of the defective pixel in the UTM projection coordinate system are determined according to the unit pixel distance, the defective pixel coordinates, the resolution of the pre-detection image and the center pixel point projection coordinates.
[0009] Furthermore, based on the aforementioned scheme, the above method also includes: calculating the offset of the coordinates of the defective pixel in the UTM projection coordinate system according to the nose orientation information and the gimbal orientation information when the drone takes the pre-detection image, so as to obtain the offset coordinates.
[0010] Further, based on the above scheme, the calculation formula for the step of obtaining the unit pixel distance according to the focal length and imaging pixel spacing of the drone's camera and the height of the drone relative to the ground includes: , where ratio is the unit pixel distance, f is the focal length of the drone's camera, PixelSpacing is the imaging pixel spacing of the drone's camera, and RelativeAltitude is the height of the drone relative to the ground.
[0011] Further, based on the above scheme, the calculation formula of the step of determining the longitude and latitude of the defective pixel according to the unit pixel distance, the defective pixel coordinates, the resolution of the pre-detection image and the longitude and latitude corresponding to the central pixel point includes:
[0012] meter_target_X = LRFTargetLon - (x / 2-defect_x) × ratio
[0013] meter_target_Y = LRFTargetLat - (y / 2-defect_y) × ratio
[0014] Among them, meter_target_X and meter_target_Y are the longitude and latitude values of the defective pixel, x and y are the horizontal resolution and vertical resolution of the pre-detection image, (LRFTargetLon, LRFTargetLat) are the longitude and latitude corresponding to the center pixel, ratio is the unit pixel distance, defect_x and defect_y are the horizontal and vertical coordinate values of the defective pixel coordinates, respectively.
[0015] Further, based on the above scheme, the calculation formula of the step of determining the coordinates of the defective pixel in the UTM projection coordinate system according to the unit pixel distance, the defective pixel coordinates, the resolution of the pre-detection image and the projection coordinates of the central pixel point includes:
[0016] meter_target_x = meter_X - (x / 2-defect_x) × ratio
[0017] meter_target_y = meter_Y - (y / 2-defect_y) × ratio
[0018] Among them, meter_target_x and meter_target_y are the horizontal and vertical coordinate values of the defective pixel in the utm projection coordinate system, x and y are the horizontal resolution and vertical resolution of the pre-detection image, meter_X and meter_Y are the horizontal and vertical coordinate values of the projection coordinates of the center pixel point, ratio is the unit pixel distance, defect_x and defect_y are the horizontal and vertical coordinate values of the defective pixel coordinates.
[0019] Further, based on the above scheme, the calculation formula of the step of calculating the offset of the coordinates of the defective pixel in the UTM projection coordinate system according to the nose orientation information and the gimbal orientation information when the drone shoots the pre-detection image to obtain the offset coordinates includes:
[0020] x_rotated = (meter_target_x - meter_X) × cos (angle_rad) - (meter_target_y - meter_Y) × sin (angle_rad) + meter_X
[0021] y_rotated = (meter_target_y - meter_Y) × cos (angle_rad) - (meter_target_y - meter_Y) × sin (angle_rad) + meter_Y
[0022] in, , FlightYawDegree is the nose heading information, GimbalYawDegree is the gimbal heading information, (x_rotated, y_rotated) is the offset coordinates obtained by calculating the offset of the defective pixel in the utm projection coordinate system.
[0023] In a second aspect, the present application provides a defective photovoltaic panel positioning system, which includes:
[0024] The defective pixel determination module is configured to: perform defect detection on the pre-detection image using a preset defect detection model to determine the defective pixel coordinates according to the defect detection results; the defective pixel coordinates are the pixel coordinates of the defective pixel in the pre-detection image, and the pre-detection image is an image including the target photovoltaic panel taken by a drone. The feature data extraction module is configured to: extract feature data of the pre-detection image; the feature data includes the resolution of the pre-detection image, the longitude and latitude corresponding to the central pixel point, and the height of the drone relative to the ground. The unit pixel distance acquisition module is configured to: obtain the unit pixel distance according to the focal length and imaging pixel spacing of the drone's camera, and the height of the drone relative to the ground; the unit pixel distance is the distance between adjacent unit pixel points of the pre-detection image. The geographic coordinate determination module is configured to: determine the longitude and latitude of the defective pixel according to the unit pixel distance, the defective pixel coordinates, the resolution of the pre-detection image, and the longitude and latitude corresponding to the central pixel point.
[0025] In a third aspect, the present application provides an electronic device, comprising a memory for storing one or more programs; a processor; when the one or more programs are executed by the processor, a method as described in any one of the first aspects is implemented.
[0026] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method as described in any one of the above-mentioned first aspects.
[0027] Compared with the prior art, the present invention has at least the following advantages or beneficial effects:
[0028] The present application proposes a method for locating a defective photovoltaic panel, which uses a defect detection model to identify defective pixels in a pre-detection image that can characterize a defective photovoltaic panel, thereby obtaining the defective pixel coordinates. Next, the relative position relationship between the defective pixel coordinates and the central pixel point of the pre-detection image is determined based on the defective pixel coordinates, and based on the relative position relationship, the longitude and latitude corresponding to the central pixel point of the pre-detection image are used for corresponding conversion to obtain the longitude and latitude corresponding to the defective pixel, thereby achieving fast and accurate positioning of the defective photovoltaic panel. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1This is a flow chart of an embodiment of a method for locating a defective photovoltaic panel of the present application;
[0031] Figure 2 This is a schematic diagram of camera imaging in an embodiment of the present application;
[0032] Figure 3 This is a schematic diagram of the rotation angle in the embodiment of the present application;
[0033] Figure 4 This is a structural block diagram of an embodiment of a defective photovoltaic panel positioning system of the present application;
[0034] Figure 5 A structural block diagram of an electronic device provided in an embodiment of the present application.
[0035] Icon: 101, defective pixel determination module; 102, feature data extraction module; 103, unit pixel distance acquisition module; 104, geographic coordinate determination module; 201, processor; 202, memory; 203, communication interface. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. In addition, the naming or numbering of the steps in the present application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.
[0037] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0038] Example 1
[0039] The embodiment of the present application provides a method for locating a defective photovoltaic panel, which can quickly and accurately locate the geographical location of a defective photovoltaic panel in a photovoltaic station.
[0040] See also Figure 1 , the method for locating a defective photovoltaic panel comprises the following steps:
[0041] Step S101: perform defect detection on a pre-detection image using a preset defect detection model to determine defect pixel coordinates based on the defect detection results; the defect pixel coordinates are the pixel coordinates of the defect pixel in the pre-detection image, and the pre-detection image is an image including a target photovoltaic panel taken by a drone.
[0042] In the specific implementation of this application, a drone can be used to take photos of all photovoltaic panels within the scope of a photovoltaic station, and the taken images can be annotated to mark the pixel coordinates of photovoltaic panel defects in the images, and saved as a training set for training defect detection models. Since the image is taken according to the target photovoltaic station, it is more targeted than other collected photos of defective photovoltaic panels and can better reflect the defects in the photovoltaic station.
[0043] Considering that the images obtained by the drone taking pictures of all the photovoltaic panels within the photovoltaic station may have some non-standard characteristics, such as the photovoltaic panels in the image are tilted, the image has black edges, etc. In order to further improve the training speed and accuracy of the defect detection model, in some implementations of the present application, the captured images can be pre-processed before being used to train the defect detection model. For example, the photovoltaic panels in the image are straightened, and / or the black edges in the image are cropped.
[0044] It should be noted that, in the specific implementation of the present application, other photos including defective photovoltaic panels can also be obtained, and then a defect detection model can be trained based on the photos, so that the defect detection model can more comprehensively detect defects in photovoltaic panels.
[0045] Please continue reading Figure 1 , step S102: extracting feature data of the pre-detection image; the feature data includes the resolution of the pre-detection image, the longitude and latitude corresponding to the central pixel point, and the height of the drone relative to the ground;
[0046] Step S103: according to the focal length and imaging pixel spacing of the drone's camera and the height of the drone relative to the ground, the unit pixel distance is obtained; the unit pixel distance is the distance between adjacent unit pixel points of the pre-detection image.
[0047] like Figure 2 As shown, it can be seen that there is a similar triangle relationship between the camera sensor and the imaged photo. Therefore, through calculation through the similar triangle relationship, when the pixel spacing and focal length of the camera, as well as the height of the drone relative to the ground are known, the unit pixel distance can be obtained by solving the corresponding relationship.
[0048] In steps S102 and S103, by querying the fixed internal parameters of the camera carried by the drone, the focal length and imaging pixel spacing of the drone's camera can be obtained; and by performing feature extraction on the pre-detection image through the corresponding pre-processing tool, the resolution of the pre-detection image, the longitude and latitude corresponding to the center pixel point, and the height of the drone relative to the ground can be extracted. It should be noted that how to query the fixed internal parameters of the camera carried by the drone and extract the feature data of the pre-detection image belongs to the prior art and will not be repeated here. Among them, the longitude and latitude corresponding to the center pixel point is the GPS longitude and latitude data contained in the directly extracted image. In addition, for steps S102 and S103, they can be performed simultaneously or separately. If performed separately, the execution order of steps S102 and S103 is not limited.
[0049] Based on the above scheme, in one implementation of the present application, the calculation formula for the step of obtaining the unit pixel distance according to the focal length and imaging pixel spacing of the drone's camera and the height of the drone relative to the ground includes: , where ratio is the unit pixel distance, f is the focal length of the drone's camera, PixelSpacing is the imaging pixel spacing of the drone's camera, and RelativeAltitude is the height of the drone relative to the ground.
[0050] Please continue reading Figure 1 , step S104: determining the longitude and latitude of the defective pixel according to the unit pixel distance, the defective pixel coordinates, the resolution of the pre-detection image and the longitude and latitude corresponding to the central pixel point.
[0051] Assuming that the resolution of the pre-detection image is (x, y), that is, the horizontal resolution of the pre-detection image is x, and the vertical resolution is y, the pixel coordinates of the center point of the pre-detection image are (x / 2, y / 2). Therefore, according to the unit pixel distance, the defective pixel coordinates and the resolution of the pre-detection image, the positional relationship between the defective pixel and the center point of the pre-detection image can be calculated, and then the longitude and latitude corresponding to the center pixel point can be converted accordingly based on the positional relationship to obtain the longitude and latitude of the defective pixel, thereby locating the geographical location of the defective photovoltaic panel in the photovoltaic field.
[0052] Based on the above scheme, in an implementation of the present application, the calculation formula of the step of determining the longitude and latitude of the defective pixel according to the unit pixel distance, the defective pixel coordinates, the resolution of the pre-detection image, and the longitude and latitude corresponding to the central pixel point includes:
[0053] meter_target_X = LRFTargetLon - (x / 2-defect_x) × ratio
[0054] meter_target_Y = LRFTargetLat - (y / 2-defect_y) × ratio
[0055] Among them, meter_target_X and meter_target_Y are the longitude and latitude values of the defective pixel, x and y are the horizontal resolution and vertical resolution of the pre-detection image, (LRFTargetLon, LRFTargetLat) are the longitude and latitude corresponding to the center pixel, ratio is the unit pixel distance, defect_x and defect_y are the horizontal and vertical coordinate values of the defective pixel coordinates, respectively.
[0056] In order to improve the accuracy of the longitude and latitude of the defective pixel, the longitude and latitude corresponding to the central pixel point can be converted into the UTM projection coordinate system first, and then the longitude and latitude of the defective pixel can be determined. That is to say, in an implementation of the present application, the step of determining the longitude and latitude of the defective pixel according to the unit pixel distance, the defective pixel coordinates, the resolution of the pre-detection image and the longitude and latitude corresponding to the central pixel point includes:
[0057] Convert the longitude and latitude corresponding to the central pixel point into the UTM projection coordinate system to obtain the corresponding projection coordinates of the central pixel point;
[0058] The coordinates of the defective pixel in the UTM projection coordinate system are determined according to the unit pixel distance, the defective pixel coordinates, the resolution of the pre-detection image and the projection coordinates of the central pixel point.
[0059] In the above implementation, by converting the longitude and latitude corresponding to the central pixel point into the utm projection coordinate system, the wgs84 coordinates corresponding to the central pixel point can be converted into higher-precision utm projection coordinates, which can improve the accuracy of the calculation (that is, the longitude and latitude of the defective pixel that can be obtained later will be more accurate). Assuming that the longitude and latitude corresponding to the central pixel point extracted by the preprocessing tool are (LRFTargetLon, LRFTargetLat), the coordinates of the defective pixel in the utm projection coordinate system are (meter_X, meter_Y), that is, meter_X = utm (LRFTargetLon), meter_Y = utm (LRFTargetLat).
[0060] Correspondingly, on the basis of converting the longitude and latitude corresponding to the central pixel point into the UTM projection coordinate system, the calculation formula of the step of determining the coordinates of the defective pixel in the UTM projection coordinate system according to the unit pixel distance, the defective pixel coordinates, the resolution of the pre-detection image and the central pixel point projection coordinates includes:
[0061] meter_target_x = meter_X - (x / 2-defect_x) × ratio
[0062] meter_target_y = meter_Y - (y / 2-defect_y) × ratio
[0063] Among them, meter_target_x and meter_target_y are the horizontal and vertical coordinate values of the defective pixel in the utm projection coordinate system, x and y are the horizontal resolution and vertical resolution of the pre-detection image, meter_X and meter_Y are the horizontal and vertical coordinate values of the projection coordinates of the center pixel point, ratio is the unit pixel distance, defect_x and defect_y are the horizontal and vertical coordinate values of the defective pixel coordinates.
[0064] like Figure 3 As shown, when using a drone to take pictures, the camera gimbal of the drone has offsets in three directions, namely yaw (heading offset), pitch (pitch offset) and roll (roll offset). For this application, the parameters that have an impact include the nose orientation information (FlightYawDegree) and the gimbal orientation information (GimbalYawDegree), so it is necessary to calculate the offset of the shooting direction in the yaw direction. That is to say, based on the aforementioned scheme, in one implementation of the present application, the method further includes: according to the nose orientation information and the gimbal orientation information when the drone takes the pre-detection image, the coordinates of the defective pixel in the utm projection coordinate system are calculated to obtain the offset coordinates. Thereby, the accuracy of the longitude and latitude of the determined defective pixel can be further improved.
[0065] On the basis of considering the offset in the yaw direction, in one implementation of the present application, the calculation formula of the step of calculating the offset of the coordinates of the defective pixel in the UTM projection coordinate system according to the nose orientation information and the gimbal orientation information when the drone shoots the pre-detection image to obtain the offset coordinates includes:
[0066] x_rotated = (meter_target_x - meter_X) × cos (angle_rad) - (meter_target_y - meter_Y) × sin (angle_rad) + meter_X
[0067] y_rotated = (meter_target_y - meter_Y) × cos (angle_rad) - (meter_target_y - meter_Y) × sin (angle_rad) + meter_Y
[0068] in, , FlightYawDegree is the nose heading information, GimbalYawDegree is the gimbal heading information, (x_rotated, y_rotated) is the offset coordinates obtained by calculating the offset of the defective pixel in the utm projection coordinate system.
[0069] It should be noted that if there is an offset in the yaw direction when the drone takes pictures, the offset calculation can be performed in the yaw direction through the above implementation method to obtain the offset coordinates. However, if the offset in the yaw direction when the drone takes pictures can be ignored, the offset calculation can be omitted, and the coordinates of the defective pixel in the utm projection coordinate system can be directly determined, and then converted to the corresponding wgs84 longitude and latitude, thereby obtaining the geographic location longitude and latitude (defect_lon, defect_lat) of the defective photovoltaic panel. The conversion process is: defect_lon = wgs84(x_rotated), defect_lat=wgs84(y_rotated).
[0070] Example 2
[0071] See also Figure 4 , the embodiment of the present application provides a defective photovoltaic panel positioning system, which includes:
[0072] The defective pixel determination module 101 is configured to: perform defect detection on the pre-detection image using a preset defect detection model to determine the defective pixel coordinates according to the defect detection results; the defective pixel coordinates are the pixel coordinates of the defective pixel in the pre-detection image, and the pre-detection image is an image including the target photovoltaic panel taken by a drone. The feature data extraction module 102 is configured to: extract feature data of the pre-detection image; the feature data includes the resolution of the pre-detection image, the longitude and latitude corresponding to the central pixel point, and the height of the drone relative to the ground. The unit pixel distance acquisition module 103 is configured to: obtain the unit pixel distance according to the focal length and imaging pixel spacing of the drone camera, and the height of the drone relative to the ground; the unit pixel distance is the distance between adjacent unit pixel points of the pre-detection image. The geographic coordinate determination module 104 is configured to: determine the longitude and latitude of the defective pixel according to the unit pixel distance, the defective pixel coordinates, the resolution of the pre-detection image, and the longitude and latitude corresponding to the central pixel point.
[0073] For the specific implementation process of the above system, please refer to the method for locating a defective photovoltaic panel provided in Example 1, which will not be described in detail here.
[0074] Example 3
[0075] See also Figure 5 , the embodiment of the present application provides an electronic device, which includes at least one processor 201 and at least one memory 202; wherein the processor 201 and the memory 202 are directly connected to each other, or communicate with each other through a communication interface 203, or are electrically connected through one or more communication buses or signal lines to achieve data transmission or interaction; the memory 202 stores program instructions that can be executed by the processor 201, and the processor 201 calls the program instructions to execute a defective photovoltaic panel positioning method. For example, the following is implemented:
[0076] The pre-detection image is subjected to defect detection using a preset defect detection model to determine the defect pixel coordinates according to the defect detection results; the defect pixel coordinates are the pixel coordinates of the defect pixel in the pre-detection image, and the pre-detection image is an image including the target photovoltaic panel taken by a drone. Feature data of the pre-detection image is extracted; the feature data includes the resolution of the pre-detection image, the longitude and latitude corresponding to the central pixel point, and the height of the drone relative to the ground. The unit pixel distance is obtained according to the focal length and imaging pixel spacing of the drone's camera, and the height of the drone relative to the ground; the unit pixel distance is the distance between adjacent unit pixel points of the pre-detection image. The longitude and latitude of the defect pixel are determined according to the unit pixel distance, the defect pixel coordinates, the resolution of the pre-detection image, and the longitude and latitude corresponding to the central pixel point.
[0077] Among them, the memory 202 can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc.
[0078] The processor 201 may be an integrated circuit chip with signal processing capability. The processor 201 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0079] Understandably, Figure 5 The structure shown is for illustration only. The electronic device may also include Figure 5 More or fewer components as shown, or with Figure 5 Different configurations are shown. Figure 5 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0080] Example 4
[0081] The present application provides a computer-readable storage medium having a computer program stored thereon, which implements a method for locating a defective photovoltaic panel when executed by a processor 201. For example, the method implements:
[0082] The pre-detection image is subjected to defect detection using a preset defect detection model to determine the defect pixel coordinates according to the defect detection results; the defect pixel coordinates are the pixel coordinates of the defect pixel in the pre-detection image, and the pre-detection image is an image including the target photovoltaic panel taken by a drone. Feature data of the pre-detection image is extracted; the feature data includes the resolution of the pre-detection image, the longitude and latitude corresponding to the central pixel point, and the height of the drone relative to the ground. The unit pixel distance is obtained according to the focal length and imaging pixel spacing of the drone's camera, and the height of the drone relative to the ground; the unit pixel distance is the distance between adjacent unit pixel points of the pre-detection image. The longitude and latitude of the defect pixel are determined according to the unit pixel distance, the defect pixel coordinates, the resolution of the pre-detection image, and the longitude and latitude corresponding to the central pixel point.
[0083] If the above functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0084] It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, and that the present application can be implemented in other specific forms without departing from the spirit or essential features of the present application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present application. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A method for locating a defective photovoltaic panel, characterized in that: The following steps are involved: Performing defect detection on the pre-detection image using a preset defect detection model to determine defect pixel coordinates according to the defect detection result; The defective pixel coordinates are pixel coordinates of the defective pixel in a pre-detection image, and the pre-detection image is an image including a target photovoltaic panel taken by a drone; Extracting feature data of the pre-detection image; the feature data includes the resolution of the pre-detection image, the longitude and latitude corresponding to the central pixel point, and the height of the drone relative to the ground; According to the focal length and imaging pixel spacing of the camera of the drone, and the height of the drone relative to the ground, a unit pixel distance is obtained; the unit pixel distance is the distance between adjacent unit pixel points of the pre-detection image; According to the unit pixel distance, the defective pixel coordinates and the resolution of the pre-detection image, the positional relationship between the defective pixel and the center point of the pre-detection image is calculated, and then the longitude and latitude corresponding to the center pixel are converted according to the positional relationship to obtain the longitude and latitude of the defective pixel. The calculation formulas include: meter_target_X=LRFTargetLon-(x / 2-defect_x)×ratio, meter_target_Y=LRFTargetLat-(y / 2-defect_y)×ratio, wherein meter_target_X and meter_target_Y are the longitude and latitude values of the defective pixel, x and y are the horizontal resolution and vertical resolution of the pre-detection image, (LRFTargetLon, LRFTargetLat) are the longitude and latitude corresponding to the center pixel, ratio is the unit pixel distance, defect_x and defect_y are the horizontal and vertical coordinate values of the defective pixel coordinates, respectively.
2. A method for locating a defective photovoltaic panel according to claim 1, characterized in that: The step of calculating the positional relationship between the defective pixel and the center point of the pre-detection image according to the unit pixel distance, the defective pixel coordinates and the resolution of the pre-detection image, and converting the longitude and latitude corresponding to the center pixel according to the positional relationship to obtain the longitude and latitude of the defective pixel includes: Convert the longitude and latitude corresponding to the central pixel point into the UTM projection coordinate system to obtain the corresponding projection coordinates of the central pixel point; The coordinates of the defective pixel in the UTM projection coordinate system are determined according to the unit pixel distance, the defective pixel coordinates, the resolution of the pre-detection image and the projection coordinates of the central pixel point.
3. A method for locating a defective photovoltaic panel as claimed in claim 2, characterized in that: The method further comprises: According to the nose orientation information and the gimbal orientation information of the UAV when shooting the pre-detection image, the coordinates of the defective pixels in the UTM projection coordinate system are offset calculated to obtain the offset coordinates.
4. A method for locating a defective photovoltaic panel as claimed in claim 1 or 2, characterized in that: The calculation formula for obtaining the unit pixel distance according to the focal length and imaging pixel spacing of the camera of the drone and the height of the drone relative to the ground includes: Where ratio is the unit pixel distance, f is the focal length of the drone's camera, PixelSpacing is the imaging pixel spacing of the drone's camera, and RelativeAltitude is the height of the drone relative to the ground.
5. A method for locating a defective photovoltaic panel as claimed in claim 2, characterized in that: The calculation formula of the step of determining the coordinates of the defective pixel in the UTM projection coordinate system according to the unit pixel distance, the defective pixel coordinates, the resolution of the pre-detection image and the projection coordinates of the central pixel point is include: meter_target_x=meter_X-(x / 2-defect_x)×ratio meter_target_y=meter_Y-(y / 2-defect_y)×ratio Among them, meter_target_x and meter_target_y are the horizontal and vertical coordinate values of the defective pixel in the utm projection coordinate system, x and y are the horizontal resolution and vertical resolution of the pre-detection image, meter_X and meter_Y are the horizontal and vertical coordinate values of the projection coordinates of the center pixel point, ratio is the unit pixel distance, defect_x and defect_y are the horizontal and vertical coordinate values of the defective pixel coordinates.
6. A method for locating a defective photovoltaic panel as claimed in claim 3, characterized in that: The calculation formula of the step of calculating the offset of the coordinates of the defective pixel in the UTM projection coordinate system according to the nose orientation information and the gimbal orientation information when the drone shoots the pre-detection image to obtain the offset coordinates includes: x_rotated=(meter_target_x-meter_X)×cos(angle_rad)-(meter_target_y-meter_Y)×sin(angle_rad)+meter_X y_rotated=(meter_target_y-meter_Y)×cos(angle_rad)-(meter_target_y-meter_Y)×sin(angle_rad)+meter_Y in, meter_target_x and meter_target_y are the horizontal and vertical coordinate values of the defective pixel in the utm projection coordinate system, respectively. x and y are the horizontal resolution and vertical resolution of the pre-detection image, respectively. meter_X and meter_Y are the horizontal and vertical coordinate values of the projection coordinates of the center pixel, respectively. FlightYawDegree is the nose orientation information, GimbalYawDegree is the gimbal orientation information, and (x_rotated, y_rotated) is the offset coordinate obtained by calculating the offset of the coordinates of the defective pixel in the utm projection coordinate system.
7. A defective photovoltaic panel positioning system, characterized in that: include: The defective pixel determination module is configured to: perform defect detection on the pre-detection image using a preset defect detection model to determine the defective pixel coordinates according to the defect detection result; The defective pixel coordinates are pixel coordinates of the defective pixel in a pre-detection image, and the pre-detection image is an image including a target photovoltaic panel taken by a drone; The feature data extraction module is configured to: extract feature data of the pre-detection image; the feature data includes the resolution of the pre-detection image, the longitude and latitude corresponding to the central pixel point, and the height of the drone relative to the ground; The unit pixel distance acquisition module is configured to: obtain the unit pixel distance according to the focal length and imaging pixel spacing of the camera of the drone, and the height of the drone relative to the ground; the unit pixel distance is the distance between adjacent unit pixel points of the pre-detection image; The geographic coordinate determination module is configured to calculate the positional relationship between the defective pixel and the center point of the pre-detection image according to the unit pixel distance, the defective pixel coordinates and the resolution of the pre-detection image, thereby converting the longitude and latitude corresponding to the center pixel point according to the positional relationship to obtain the longitude and latitude of the defective pixel. The calculation formula includes: meter_target_X=LRFTargetLon-(x / 2-defect_x)×ratio, meter_target_Y=LRFTargetLat-(y / 2-defect_y)×ratio, wherein meter_target_X and meter_target_Y are the longitude and latitude values of the defective pixel, respectively, x and y are the horizontal resolution and vertical resolution of the pre-detection image, respectively, (LRFTargetLon, LRFTargetLat) are the longitude and latitude corresponding to the center pixel point, ratio is the unit pixel distance, defect_x and defect_y are the horizontal and vertical coordinate values of the defective pixel coordinates, respectively.
8. An electronic device, characterized in that: include: A memory for storing one or more programs; processor; When the one or more programs are executed by the processor, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
