A method for adjusting the moving direction of photovoltaic module inspection equipment, electronic equipment and storage medium
Through computer vision technology, the photovoltaic module inspection equipment automatically adjusts the movement direction and drives in a straight line along the photovoltaic module lines, solving the problems of difficult manual control and unstable driving trajectory, and achieving larger area automatic inspection.
Patent Information
- Application Number
- CN202411062435.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-08-05
AI Technical Summary
The existing photovoltaic module inspection equipment requires manual remote control to control the movement direction, which makes the operation difficult and the driving trajectory unstable, and the automatic straight-line driving cannot be achieved, which limits the patrol area.
Using a computer vision-based method, the image of the photovoltaic module is collected through the image acquisition device, the pattern information is obtained, the angle between the actual reference line and the reference line is determined, the offset angle is calculated, and the equipment moves automatically is adjusted so that the equipment can be along the photovoltaic module. Driving in a straight line.
It realizes automatic straight-line driving of photovoltaic module inspection equipment without manual control, saves labor costs and expands the inspection area.
Smart Images

Figure CN118567367B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of visual technology, and in particular to a method for adjusting the moving direction of photovoltaic component inspection equipment, an electronic device, and a storage medium. Background Art
[0002] The photovoltaic module inspection equipment collects images of the photovoltaic modules while traveling in the area of the photovoltaic modules. In daily inspections, the existing photovoltaic module inspection equipment usually controls the direction of movement through manual remote control. However, manual control of the photovoltaic module inspection equipment is not only labor-intensive, but also difficult to operate. It is impossible to ensure that the driving trajectory of the photovoltaic module inspection equipment is stable, resulting in a limited inspection area.
[0003] Therefore, how to automatically adjust the moving direction of the photovoltaic module inspection equipment so that the photovoltaic module inspection equipment can automatically cruise and drive in a straight line has become an urgent problem to be solved in this field. Summary of the invention
[0004] In response to the above-mentioned technical problems, the present application provides a method for adjusting the moving direction of photovoltaic module inspection equipment and an electronic device, which analyzes the surrounding environment of the equipment based on computer vision, so that the photovoltaic module inspection equipment can automatically move in a straight line based on the texture of the photovoltaic module. There is no need for manual control of the moving direction, which saves labor costs and is conducive to maximizing the inspection area.
[0005] In order to solve the above technical problems, the present application provides a method for adjusting the moving direction of a photovoltaic module inspection device, wherein the photovoltaic module inspection device is provided with an image acquisition device, and the image acquisition device is used to acquire an image in front of the photovoltaic module inspection device. The method comprises the following steps:
[0006] During the movement of the photovoltaic module inspection device, acquiring the image captured by the image acquisition device;
[0007] Acquiring texture information of the photovoltaic module in the image;
[0008] Determining at least one actual reference line in a preset direction in the image according to the texture information;
[0009] Determine an angle between the at least one actual reference line and at least one reference reference line corresponding to the image, wherein the at least one reference reference line is determined according to installation parameters of the image acquisition device; wherein the number and position of the reference reference lines in the image are set according to the size of the photovoltaic module, and the reference reference line is a virtual reference line;
[0010] Performing weighted calculation on the included angle to obtain an offset angle;
[0011] Adjusting the moving direction of the photovoltaic module inspection device according to the offset angle;
[0012] The step of determining at least one actual reference line in a preset direction in the image according to the texture information includes:
[0013] Extracting a plurality of straight lines corresponding to the image according to the texture information, wherein the plurality of straight lines include straight lines in a preset direction and straight lines perpendicular to the preset direction, and the preset direction refers to a direction parallel to a moving direction of the device;
[0014] Selecting a plurality of straight lines in a preset direction from among the plurality of straight lines;
[0015] Screening out, from among the plurality of straight lines in the preset direction, straight lines whose length is greater than a preset length threshold and whose lower endpoints are located in the region of the image;
[0016] If the number of the screened straight lines is greater than one, the adjacent straight lines are merged and averaged to obtain the at least one actual reference line;
[0017] If the number of the screened straight lines is equal to one, the screened straight line is used as the at least one actual reference line;
[0018] The offset angle is calculated using the following formula:
[0019]
[0020] Where n is the number of actual reference lines, x i is the coordinate of the lower endpoint of the ith actual reference line, W m is the coordinate of the midpoint of the image, and α is the angle between the ith actual reference line and the corresponding baseline reference line.
[0021] In some embodiments, the obtaining of texture information of the photovoltaic module in the image includes:
[0022] Convert the image into an HSV image;
[0023] Generate a mask image according to the HSV image;
[0024] The edge sharpness information of the mask image is extracted to obtain the texture information of the photovoltaic module in the image.
[0025] In some embodiments, determining at least one actual reference line in a preset direction in the image according to the texture information includes:
[0026] Extracting a plurality of straight lines corresponding to the image according to the texture information, wherein the plurality of straight lines include straight lines in a preset direction and straight lines perpendicular to the preset direction;
[0027] The plurality of straight lines are screened, and at least one straight line in a preset direction is determined among the plurality of straight lines as the at least one actual reference line.
[0028] In some embodiments, determining the angle between the at least one actual reference line and the at least one baseline reference line corresponding to the image includes:
[0029] According to the coordinates of the lower endpoints of the at least one actual reference line, matching the reference reference lines corresponding to the actual reference lines one by one to form at least one group of combinations of the actual reference lines and the reference reference lines;
[0030] The angle between the actual reference line and the reference reference line in each group of actual reference lines and reference reference lines is calculated.
[0031] The present application also provides a photovoltaic component inspection device, characterized in that it includes an image acquisition device and a controller, the image acquisition device is used to acquire images in front of the photovoltaic component inspection device, and the controller is configured to execute the steps of the method described above.
[0032] The present application provides an electronic device, including a storage medium and a controller, wherein a computer program is stored on the storage medium, and when the computer program is executed by the controller, the steps of the method described above are implemented.
[0033] The present application provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method described above are implemented.
[0034] The present application discloses a method for adjusting the moving direction of a photovoltaic component inspection device and an electronic device, the method comprising: obtaining an image captured by an image acquisition device during the movement of the photovoltaic component inspection device; obtaining grain information of the photovoltaic component in the image; determining at least one actual reference line in a preset direction in the image based on the grain information; determining the angle between at least one actual reference line and at least one reference reference line corresponding to the image, wherein the at least one reference reference line is determined based on the installation parameters of the image acquisition device; and adjusting the moving direction of the photovoltaic component inspection device based on the angle. The present application analyzes the surrounding environment of the equipment based on computer vision, so that the photovoltaic component inspection equipment can automatically drive in a straight line based on the grain of the photovoltaic component, without the need for manual control of the moving direction, thus saving labor costs and facilitating maximization of the inspection area. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a flow chart of a method for adjusting the moving direction of photovoltaic component inspection equipment according to an embodiment.
[0036] Figure 2 It is a schematic diagram of a working scenario of a photovoltaic component inspection device according to an embodiment.
[0037] Figure 3 is a schematic diagram showing the relationship between an actual reference line and a baseline reference line according to an embodiment.
[0038] Figure 4 The figure is a schematic diagram of the structure of a photovoltaic module inspection device according to an embodiment. DETAILED DESCRIPTION
[0039] In order to facilitate the understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present application are given in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thoroughly and comprehensively understood.
[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used herein includes any and all combinations of one or more related listed items. In this application, "each" includes one and more than two quantities.
[0041] Figure 1 It is a flow chart of a method for adjusting the moving direction of photovoltaic component inspection equipment according to an embodiment.
[0042] like Figure 1 As shown, the method for adjusting the moving direction of the photovoltaic module inspection equipment of the present application comprises the following steps:
[0043] S1, obtaining an image captured by an image acquisition device during movement of the photovoltaic module inspection device;
[0044] S2, obtaining texture information of the photovoltaic module in the image;
[0045] S3, determining at least one actual reference line in a preset direction in the image according to the texture information;
[0046] S4, determining an angle between at least one actual reference line and at least one reference reference line corresponding to the image, wherein the at least one reference reference line is determined according to installation parameters of the image acquisition device;
[0047] S5, adjusting the moving direction of the photovoltaic module inspection equipment according to the angle.
[0048] Among them, please refer to Figure 2 The photovoltaic module inspection device 300 is provided with an image acquisition device 301, and the image acquisition device 301 is used to acquire the image in front of the photovoltaic module inspection device 300. The image acquisition device 301 is arranged in the front of the photovoltaic module inspection device 300, so as to acquire the environmental image in front of the photovoltaic module inspection device 300, and the environmental image will include a part of the photovoltaic module area, such as area 200.
[0049] At least one reference line is determined according to the installation parameters of the image acquisition device 301. The installation parameters include the height and elevation angle at which the image acquisition device 301 is installed on the photovoltaic module inspection device 300. Since the installation parameters are fixed, the reference line after the straight line in the image is distorted can be obtained according to the installation parameters, such as Figure 3 The center line 41 is shown. The number and position of the baseline reference lines in the image can be set according to the size of the photovoltaic module. It can be understood that the baseline reference line is a virtual reference line, and its direction and position relative to the image do not change with the movement direction of the photovoltaic module inspection device.
[0050] The photovoltaic module includes a plurality of battery panels arranged in sequence, and the battery panel includes a plurality of battery cells arranged in sequence. The edges of the battery panels and battery cells are connected to form a continuous straight line, including horizontal lines and vertical lines. The grain information of the photovoltaic module is the straight line connected between the edges of the battery panels and battery cells in the image. Therefore, after determining the actual reference line according to the grain information, such as Figure 3 The center line 42 indicates that by calculating the angle between it and the baseline reference line, the moving direction of the photovoltaic module inspection equipment can be adjusted so that the photovoltaic module inspection equipment can move along the grain of the photovoltaic module (i.e. the straight line formed by the edge) as much as possible, thereby eliminating the need for manual control to control the moving direction of the equipment.
[0051] In some embodiments, step S2, obtaining texture information of the photovoltaic module in the image, includes:
[0052] Convert the image to HSV image;
[0053] Generate a mask image based on the HSV image;
[0054] The sharp edge information of the mask image is extracted to obtain the texture information of the photovoltaic module in the image.
[0055] The collected RGB image is converted into an HSV image, and the hue value data, saturation value data and brightness value data in the HSV image are extracted. According to the hue value data, saturation value data and brightness value data, the threshold range of the white area in the RGB image is determined, and then the mask image is generated according to the determined threshold range and combined with the HSV image. Then, according to the mask image, the Canny edge detection algorithm is used to extract the edge sharpness information of the mask image and generate a texture image, that is, the texture information of the photovoltaic module in the image is obtained.
[0056] In some embodiments, step S3, determining at least one actual reference line in a preset direction in the image according to the texture information, includes:
[0057] Extracting a plurality of straight lines corresponding to the image according to the texture information, wherein the plurality of straight lines include straight lines in a preset direction and straight lines perpendicular to the preset direction;
[0058] The plurality of straight lines are screened, and at least one straight line in a preset direction is determined as at least one actual reference line among the plurality of straight lines.
[0059] Among them, according to the texture image, the Hoffman line detection algorithm is used to extract all the straight lines in the texture image, which reflect the edges of the photovoltaic module. Among these straight lines, there are straight lines in a preset direction and straight lines perpendicular to the preset direction. In some embodiments, the preset direction refers to a direction parallel to the moving direction of the device, for example, a straight line extending along the moving direction of the device in an actual environment (which may be called a vertical line), and a straight line perpendicular to the preset direction refers to a horizontal line perpendicular to the vertical line (or called a horizontal line). When the straight line in the preset direction selects a vertical line, the baseline reference line selects a vertical line.
[0060] In some embodiments, screening a plurality of straight lines to determine at least one straight line in a preset direction among the plurality of straight lines as at least one actual reference line includes:
[0061] Among multiple straight lines, multiple straight lines in a preset direction are selected;
[0062] Among the multiple straight lines in the preset direction, a straight line whose length is greater than a preset length threshold and whose lower end point is located in the area of the image is selected;
[0063] At least one actual reference line is determined based on the screened straight lines.
[0064] Among them, according to all the straight lines in the texture image, the slopes of the straight lines are standardized, and all the horizontal lines and all the vertical lines in the texture image are distinguished. According to all the vertical lines in the texture image, the vertical lines with too short lengths are preliminarily screened out, and then all the remaining vertical lines are extended downward to the position of the lower edge line of the image to obtain the lower endpoint coordinates of each vertical line. According to the lower endpoint coordinates of all the vertical lines, the vertical lines that exceed the image area are screened out. The vertical lines left at this time are the screened lines.
[0065] In some embodiments, determining at least one actual reference line according to the screened straight lines includes:
[0066] If the number of screened straight lines is greater than one, the adjacent straight lines are merged and averaged to obtain at least one actual reference line;
[0067] If the number of the screened straight lines is equal to one, the screened straight line is used as at least one actual reference line.
[0068] Among them, according to the number of screened straight lines, if the number of screened straight lines is greater than one, the adjacent vertical lines can be merged and averaged to obtain all the actual reference lines in the texture image, thereby improving the accuracy of the actual reference lines. If the number of screened straight lines is equal to one, the screened straight line is directly used as the actual reference line.
[0069] By processing the above-mentioned straight lines, a straight line suitable for the next step of analysis can be selected and processed in the texture image as a reference line. For example, a straight line located in the middle area of the image and with a more accurate slope can be selected to improve the accuracy of the angle calculation, thereby more accurately adjusting the movement direction of the device.
[0070] In some embodiments, step S4, determining an angle between at least one actual reference line and at least one baseline reference line corresponding to the image, comprises:
[0071] According to the coordinates of the lower endpoint of at least one actual reference line, matching the reference reference lines corresponding to each actual reference line one by one to form at least one set of a combination of the actual reference line and the reference reference line;
[0072] The angle between the actual reference line and the reference reference line in each group of actual reference lines and reference reference lines is calculated.
[0073] Among them, according to the coordinates of the lower endpoints of all actual reference lines in the texture image, the baseline reference lines corresponding to them are matched to form a combination of multiple groups of actual reference lines and baseline reference lines. Then, according to all groups of actual reference lines and baseline reference lines, the angle formed by each group of actual reference lines and the corresponding baseline reference line is calculated, and the angle range is 0 degrees to 45 degrees.
[0074] In some embodiments, step S5, adjusting the moving direction of the photovoltaic module inspection device according to the angle, includes:
[0075] According to the angles corresponding to each group of actual reference lines and the baseline reference line, the coordinates of the lower endpoint of at least one actual reference line and the midpoint of the image, a weighted calculation is performed on the angles to determine the offset angle of the photovoltaic module inspection equipment;
[0076] Adjust the moving direction of the PV panel inspection equipment according to the offset angle.
[0077] Among them, the angle is weightedly calculated to determine the offset angle OffsetAngle of the photovoltaic module inspection equipment, and the following formula can be used:
[0078]
[0079] Where n is the number of actual reference lines, x i is the coordinate of the lower endpoint of the ith actual reference line, W m is the coordinate of the midpoint of the image, and α is the angle between the ith actual reference line and the corresponding baseline reference line.
[0080] Due to the influence of image distortion, the offset angle of the photovoltaic module inspection equipment is determined by weighted calculation, which can improve the accuracy of the calculation results and thus improve the accuracy of the direction adjustment.
[0081] After calculating the offset angle, if the offset angle exceeds the preset angle range, the moving direction of the photovoltaic module inspection device can be adjusted to reduce the offset angle to within the preset angle range to ensure that the photovoltaic module inspection device moves in a straight line.
[0082] The method for adjusting the moving direction of the photovoltaic module inspection equipment of the present application analyzes the surrounding environment of the equipment based on computer vision, so that the photovoltaic module inspection equipment can automatically move in a straight line based on the texture of the photovoltaic module without manual control of the moving direction, thus saving labor costs and facilitating the maximization of the inspection area.
[0083] Figure 4 FIG. 1 is a schematic diagram showing the structure of a photovoltaic module inspection device according to an embodiment. Figure 4 As shown, a photovoltaic component inspection device includes an image acquisition device 301 and a controller 530. The image acquisition device 301 is connected to the controller 530 and is used to acquire images in front of the photovoltaic component inspection device.
[0084] The controller 530 is configured to execute the steps of the method described in the above embodiment, which will not be described in detail here.
[0085] The present application provides an electronic device, including a storage medium and a controller, wherein a computer program is stored on the storage medium, and when the computer program is executed by the controller, the steps of the method described above are implemented.
[0086] The present application provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method described above are implemented.
[0087] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for adjusting the moving direction of a photovoltaic module inspection device, characterized in that: The photovoltaic component inspection device is provided with an image acquisition device, and the image acquisition device is used to acquire an image in front of the photovoltaic component inspection device. The method comprises the following steps: During the movement of the photovoltaic module inspection device, acquiring the image captured by the image acquisition device; Acquiring texture information of the photovoltaic module in the image; Determining at least one actual reference line in a preset direction in the image according to the texture information; Determine an angle between the at least one actual reference line and at least one reference reference line corresponding to the image, wherein the at least one reference reference line is determined according to installation parameters of the image acquisition device; wherein the number and position of the reference reference lines in the image are set according to the size of the photovoltaic module, and the reference reference line is a virtual reference line; Performing weighted calculation on the included angle to obtain an offset angle; Adjusting the moving direction of the photovoltaic module inspection device according to the offset angle; The step of determining at least one actual reference line in a preset direction in the image according to the texture information includes: Extracting a plurality of straight lines corresponding to the image according to the texture information, wherein the plurality of straight lines include straight lines in a preset direction and straight lines perpendicular to the preset direction, and the preset direction refers to a direction parallel to a moving direction of the device; Selecting a plurality of straight lines in a preset direction from among the plurality of straight lines; Screening out, from among the plurality of straight lines in the preset direction, straight lines whose length is greater than a preset length threshold and whose lower endpoints are located in the region of the image; If the number of the screened straight lines is greater than one, the adjacent straight lines are merged and averaged to obtain the at least one actual reference line; If the number of the screened straight lines is equal to one, the screened straight line is used as the at least one actual reference line; The offset angle is calculated using the following formula: Where n is the number of actual reference lines, x i is the coordinate of the lower endpoint of the ith actual reference line, W m is the coordinate of the midpoint of the image, and α is the angle between the ith actual reference line and the corresponding baseline reference line.
2. The method according to claim 1, characterized in that: The obtaining of texture information of the photovoltaic module in the image includes: Convert the image into an HSV image; Generate a mask image according to the HSV image; The edge sharpness information of the mask image is extracted to obtain the texture information of the photovoltaic module in the image.
3. The method according to any one of claims 1 to 2, characterized in that The determining of the angle between the at least one actual reference line and the at least one reference line corresponding to the image comprises: According to the coordinates of the lower endpoints of the at least one actual reference line, matching the reference reference lines corresponding to the actual reference lines one by one to form at least one group of combinations of the actual reference lines and the reference reference lines; The angle between the actual reference line and the reference reference line in each group of actual reference lines and reference reference lines is calculated.
4. A photovoltaic module inspection device, characterized in that: The device comprises an image acquisition device and a controller, wherein the image acquisition device is used to acquire images in front of the photovoltaic component inspection device, and the controller is configured to execute the steps of the method as claimed in any one of claims 1 to 3.
5. An electronic device, comprising a storage medium and a controller, characterized in that: The storage medium stores a computer program, which, when executed by the controller, implements the steps of the method according to any one of claims 1 to 3.
6. A storage medium, characterized in that: The storage medium stores a computer program, which implements the steps of the method according to any one of claims 1 to 3 when executed by a processor.
