Photovoltaic module installation method and module installation robot based on surface straight line features

By presetting the fine-tuning position above the installation position of the photovoltaic module, and fine-tuning the surface linear features of the reference component and the components to be installed by using the camera to identify the surface of the reference component and the components to be installed, the problem of large installation errors of the existing photovoltaic module installation robot is solved, and higher installation accuracy is achieved.

CN119057431BActive Publication Date: 2025-05-23LEAPTING TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411554060.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-05-23
Estimated Expiration
2044-11-04

AI Technical Summary

Technical Problem

There are large errors in the installation process of existing photovoltaic module installation robots, making it difficult to achieve accurate installation.

Method used

By presetting the fine-tuning position above the installation position of the photovoltaic module, the camera is used to identify the surface linear features of the reference component and the component to be installed, and fine-tuning processing is performed to align horizontally and vertically in parallel to vertical lines to ensure that the distance between the component to be installed and the reference component is consistent.

Benefits of technology

Reduce the error in photovoltaic module installation, improve the installation accuracy, and enable the photovoltaic module to be installed in place more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119057431B_ABST
    Figure CN119057431B_ABST
Patent Text Reader

Abstract

The present invention provides a photovoltaic component installation method based on surface straight line features and a component installation robot, the method comprising: grabbing a component to be installed by a mechanical arm, moving it to a fine-tuning position located above the installation position and hovering; acquiring a first image at the fine-tuning position, calculating the average angle of the horizontal lines of two components according to the first image, and fine-tuning the component to be installed according to the average angle so that the horizontal lines of the two components are parallel; acquiring a second image, calculating the actual distance between the corresponding vertical lines of the two components and the actual distance between the edges of the two components according to the second image; fine-tuning the component to be installed along the horizontal straight line direction according to the former so that the vertical lines of the two components are aligned, and fine-tuning the component to be installed along the vertical line direction according to the latter so that a preset distance is maintained between the two components; and then pressing the component to be installed to the installation position. The present invention reduces installation errors and improves the installation accuracy of photovoltaic components.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of photovoltaic component installation, in particular to a photovoltaic component installation method based on surface straight line features and a component installation robot. Background Art

[0002] Photovoltaic modules can convert solar energy into electrical energy and are an important device for using clean energy. However, building a photovoltaic power station requires a lot of labor costs and is extremely dangerous. Now, the autonomous installation of photovoltaic modules can be achieved through module installation robots. The module installation robot uses visual recognition to determine the installation position of the photovoltaic module, and then installs the photovoltaic module based on this. However, factors such as the long-distance movement of the robot arm will lead to large installation errors. At present, only rough installation can be achieved, and the installation error is difficult to control. Summary of the invention

[0003] One of the purposes of the present invention is to provide a photovoltaic component installation method and a component installation robot based on surface straight line features in order to solve the problems existing in the prior art.

[0004] The technical solution provided by the present invention is as follows:

[0005] A photovoltaic module installation method based on surface straight line features is used for a module installation robot, the module installation robot includes a mechanical arm and a camera located at the end of the mechanical arm, and the installation method includes:

[0006] Grab the component to be installed by the robotic arm, move it to a fine-tuning position and hover it, wherein the fine-tuning position is above the installation position and is a first preset distance away from the installation position;

[0007] Acquire a first image including a reference component and a component to be installed by a camera; the reference component is a photovoltaic component that has been installed in place before the component to be installed;

[0008] Calculating an average angle between the horizontal straight line of the reference component and the horizontal straight line of the component to be installed in the first image, and performing a first fine-tuning process on the component to be installed according to the average angle so that the reference component is parallel to the horizontal straight line of the component to be installed;

[0009] Acquire, by the camera, a second image including the reference component and the component to be installed after the first fine-tuning process;

[0010] Calculating, according to the second image, a first actual distance between a vertical line of the reference component and a corresponding vertical line of the component to be installed, and a second actual distance between a horizontal line at a lower edge of the reference component and a horizontal line at an upper edge of the component to be installed;

[0011] According to the first actual distance, the component to be installed is translated along the horizontal and straight line direction, so that the vertical line of the reference component is aligned with the vertical line of the corresponding component to be installed;

[0012] According to the second actual distance, the component to be installed is translated along the vertical direction, so that a second preset distance is maintained between the reference component and the component to be installed;

[0013] Press the component to be installed down to the installation position.

[0014] In some embodiments, calculating the average angle between the horizontal line of the reference component and the horizontal line of the component to be installed in the first image includes:

[0015] Determining edges of the reference component and the component to be installed in the first image;

[0016] distinguishing the reference component and the component to be installed in the first image according to the edge;

[0017] calculating an average inclination angle of a horizontal line of the reference component in the first image;

[0018] Calculating an average inclination angle of a horizontal line of the component to be installed in the first image;

[0019] According to the average inclination angle of the horizontal line of the reference component and the average inclination angle of the horizontal line of the component to be installed, the average angle between the horizontal line of the reference component and the horizontal line of the component to be installed is obtained.

[0020] In some embodiments, determining the edges of the reference component and the component to be installed in the first image includes:

[0021] Performing an opening operation on the first image, and then using a Hough detection algorithm to extract edge horizontal and straight lines of two components in the first image;

[0022] Obtaining an intersection point of the edge horizontal straight line and a first vertical detection line, where the first vertical detection line is a straight line located at the center of the first image and parallel to the Y axis;

[0023] Clustering the edge horizontal straight lines according to the ordinates of the intersection points to obtain a number of clusters, and using the midpoint value of each cluster to identify the position of the corresponding edge horizontal straight line;

[0024] The middle value of the topmost and bottommost clusters is calculated, the edge horizontal line to which the cluster located above the middle value belongs is the edge horizontal line of the reference component, and the edge horizontal line to which the cluster located below the middle value belongs is the edge horizontal line of the component to be installed, thereby determining the edges of the reference component and the component to be installed in the first image.

[0025] In some embodiments, calculating the average inclination angle of the horizontal line of the reference component in the first image includes:

[0026] Using the Hough detection algorithm to extract all the horizontal and straight lines of the reference component, and obtain the inclination angle of each horizontal and straight line of the reference component;

[0027] Obtaining an intersection point of the horizontal straight line and a first vertical detection line;

[0028] Clustering the horizontal and straight lines according to the vertical coordinates of the intersection points to obtain a number of clusters;

[0029] Perform median filtering on the inclination angles of the horizontal lines to which each cluster belongs, and construct a first point set using the inclination angles of the horizontal lines remaining after filtering and the ordinates of the intersections of the horizontal lines and the first vertical detection line; the abscissa of each point in the first point set is the ordinate value of the intersection of each horizontal line remaining after median filtering and the first vertical detection line, and the ordinate is the inclination angle of each horizontal line remaining after median filtering;

[0030] The first point set is fitted to obtain a first straight line equation; the average inclination angle of all horizontal lines of the reference component is equal to the intercept b1 of the first straight line equation.

[0031] In some embodiments, calculating the average inclination angle of the horizontal line of the component to be installed in the first image includes:

[0032] Using the Hough detection algorithm to extract the horizontal and straight lines of the components to be installed in the first image, and obtaining the inclination angle of each of the horizontal and straight lines;

[0033] Obtaining an intersection point of the horizontal straight line and the first vertical detection line;

[0034] Clustering the horizontal and straight lines according to the vertical coordinates of the intersection points to obtain a number of clusters;

[0035] Performing median filtering on the inclination angles of the horizontal lines in each of the clusters, and constructing a second point set using the inclination angles of the horizontal lines remaining after filtering and the ordinates of the intersections of the horizontal lines and the first vertical detection line; the abscissa of each point in the second point set is the ordinate value of the intersection of each horizontal line remaining after median filtering and the first vertical detection line, and the ordinate is the inclination angle of each horizontal line remaining after median filtering;

[0036] Fitting the second point set with a second straight line equation, wherein the slope of the second straight line equation is equal to the slope of the first straight line equation, comprises:

[0037] Substituting each point in the second point set into the second straight line equation to obtain the corresponding intercept value of the second straight line equation; averaging all the obtained intercept values, and taking the average of the intercept values ​​as the intercept of the second straight line equation;

[0038] The average inclination angle of all the horizontal lines of the assembly to be installed is equal to the intercept b2 of the second straight line equation.

[0039] In some embodiments, calculating a first actual distance between a vertical line of the reference component and a vertical line of the corresponding component to be installed according to the second image includes:

[0040] Determine the edges of the reference component and the component to be installed in the second image, as well as a horizontal straight line of a lower edge of the reference component and a horizontal straight line of an upper edge of the component to be installed;

[0041] Distinguishing the reference component and the component to be installed in the second image according to the edge, and determining a range of the reference component and a range of the component to be installed;

[0042] Extracting a vertical line of a reference component and a vertical line of a corresponding component to be installed from the second image as an upper component reference line and a lower component reference line, respectively;

[0043] Extracting, from the second image, a vertical line of the reference component and a vertical line of the component to be installed except the upper component / lower component reference line;

[0044] The position of the corresponding vertical line is identified by the horizontal coordinate value of the first type of intersection point between the first horizontal detection line and the vertical line of the reference component, and the position of the corresponding vertical line is identified by the horizontal coordinate value of the second type of intersection point between the second horizontal detection line and the vertical line of the component to be installed; the first horizontal detection line is a straight line located in the range of the reference component and parallel to the X-axis, and the second horizontal detection line is a straight line located in the range of the component to be installed and parallel to the X-axis;

[0045] Calculate the relative position of the vertical line of the reference component to the upper component reference line, and the relative position of the vertical line of the component to be installed to the lower component reference line; match the vertical line of the reference component with the vertical line of the component to be installed at the same relative position to form a vertical line pair;

[0046] Obtaining a first pixel distance between the vertical line of the reference component and the corresponding vertical line of the component to be installed according to the positions of two vertical lines among all vertical line pairs;

[0047] Obtaining a second proportional relationship r2 between the pixel distance and the actual distance of the range of the component to be installed in the second image;

[0048] The first pixel distance is multiplied by the second proportional relationship r2 to obtain the first actual distance.

[0049] In some embodiments, extracting a vertical line of a reference component and a vertical line of a corresponding component to be installed from the second image as an upper component reference line and a lower component reference line, respectively, includes:

[0050] The second image includes a first-type vertical line and a plurality of second-type vertical lines, and the width of the first-type vertical line is greater than that of the second-type vertical line;

[0051] An opening operation is first performed on the second image, and then the first type of vertical line is extracted using the Hough detection algorithm. The first type of vertical line located in the range of the reference component is used as the upper component reference line, and the first type of vertical line located in the range of the component to be installed is used as the lower component reference line.

[0052] In some embodiments, using the horizontal coordinate value of the first type of intersection point between the first horizontal detection line and the vertical line of the reference component to identify the position of the corresponding vertical line includes:

[0053] Select a first horizontal detection line located at the center of the reference component range, and obtain a first type of intersection point between the upper component reference line and the first horizontal detection line;

[0054] Clustering the horizontal coordinates of the first type of intersections to obtain a plurality of clusters; obtaining the midpoint value of each cluster, averaging the midpoint values ​​of all clusters, and using the obtained average value as the position identifier of the upper component reference line;

[0055] The method of using the horizontal coordinate value of the second type of intersection point between the second horizontal detection line and the vertical line of the component to be installed to identify the position of the corresponding vertical line includes:

[0056] Select a second horizontal detection line located at the center of the range of the component to be installed, and obtain a second type of intersection point between the lower component reference line and the second horizontal detection line;

[0057] Clustering the horizontal coordinates of the second type of intersections to obtain a number of clusters; obtaining the midpoint value of each cluster, averaging the midpoint values ​​of all clusters, and using the obtained average value as the position identifier of the lower component reference line.

[0058] In some embodiments, extracting the vertical line of the reference component and the vertical line of the component to be installed other than the upper component / lower component reference line from the second image includes:

[0059] A Hough detection algorithm is used to extract the second type of vertical lines of the reference component and the second type of vertical lines of the component to be installed in the second image.

[0060] The method of using the horizontal coordinate value of the first type of intersection point between the first horizontal detection line and the vertical line of the reference component to identify the position of the corresponding vertical line includes:

[0061] Obtaining a first type of intersection point between a second type of vertical line of the reference component and a first type of horizontal detection line;

[0062] Clustering the second type of vertical lines of the reference component according to the horizontal coordinates of the first type of intersection points to obtain a plurality of clusters, and using the midpoint value of each cluster as the position identifier of the second type of vertical line of the corresponding reference component;

[0063] The method of using the horizontal coordinate value of the second type of intersection point between the second horizontal detection line and the vertical line of the component to be installed to identify the position of the corresponding vertical line includes:

[0064] Obtaining a second type of intersection point between a second type of vertical line of the component to be installed and a second type of horizontal detection line;

[0065] The second type of vertical lines of the components to be installed are clustered according to the horizontal coordinates of the second type of intersections to obtain a plurality of clusters, and the midpoint value of each cluster is used as the position identifier of the corresponding second type of vertical line of the components to be installed.

[0066] In some embodiments, obtaining a first pixel distance between a vertical line of the reference component and a corresponding vertical line of the component to be installed according to positions of two vertical lines among all vertical line pairs includes:

[0067] Construct a third point set, wherein the points of the third point set correspond to the vertical line pairs one by one, and the abscissa value of each point in the third point set is the abscissa value of the first type of intersection point, and the ordinate value is the abscissa value of the second type of intersection point;

[0068] Fitting the third point set to obtain a third straight line equation, wherein the independent variable of the third straight line equation is the position of the vertical line of the reference component in the vertical line pair, and the dependent variable is the position of the corresponding vertical line of the component to be installed;

[0069] The value of the dependent variable corresponding to the horizontal coordinate value of the image center of the second image is obtained according to the third straight line equation, and the first pixel distance is obtained by subtracting the value of the independent variable from the value of the dependent variable.

[0070] In some embodiments, calculating the second actual distance between the lower edge horizontal line of the reference component and the upper edge horizontal line of the component to be installed according to the second image includes:

[0071] Calculate the pixel distance y1 from the center of the image in the second image to the horizontal line at the lower edge of the reference component, and the pixel distance y2 from the center of the image to the horizontal line at the upper edge of the component to be installed;

[0072] Obtaining a first proportional relationship r1 between the pixel distance and the actual distance of the reference component range, and a second proportional relationship r2 between the pixel distance and the actual distance of the component to be installed range;

[0073] Multiplying the pixel distance y1 by the first proportional relationship r1 to obtain the corresponding actual distance 1;

[0074] Multiply the pixel distance y2 by the second proportional relationship r2 to obtain the corresponding actual distance 2;

[0075] The second actual distance is obtained according to the actual distance one and the actual distance two.

[0076] In some embodiments, obtaining a first proportional relationship r1 between the pixel distance and the actual distance of the reference component range includes:

[0077] Calculate the distance between adjacent second-type vertical lines within the range of the reference component according to the positions of the second-type vertical lines of the reference component;

[0078] Obtaining a pixel length of a battery cell in the reference component range in the second image according to the distances between all adjacent second-type vertical lines in the reference component range;

[0079] According to the pixel length and the actual length of a battery unit in the reference component range, a first proportional relationship r1 between the pixel distance and the actual distance in the reference component range is obtained;

[0080] The step of obtaining a second proportional relationship r2 between the pixel distance and the actual distance of the range of the component to be installed includes:

[0081] Calculating the distance between adjacent second-type vertical lines in the range of the components to be installed according to the positions of the second-type vertical lines of the components to be installed in the second image;

[0082] Obtaining the pixel length of a battery cell in the component range to be installed in the second image according to the distances between all adjacent second-type vertical lines in the reference component range;

[0083] According to the pixel length and the actual length of a battery unit in the range of the component to be installed, a second proportional relationship r2 between the pixel distance and the actual distance in the range of the component to be installed is obtained.

[0084] The present invention also provides a component installation robot, comprising:

[0085] A robotic arm to grab, move and adjust components to be installed;

[0086] a camera, located at the end of the robotic arm, for acquiring an image containing the reference component and the component to be installed;

[0087] Memory for storing computer programs;

[0088] A processor is used to implement any of the above-mentioned photovoltaic component installation methods based on surface straight line features when running a computer program.

[0089] The photovoltaic module installation method based on surface straight line features and the module installation robot provided by the present invention can at least bring the following beneficial effects:

[0090] The present invention sets a fine-tuning position at a preset distance above the installation position of the photovoltaic component, identifies the straight lines on the surface of the reference component and the component to be installed at the fine-tuning position, and fine-tunes the component to be installed according to the positional relationship of these straight lines, so that the component to be installed is parallel to the horizontal straight line of the reference component, the vertical straight line is aligned, and a second preset distance is maintained between the component to be installed and the reference component in the vertical direction; and then the component to be installed that has been fine-tuned to the right position is pressed down to the installation position to complete the installation. The above method reduces the installation error and improves the installation accuracy of the photovoltaic component. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] The preferred implementation scheme will be described below in a clear and understandable manner in conjunction with the accompanying drawings to further illustrate the above-mentioned characteristics, technical features, advantages and implementation methods of the photovoltaic component installation method based on surface straight line features and the component installation robot.

[0092] Figure 1 is a flow chart of an embodiment of a photovoltaic assembly installation method based on surface straight line features of the present invention;

[0093] Figure 2 is a schematic structural diagram of an embodiment of a component installation robot of the present invention;

[0094] Figure 3 It is a schematic diagram of the structure of the reference component and the component to be installed as seen from the perspective of the robot camera when fine-tuning the position;

[0095] Figure 4 is a schematic diagram of a first image according to an embodiment of the present invention;

[0096] Figure 5 This is a schematic diagram of an image obtained after performing an opening operation on the first image and extracting horizontal and straight lines using the Hough detection algorithm. DETAILED DESCRIPTION

[0097] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings and other implementation methods can be obtained based on these drawings without creative work.

[0098] In order to simplify the drawings, only the parts related to the present invention are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only one of the parts with the same structure or function is schematically drawn, or only one of them is marked. In this article, "one" not only means "only one", but also means "more than one"; "robot" and "component installation robot" have the same meaning.

[0099] One embodiment of the present invention, as Figure 1 As shown, a photovoltaic module installation method based on surface straight line features is used for a module installation robot, the module installation robot includes a mechanical arm and a camera located at the end of the mechanical arm, and the installation method includes:

[0100] Step S100: The component to be installed is grasped by a mechanical arm, moved to a fine-tuning position and hovered; the fine-tuning position is located above the installation position of the component to be installed and is a first preset distance away from the installation position.

[0101] Specifically, the module installation robot is used to install photovoltaic modules on photovoltaic brackets. The end of the robot arm grabs, moves and adjusts the photovoltaic modules. A camera is also installed at the end of the robot arm to provide visual positioning information for the robot.

[0102] The component to be installed refers to the photovoltaic component to be installed. The installation position can be identified by the position of a preset point in the installation area of ​​the photovoltaic component. The installation position of the component to be installed can be predetermined according to the design plan of the photovoltaic power station and input into the component installation robot. A fine-tuning position is set above the installation position, and the height difference between the two is a first preset distance, such as 5 cm. For example, the installation position is set to the center position of the installation area, and the robot grabs the component to be installed through the mechanical arm and moves it so that the center point of the component to be installed reaches the fine-tuning position and the component to be installed is suspended at the fine-tuning position.

[0103] Step S200 is to obtain a first image including a reference component and a component to be installed by a camera; the reference component is a photovoltaic component that has been installed in place before the component to be installed.

[0104] The reference component is the previously installed photovoltaic component. Taking the installation from left to right as an example, the first photovoltaic component can be installed in a traditional way and used as the reference component for the next photovoltaic component, and then the second photovoltaic component can be installed using the method described in this embodiment; the third photovoltaic component can be installed using the second photovoltaic component as the reference component, and the cycle is repeated until the installation of photovoltaic components in a line is completed. It can also be installed from right to left, or from top to bottom, or from bottom to top, without any restrictions, and the previously installed photovoltaic component can be used as the reference component for the next component to be installed.

[0105] The camera is located above the photovoltaic module to be installed, with a certain height difference. When the robot arm moves the module to be installed to the fine-tuning position, the robot can look down through the camera to capture an image containing the reference module and the module to be installed. Figure 3 It is a structural diagram of the image seen within the camera's field of view at the fine-tuning position. The image space is divided into the reference component range, the gap, and the range of components to be installed. The image within the reference component range belongs to the reference component, and the image within the range of components to be installed belongs to the component to be installed, with a certain gap between the two. Figure 4 It is a specific image taken by the camera, which includes, from top to bottom, images of some reference components, gaps, and images of some components to be installed. There are perpendicular straight lines on the component images.

[0106] There are some white lines on the photovoltaic panel, including multiple parallel horizontal and vertical lines, which are perpendicular to each other. These white lines are connecting lines between multiple battery cells. Their main function is to connect the battery cells in series or in parallel to form a complete circuit, thereby achieving the purpose of power generation.

[0107] The first image is acquired by the camera at the fine-tuning position. The first image contains horizontal and vertical lines of the photovoltaic module, such as Figure 4 As shown. With the upper left corner of the image as the origin, an xyz coordinate system is established, the horizontal direction of the image is the X axis (i.e. parallel to the upper edge of the image), the vertical direction is the Y axis (i.e. parallel to the left edge of the image), the plane of the reference component is the xy plane, and the Z axis is established perpendicular to the xy plane.

[0108] It should be noted that the vertical and horizontal lines in this article refer specifically to the white lines on the surface of the reference component / component to be installed. The horizontal lines of the reference component / component to be installed in the image obtained by the camera are not necessarily parallel to the X-axis, and the vertical lines are not necessarily parallel to the Y-axis.

[0109] Step S300 calculates the average angle between the horizontal line of the reference component and the horizontal line of the component to be installed in the first image, and performs a first fine-tuning process on the component to be installed according to the average angle to make the horizontal lines of the reference component and the component to be installed parallel.

[0110] Existing straight line detection algorithms can be used, for example, the horizontal and straight lines on the reference component and the component to be installed in the first image are detected by the Hough detection algorithm. When a horizontal straight line is detected, the Hough detection algorithm simultaneously outputs the inclination angle of the horizontal straight line, that is, the angle between the horizontal straight line and the X-axis. The average inclination angle 1 is obtained according to the inclination angles of multiple horizontal straight lines on the reference component. The average inclination angle 2 is obtained according to the inclination angles of multiple horizontal straight lines on the component to be installed. The average angle between the horizontal straight line of the reference component and the horizontal straight line of the component to be installed can be calculated based on the average inclination angle 1 and the average inclination angle 2, and then the rotational freedom of the component to be installed around the Z axis is adjusted according to this average angle, so that the horizontal straight line of the reference component is parallel to the horizontal straight line of the component to be installed.

[0111] Step S400 is to obtain, by means of a camera, a second image including the reference component and the component to be installed after the first fine-tuning process.

[0112] Step S500 calculates a first actual distance between a vertical line of the reference component and a vertical line of the corresponding component to be installed, and a second actual distance between a lower edge horizontal line of the reference component and an upper edge horizontal line of the component to be installed according to the second image.

[0113] Step S600 translates the component to be installed along a horizontal and straight line direction according to the first actual distance, so that the vertical line of the reference component is aligned with the vertical line of the corresponding component to be installed.

[0114] Step S700 is to translate the component to be installed along the vertical direction according to the second actual distance, so that a second preset distance is maintained between the reference component and the component to be installed.

[0115] Step S800: Press the component to be installed to the installation position.

[0116] Specifically, after the first fine-tuning process, the horizontal line of the component to be installed is parallel to the horizontal line of the reference component. Therefore, in the second image, the horizontal line of the component to be installed is parallel to the horizontal line of the reference component, and the vertical line of the component to be installed may be aligned with the vertical line of the reference component, or may be parallel but not aligned.

[0117] Existing straight line detection algorithms may be used, for example, the Hough detection algorithm is used to detect vertical lines on the reference component and the component to be installed in the second image. The first pixel distance between the vertical line of the reference component in the second image and the corresponding vertical line of the component to be installed is calculated.

[0118] The pixel distance is not equal to the actual distance, and needs to be converted into the actual distance based on the relationship between the pixel distance and the actual distance. The relationship between the pixel distance and the actual distance depends on the camera's resolution, the object distance and the distance when shooting, and can be determined in advance. The first pixel distance is converted into the first actual distance. The first actual distance is the translation amount of the component to be installed in the horizontal and straight directions. The component to be installed is adjusted according to the translation amount in the horizontal and straight directions, so that the reference component can be aligned with the corresponding vertical line of the component to be installed.

[0119] Similarly, the Hough detection algorithm can be used to identify the horizontal straight line at the lower edge of the reference component and the horizontal straight line at the upper edge of the component to be installed in the second image, calculate the second pixel distance between the two, and then obtain the corresponding second actual distance based on the relationship between the pixel distance and the actual distance. The translation amount of the component to be installed in the vertical direction is obtained based on the difference between the second actual distance and the second preset distance. The component to be installed is adjusted based on the translation amount in the vertical direction so that the second preset distance can be maintained between the reference component and the component to be installed in the vertical direction.

[0120] By fine-tuning the assembly to be installed at the fine-tuning position, the assembly to be installed and the reference assembly are not only parallel to the horizontal line and aligned with the corresponding vertical line, but also keep a second preset distance in the vertical direction. Then, the assembly to be installed is pressed down to the installation position, thereby completing the installation of the photovoltaic assembly.

[0121] In this embodiment, by setting the fine-tuning position, without adding additional sensors, the component to be installed is first fine-tuned into place at the fine-tuning position according to the appearance characteristics of the photovoltaic component (i.e., the straight line on the surface), and then the component to be installed is pressed down, thereby reducing the installation error and improving the installation accuracy of the photovoltaic component.

[0122] In one embodiment, step S300 calculates the average angle between the horizontal line of the reference component and the horizontal line of the component to be installed in the first image, including:

[0123] Step S310 determines the edge of the reference component and the component to be installed in the first image, and distinguishes the reference component and the component to be installed in the first image according to the edge;

[0124] Step S320 calculates the average inclination angle of the horizontal line of the reference component in the first image;

[0125] Step S330 calculates the average inclination angle of the horizontal line of the component to be installed in the first image;

[0126] Step S340 obtains the average angle between the horizontal line of the reference component and the horizontal line of the component to be installed according to the average inclination angle of the horizontal line of the reference component and the average inclination angle of the horizontal line of the component to be installed.

[0127] In one embodiment, determining the edge of the reference component and the component to be installed in the first image in step S310 includes:

[0128] Step S311 first performs an opening operation on the first image, and then uses the Hough detection algorithm to extract the edge horizontal straight lines of two components in the first image;

[0129] Step S312: obtaining the intersection of the edge horizontal straight line and the first vertical detection line, where the first vertical detection line is a straight line located at the center of the first image and parallel to the Y axis;

[0130] Step S313 clusters the edge horizontal straight lines according to the ordinates of the intersection points to obtain a number of clusters, and uses the midpoint value of each cluster to identify the position of the corresponding edge horizontal straight line;

[0131] Step S314 calculates the middle value of the top cluster and the bottom cluster. The edge horizontal line to which the cluster located above the middle value belongs is the edge horizontal line of the reference component, and the edge horizontal line to which the cluster located below the middle value belongs is the edge horizontal line of the component to be installed, thereby determining the edges of the reference component and the component to be installed in the first image.

[0132] Specifically, the opening operation is used to remove small details and noise from an image without affecting the structure of large objects. The process is to first erode the image and then dilate the resulting image. Erosion will reduce the size of foreground objects and remove small protrusions. Dilation will increase the size of foreground objects.

[0133] like Figure 5 As shown in FIG. 1 , the first image is first opened to remove thin straight lines and leave thick straight lines. On this basis, the Hough detection algorithm is used to extract the horizontal and straight lines of the first image to obtain the edge horizontal and straight lines of the two components (such as Figure 5 The blue straight line). Due to the frame of the PV panel (see Figure 5 The white part between the upper edge horizontal line and the lower edge horizontal line in the middle) will identify the upper edge horizontal line and the lower edge horizontal line of the frame, that is, the upper edge horizontal line and the lower edge horizontal line of the lower frame of the reference component, and the upper edge horizontal line and the lower edge horizontal line of the upper frame of the component to be installed are obtained.

[0134] The position of the edge horizontal line can be identified by the ordinate of the intersection point with the first vertical detection line. The first vertical line can be any straight line parallel to the Y axis of the first image. Since the image taken by the camera has "distortion" that is larger near and smaller far away, it is preferred to use a straight line located at the center of the first image and parallel to the Y axis of the first image as the first vertical detection line, such as x=cols / 2, where cols is the width of the first image.

[0135] Ideally, a straight line is detected by the straight line detection algorithm, but in reality, multiple straight lines may be detected, such as Figure 5 There are multiple horizontal lines (blue lines) at the bottom edge of the bottom border of the reference component, so it is necessary to cluster the horizontal lines according to the ordinate of the intersection of the horizontal lines and the first vertical detection line. The horizontal lines belonging to the same cluster can be merged into one, and the midpoint value of the cluster (such as Figure 5 The vertical coordinate value of the red point in the middle) is used to mark the position of the horizontal and straight lines of the fused edge.

[0136] According to the position of the horizontal straight line of the edge of the reference component and the position of the horizontal straight line of the edge of the component to be installed, the edges of the two components in the first image are determined, thereby determining the range of the reference component and the range of the component to be installed. There are many specific methods. Figure 5 , the midpoint values ​​of the four clusters can be sorted from small to large. Assuming that the Y axis increases from top to bottom, the edge horizontal lines to which the first two clusters belong are the edge horizontal lines to which the reference components belong, and the edge horizontal lines to which the last two clusters belong are the edge horizontal lines to which the components to be installed belong.

[0137] The middle value of the two middle clusters can also be calculated (that is, the ordinate value of the green point, the average of the midpoint values ​​of the two middle clusters can be taken as the middle value, or the middle value can be obtained according to the median of the four clusters). The edge horizontal line to which the cluster located above the middle value belongs is the edge horizontal line of the reference component, and the edge horizontal line to which the cluster located below the middle value belongs is the edge horizontal line of the component to be installed.

[0138] Alternatively, as described in step S314, the average of the midpoint values ​​of the top and bottom two clusters may be taken as the middle value, and the edges of the two components may be distinguished according to the middle value. Since the top and bottom two clusters are far apart, they are easier to identify and locate than the two middle clusters.

[0139] The range surrounded by the horizontal straight line extending upward from the edge of the reference component belongs to the reference component range, and the range surrounded by the horizontal straight line extending downward from the edge of the component to be installed is the component range to be installed.

[0140] In one embodiment, step S320 includes:

[0141] Step S321 uses the Hough detection algorithm to extract all horizontal and straight lines of the reference component in the first image, and obtains the inclination angle of each horizontal and straight line;

[0142] Step S322: obtaining the intersection of the horizontal straight line of the reference component and the first vertical detection line;

[0143] Step S323 clusters the horizontal and straight lines of the reference components according to the vertical coordinates of the intersection points to obtain a number of clusters;

[0144] Step S324: median filtering is performed on the inclination angles of the horizontal lines to which each cluster belongs;

[0145] Step S325 constructs a first point set using the inclination angle of the horizontal line remaining after filtering and the ordinate of the intersection with the first vertical detection line. The points of the first point set correspond to the intersections of the horizontal line remaining after filtering and the first vertical detection line one by one. The abscissa of each point is the ordinate value of the corresponding intersection, and the ordinate is the inclination angle of the horizontal line where the corresponding intersection is located.

[0146] Step S326 fits the first point set to obtain a first straight line equation; the average inclination angle of all horizontal lines of the reference component is equal to the intercept b1 of the first straight line equation.

[0147] Specifically, the Hough detection function is directly used to extract the horizontal and straight lines in the first image, and the horizontal and straight lines of the reference component and the horizontal and straight lines of the component to be installed are distinguished according to the edges. Although the method provided in steps S321 to S326 is used to calculate the inclination angle of the horizontal and straight lines of the reference component, a similar method can be used to calculate the inclination angle of the horizontal and straight lines of the component to be installed, which will not be described in detail here.

[0148] The position of the horizontal straight line of the reference component / component to be installed can be identified by the ordinate of the intersection point between it and the first vertical detection line. The first vertical line can also be replaced by a second vertical detection line, which is a straight line parallel to the first vertical line and not located at the center of the image. The position of the horizontal straight line is identified by the ordinate of the intersection point between it and the second vertical line.

[0149] The horizontal and straight lines of the reference component are clustered to obtain several clusters, and then the inclination angles of the horizontal and straight lines belonging to the same cluster are median filtered to remove some horizontal and straight lines.

[0150] Construct the first point set (y1, θ1), where the horizontal coordinate y1 of each point is the vertical coordinate value of the intersection of the horizontal line to which the point belongs and the first vertical detection line, and θ1 is the inclination angle of the horizontal line to which the point belongs. The least squares method can be used to fit these points to the first straight line equation θ1=k1*y1+b1, where k1 is the slope and b1 is the intercept. The independent variable of the first straight line equation is the vertical coordinate of the intersection of the horizontal line of the reference component and the first vertical detection line, and the dependent variable is the inclination angle of the horizontal line of the reference component.

[0151] Since the horizontal lines of the reference component are parallel to each other and have the same inclination angles, the slope k1 of the first straight line equation approaches 0, so the average inclination angle of the horizontal lines of the reference component is equal to the intercept b1 of the first straight line equation.

[0152] In one embodiment, step S330 includes:

[0153] Step S331 uses the Hough detection algorithm to extract the horizontal and straight lines of the components to be installed in the first image, and obtains the inclination angle of each horizontal and straight line of the components to be installed;

[0154] Step S332: obtaining the intersection of the horizontal straight line of the component to be installed and the first vertical detection line;

[0155] Step S333 clusters the horizontal and straight lines of the components to be installed according to the vertical coordinates of the intersection points to obtain a number of clusters;

[0156] Step S334 performs median filtering on the inclination angles of the horizontal lines in each cluster;

[0157] Step S335 constructs a second point set using the inclination angle of the horizontal line remaining after filtering and the ordinate of the intersection point with the first vertical detection line. The points of the second point set correspond to the intersection points of the horizontal line remaining after filtering and the first vertical detection line one by one. The abscissa of each point is the ordinate value of the corresponding intersection point, and the ordinate is the inclination angle of the horizontal line where the corresponding intersection point is located.

[0158] Step S336 fits the second point set with a second straight line equation, where the slope of the second straight line equation is equal to the slope of the first straight line equation, including:

[0159] Substituting each point in the second point set into the second straight line equation to obtain the corresponding intercept value of the second straight line equation; averaging all the intercept values ​​obtained, and using the obtained average as the intercept of the second straight line equation;

[0160] The average inclination angle of all the horizontal lines of the components to be installed is equal to the intercept b2 of the second straight line equation.

[0161] Specifically, steps S331 to S335 are similar to steps S321 to S325 and are not described in detail here. The difference lies in step S336.

[0162] Since the range of the components to be installed that can be photographed by the camera is smaller than the range of the reference components, there are fewer horizontal and straight lines of the components to be installed in the image, fewer intersections with the first vertical detection line, and fewer points in the second point set. If forced fitting is performed, a large error will be caused. Therefore, step S336 is used to derive the second straight line equation:

[0163] Assume that the second point set (y2, θ2) is approximately on the second straight line equation θ2=k2*y2+b2, where k2 is the slope, b2 is the intercept, the horizontal coordinate y2 of each point in the second point set is the vertical coordinate value of the intersection of the horizontal straight line to which the point belongs and the first vertical detection line, and θ2 is the inclination angle of the horizontal straight line to which the point belongs.

[0164] The slope k2 of the second straight line equation should also tend to 0. Take k2=k1, substitute each point of the second point set into the second straight line equation, obtain the corresponding b2 value, and then average these b2 values, and use the obtained mean as the intercept b2 of the second straight line equation.

[0165] Since the slope k2 approaches 0, the average inclination angle of the horizontal line of the assembly to be installed is equal to the intercept b2 of the second straight line equation.

[0166] The average inclination angle of the horizontal line of the reference component is calculated in the same way, and the first vertical line here can also be replaced by the second vertical line.

[0167] In one embodiment, calculating the first actual distance between the vertical line of the reference component and the vertical line of the corresponding component to be installed according to the second image in step S500 includes:

[0168] Step S510 determines the edges of the reference component and the component to be installed in the second image, as well as the horizontal straight line of the lower edge of the reference component and the horizontal straight line of the upper edge of the component to be installed;

[0169] Step S520 distinguishes the reference component and the component to be installed in the second image according to the edge, and determines the reference component range and the component to be installed range;

[0170] Step S530 extracts a vertical line of a reference component and a vertical line of a corresponding component to be installed from the second image as an upper component reference line and a lower component reference line, respectively, and marks their positions;

[0171] Step S540 extracts the vertical line of the reference component and the vertical line of the component to be installed except the upper component / lower component reference line from the second image, and marks their positions;

[0172] Step S550 uses the horizontal coordinate value of the first type of intersection point between the first horizontal detection line and the vertical line of the reference component to identify the position of the corresponding vertical line, and uses the horizontal coordinate value of the second type of intersection point between the second horizontal detection line and the vertical line of the component to be installed to identify the position of the corresponding vertical line; the first horizontal detection line is a straight line located in the range of the reference component and parallel to the X-axis, and the second horizontal detection line is a straight line located in the range of the component to be installed and parallel to the X-axis;

[0173] Calculate the relative position of the vertical line of the reference component to the upper component reference line, and the relative position of the vertical line of the component to be installed to the lower component reference line; match the vertical line of the reference component with the vertical line of the component to be installed at the same relative position to form a vertical line pair;

[0174] Step S560: obtaining a first pixel distance between the vertical line of the reference component and the vertical line of the corresponding component to be installed according to the positions of two vertical lines among all vertical line pairs;

[0175] Step S570: obtaining a second proportional relationship r2 between the pixel distance and the actual distance of the range of the component to be installed in the second image;

[0176] Step S580 multiplies the first pixel distance by the second proportional relationship r2 to obtain a first actual distance.

[0177] Specifically, a method similar to step S311 to step S314 can be used to determine the edges of the reference component and the component to be installed in the second image, and the extracted lower edge horizontal straight line of the lower frame of the reference component is used as the lower edge horizontal straight line of the reference component, and the upper edge horizontal straight line of the upper frame of the component to be installed is used as the upper edge horizontal straight line of the component to be installed.

[0178] The reference component and the component to be installed in the second image are distinguished according to the edge, and the range of the reference component and the range of the component to be installed in the second image are determined.

[0179] Then determine the upper component reference line and the lower component reference line in the second image, as well as the vertical lines of the upper and lower components other than the reference lines. The upper component is the reference component, and the lower component is the component to be installed.

[0180] The positions of the vertical lines of the upper and lower components are marked, including the positions of the upper component reference line and the lower component reference line. The horizontal coordinate value of the first type of intersection between the first horizontal detection line and the vertical line of the reference component (including the upper component reference line) can be used to mark the position of the corresponding vertical line. The first horizontal detection line is a straight line located in the range of the reference component and parallel to the X-axis. The horizontal coordinate value of the second type of intersection between the second horizontal detection line and the vertical line of the component to be installed (including the lower component reference line) can be used to mark the position of the corresponding vertical line. The second horizontal detection line is a straight line located in the range of the component to be installed and parallel to the X-axis.

[0181] Calculate the relative position of the vertical line of the upper component relative to the upper component reference line, for example, use the difference between the horizontal coordinate value of the first intersection of the vertical line of the upper component and the first type of horizontal detection line minus the horizontal coordinate value of the first intersection of the upper component reference line and the first type of horizontal detection line to express the relative position.

[0182] Similarly, calculate the relative position of the vertical line of the component to be installed relative to the reference line of the lower component. A set of vertical lines of the upper and lower components with the same relative position are matched as a pair. The same relative position means that the vertical lines of the upper and lower components are on the same side of the corresponding reference line and are close to the corresponding reference line, that is, the difference in distance is within the threshold.

[0183] For example, the average distance between adjacent vertical lines can be calculated based on the position marks of the vertical lines. If a vertical line is on the left side of the reference line and differs by approximately 2 average distances, it means that the vertical line is located second to the left of the reference line. The vertical line of the reference component located second to the left of the upper component reference line and the vertical line of the component to be installed located second to the left of the lower component reference line are paired.

[0184] The pixel distance between the two vertical lines in each vertical line pair can be calculated according to their positions in the second image as the pixel distance of the corresponding vertical line pair; the average of the pixel distances of all or part of the vertical line pairs is calculated and used as the first pixel distance between the vertical line of the reference component and the vertical line of the corresponding component to be installed. The first pixel distance is then converted into the corresponding first actual distance.

[0185] In one embodiment, step S530 includes:

[0186] The second image includes a first-type vertical line and a plurality of second-type vertical lines, and the first-type vertical line is wider than the second-type vertical line.

[0187] Step S531: firstly perform an opening operation on the second image, and then use the Hough detection algorithm to extract the first type of vertical lines, and use the first type of vertical lines located at the reference component as the upper component reference line, and the first type of vertical lines located at the component to be installed as the lower component reference line;

[0188] Step S532: select a straight line located in the reference component range and parallel to the X-axis as the first horizontal detection line, and obtain the first type of intersection between the upper component reference line and the first horizontal detection line;

[0189] Step S533 obtains the position mark of the upper component reference line according to the horizontal coordinate of the first type of intersection point;

[0190] Step S534: select a straight line located in the range of the component to be installed and parallel to the X-axis as the second horizontal detection line, and obtain the second type of intersection between the lower component reference line and the second horizontal detection line;

[0191] Step S535 obtains the position identifier of the lower component reference line according to the horizontal coordinate of the second type of intersection point.

[0192] Specifically, Figure 4 As shown in the figure, there are two types of vertical lines on the surface of the photovoltaic module, among which the thick white line in the middle is the first type of vertical line, and the other thin white lines are the second type of vertical lines. The first type of vertical line is preferred as the reference line.

[0193] By performing an opening operation on the second image and then using the Hough detection algorithm to extract vertical lines, the first type of vertical lines can be extracted and used as reference lines. The first type of vertical lines located within the range of the reference component are used as the upper component reference lines, and the first type of vertical lines located within the range of the component to be installed are used as the lower component reference lines.

[0194] For some photovoltaic modules, there may be no first-category vertical lines, and all are second-category vertical lines. Then step S531 can be changed to: use the Hough detection algorithm to extract vertical lines, and select a pair of vertical lines corresponding to the upper and lower modules from the extracted vertical lines as the upper module reference line and the lower module reference line respectively. The subsequent processing steps are the same.

[0195] The first horizontal detection line can be any straight line in the range of the reference component parallel to the X-axis of the second image, preferably the first horizontal detection line located at the center of the range of the reference component. The second horizontal detection line can be any straight line in the range of the component to be installed parallel to the X-axis of the second image, preferably the second horizontal detection line located at the center of the range of the component to be installed.

[0196] The position of the upper component reference line is identified by the horizontal coordinate value of the intersection of the upper component reference line and the first horizontal detection line. The position of the lower component reference line is identified by the horizontal coordinate value of the intersection of the lower component reference line and the second horizontal detection line.

[0197] In one embodiment, step S533 obtains the position identification of the upper component reference line according to the horizontal coordinates of the first type of intersections, or step S535 obtains the position identification of the lower component reference line according to the horizontal coordinates of the second type of intersections, including: clustering the horizontal coordinates of the first type of intersections / the second type of intersections to obtain several clusters; obtaining the midpoint value of each cluster, averaging the midpoint values ​​of all clusters, and using the obtained average value as the position identification of the upper component reference line / the lower component reference line.

[0198] If the reference line is a thicker straight line, the line detection algorithm may detect multiple vertical lines, and the average value of the horizontal coordinates of all intersections can be used to identify the position of the reference line. In this embodiment, the average value of the midpoint values ​​of all clusters is used to identify the position of the reference line, making the position identification more accurate.

[0199] In one embodiment, step S540 extracts the vertical line of the reference component and the vertical line of the component to be installed except the upper component / lower component reference line from the second image, and marks their positions, including:

[0200] Step S541 uses the Hough detection algorithm to extract the second type of vertical lines of the reference component and the second type of vertical lines of the component to be installed in the second image;

[0201] Step S542 obtains the first type of intersection point between the second type of vertical line of the reference component and the first type of horizontal detection line;

[0202] Step S543 clusters the second type of vertical lines of the reference component according to the horizontal coordinates of the first type of intersection points to obtain a number of clusters, and uses the midpoint value of each cluster as the position identifier of the second type of vertical line of the corresponding reference component;

[0203] Step S544: obtaining the second type of intersection points between the second type of vertical lines of the components to be installed and the second type of horizontal detection lines;

[0204] Step S545 clusters the second type of vertical lines of the components to be installed according to the horizontal coordinates of the second type of intersection points to obtain a plurality of clusters, and uses the midpoint value of each cluster as the position identifier of the corresponding second type of vertical line of the components to be installed.

[0205] In one embodiment, step S560 obtains the first pixel distance between the vertical line of the reference component and the vertical line of the corresponding component to be installed according to the positions of two vertical lines in all vertical line pairs, including:

[0206] Step S561 constructs a third point set, where the points of the third point set correspond to the vertical line pairs one by one, and the abscissa value of each point is the abscissa value of the first type of intersection point, and the ordinate value is the abscissa value of the second type of intersection point;

[0207] Step S562: Fitting the third point set to obtain a third straight line equation, wherein the independent variable of the third straight line equation is the position of the vertical line of the vertical line centering the reference component, and the dependent variable is the position of the vertical line of the corresponding component to be installed;

[0208] Step S563 obtains the value of the dependent variable corresponding to a preset value of the independent variable according to the third straight line equation, and subtracts the preset value from the value of the dependent variable to obtain the first pixel distance.

[0209] Specifically, a third point set is constructed according to the matching vertical line pairs, wherein the points (x1, x2) of the third point set correspond one-to-one to the vertical line pairs, x1 is the horizontal coordinate value of the first type of intersection of the vertical line of the reference component and the first horizontal detection line, and is used to identify the position of the vertical line of the reference component; x2 is the horizontal coordinate value of the second type of intersection of the vertical line of the corresponding component to be installed and the second horizontal detection line, and is used to identify the position of the vertical line of the component to be installed.

[0210] The third point set can be fitted using the least square method to obtain the third straight line equation x2=k3*x1+b3. The independent variable x1 is taken as the horizontal coordinate value of the image center of the second image, and the corresponding dependent variable x2 value is obtained according to the third straight line equation, and then the first pixel distance is obtained according to (x2-x1).

[0211] In one embodiment, step S570 calculates the second actual distance between the lower edge horizontal line of the reference component and the upper edge horizontal line of the component to be installed according to the second image, including:

[0212] Step S571 calculates the pixel distance y1 from the center of the image to the lower edge horizontal line of the reference component in the second image, and the pixel distance y2 from the center of the image to the upper edge horizontal line of the component to be installed;

[0213] Step S572: obtaining a first proportional relationship r1 between the pixel distance and the actual distance in the range of the reference component, and a second proportional relationship r2 between the pixel distance and the actual distance in the range of the component to be installed;

[0214] Step S573: Multiply the pixel distance 1 y1 by the first proportional relationship r1 to obtain the corresponding actual distance 1; multiply the pixel distance 2 y2 by the second proportional relationship r2 to obtain the corresponding actual distance 2;

[0215] Step S574 obtains a second actual distance according to the actual distance one and the actual distance two.

[0216] In one embodiment, obtaining the first proportional relationship r1 between the pixel distance and the actual distance of the reference component range in the second image in step S572 includes:

[0217] According to the position of each second-class vertical line of the reference component in the second image, the distance between the adjacent second-class vertical lines in the reference component range is calculated; according to the distance between all adjacent second-class vertical lines in the reference component range, the pixel length of a battery unit in the reference component range in the second image is obtained; for example, the distance between all adjacent second-class vertical lines is averaged, and the average is used as the pixel length of the battery unit in the reference component range. According to the pixel length and actual length of a battery unit in the reference component range, a first proportional relationship r1 between the pixel distance and the actual distance in the reference component range is obtained.

[0218] The second proportional relationship r2 between the pixel distance and the actual distance of the range of the component to be installed is obtained in step S572, including:

[0219] According to the positions of the second-class vertical lines of the components to be installed in the second image, the distances between the adjacent second-class vertical lines in the range of the components to be installed are calculated; according to the distances between all the adjacent second-class vertical lines in the range of the components to be installed, the pixel length of a battery unit in the range of the components to be installed in the second image is obtained; for example, the distances between all the adjacent second-class vertical lines are averaged, and the average is used as the pixel length of the battery unit in the range of the components to be installed. According to the pixel length and actual length of a battery unit in the range of the components to be installed, a second proportional relationship r2 between the pixel distance and the actual distance in the range of the components to be installed is obtained.

[0220] One embodiment of the present invention, as Figure 2 As shown, a component installation robot 10 includes:

[0221] A robotic arm 400 for grabbing, moving and adjusting components to be installed;

[0222] A camera 500, located at the end of the robotic arm, is used to obtain an image containing the reference component and the component to be installed;

[0223] A memory 100, for storing a computer program 200;

[0224] The processor 300 is configured to implement the photovoltaic assembly installation method based on surface straight line features of any of the aforementioned embodiments when running the computer program 200.

[0225] The memory 100 may be any internal storage unit and / or external storage device capable of storing data and programs, for example, a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, or a flash memory card.

[0226] As needed, the processor 300 may be a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a general purpose processor or other logic devices, etc.

[0227] It should be noted that the above embodiments can be freely combined as needed. The above are only preferred embodiments of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention.

Claims

1. A photovoltaic module installation method based on surface straight line features, used for a module installation robot, the module installation robot comprising a mechanical arm and a camera located at the end of the mechanical arm, characterized in that: include: Grab the component to be installed by the mechanical arm, move it to a fine-tuning position and hover it, wherein the fine-tuning position is located above the installation position of the component to be installed and is a first preset distance away from the installation position; Acquiring a first image including a reference component and the component to be installed by the camera; the reference component is a photovoltaic component that has been installed in place before the component to be installed; Calculating an average angle between the reference component in the first image and a horizontal straight line formed by connecting lines between a plurality of battery cells on the component to be installed, and performing a first fine-tuning process on the component to be installed according to the average angle so that the reference component is parallel to the horizontal straight line of the component to be installed; Acquire, by the camera, a second image including the reference component and the component to be installed after the first fine-tuning process; Calculating, based on the second image, a first actual distance between the reference component and a vertical line formed by connecting lines between a plurality of battery cells on the corresponding component to be installed, and a second actual distance between a horizontal line at a lower edge of the reference component and a horizontal line at an upper edge of the component to be installed; According to the first actual distance, the component to be installed is translated along the horizontal and straight line direction, so that the vertical line of the reference component is aligned with the vertical line of the corresponding component to be installed; According to the second actual distance, the component to be installed is translated along the vertical direction, so that a second preset distance is maintained between the reference component and the component to be installed; Pressing down the component to be installed to the installation position; The step of calculating the average angle between the horizontal line of the reference component and the horizontal line of the component to be installed in the first image includes: Performing an opening operation on the first image, and then using a Hough detection algorithm to extract edge horizontal straight lines of two components in the first image; Obtaining an intersection point of the edge horizontal straight line and a first vertical detection line, where the first vertical detection line is a straight line located at the center of the first image and parallel to the Y axis; Clustering the edge horizontal straight lines according to the ordinates of the intersection points to obtain a plurality of clusters, and using the midpoint value of each cluster to identify the position of the corresponding edge horizontal straight line; Calculate the middle value of the uppermost and lowermost clusters, the edge horizontal straight line to which the cluster located above the middle value belongs is the edge horizontal straight line of the reference component, and the edge horizontal straight line to which the cluster located below the middle value belongs is the edge horizontal straight line of the component to be installed, thereby determining the edges of the reference component and the component to be installed in the first image; distinguishing the reference component and the component to be installed in the first image according to the edge; calculating an average inclination angle of a horizontal line of the reference component in the first image; Calculating an average inclination angle of a horizontal line of the component to be installed in the first image; Obtaining an average angle between the horizontal line of the reference component and the horizontal line of the component to be installed according to an average inclination angle of the horizontal line of the reference component and an average inclination angle of the horizontal line of the component to be installed; The calculating the average inclination angle of the horizontal line of the reference component in the first image comprises: Using the Hough detection algorithm to extract all the horizontal and straight lines of the reference component in the first image, and obtaining the inclination angle of each of the horizontal and straight lines; Obtaining an intersection point of the horizontal straight line and the first vertical detection line; Clustering the horizontal and straight lines according to the vertical coordinates of the intersection points to obtain a number of clusters; Performing median filtering on the inclination angles of the horizontal lines to which each of the clusters belongs, and constructing a first point set using the inclination angles of the horizontal lines remaining after filtering and the ordinates of the intersections of the horizontal lines and the first vertical detection line; the abscissa of each point in the first point set is the ordinate value of the intersection of each horizontal line remaining after median filtering and the first vertical detection line, and the ordinate is the inclination angle of each horizontal line remaining after median filtering; The first point set is fitted to obtain a first straight line equation; the average inclination angle of all the horizontal lines of the reference component is equal to the intercept b1 of the first straight line equation.

2. A photovoltaic module installation method based on surface straight line features according to claim 1, characterized in that: Calculating an average inclination angle of a horizontal line of the component to be installed in the first image includes: Using the Hough detection algorithm to extract the horizontal and straight lines of the components to be installed in the first image, and obtaining the inclination angle of each of the horizontal and straight lines; Obtaining an intersection point of the horizontal straight line and the first vertical detection line; Clustering the horizontal and straight lines according to the vertical coordinates of the intersection points to obtain a number of clusters; Performing median filtering on the inclination angles of the horizontal lines in each of the clusters, and constructing a second point set using the inclination angles of the horizontal lines remaining after filtering and the ordinates of the intersections of the horizontal lines and the first vertical detection line; the abscissa of each point in the second point set is the ordinate value of the intersection of each horizontal line remaining after median filtering and the first vertical detection line, and the ordinate is the inclination angle of each horizontal line remaining after median filtering; Fitting the second point set with a second straight line equation, wherein the slope of the second straight line equation is equal to the slope of the first straight line equation, comprises: Substituting each point in the second point set into the second straight line equation to obtain the corresponding intercept value of the second straight line equation; averaging all the obtained intercept values, and taking the average of the intercept values ​​as the intercept of the second straight line equation; The average inclination angle of all the horizontal straight lines of the component to be installed is equal to the intercept b2 of the second straight line equation.

3. A photovoltaic module installation method based on surface straight line features according to claim 1, characterized in that: Calculating a first actual distance between a vertical line of the reference component and a vertical line of the corresponding component to be installed according to the second image includes: Determine the edges of the reference component and the component to be installed in the second image, as well as a horizontal straight line of a lower edge of the reference component and a horizontal straight line of an upper edge of the component to be installed; Distinguishing the reference component and the component to be installed in the second image according to the edge, and determining a range of the reference component and a range of the component to be installed; Extracting a vertical line of a reference component and a vertical line of a corresponding component to be installed from the second image as an upper component reference line and a lower component reference line, respectively; Extracting, from the second image, a vertical line of the reference component and a vertical line of the component to be installed, except for the reference lines of the upper component and the lower component; The position of the corresponding vertical line is identified by the horizontal coordinate value of the first type of intersection point between the first horizontal detection line and the vertical line of the reference component, and the position of the corresponding vertical line is identified by the horizontal coordinate value of the second type of intersection point between the second horizontal detection line and the vertical line of the component to be installed; the first horizontal detection line is a straight line located in the range of the reference component and parallel to the X-axis, and the second horizontal detection line is a straight line located in the range of the component to be installed and parallel to the X-axis; Calculate the relative position of the vertical line of the reference component to the upper component reference line, and the relative position of the vertical line of the component to be installed to the lower component reference line; match the vertical line of the reference component with the vertical line of the component to be installed that have the same relative position to form a vertical line pair; Obtaining a first pixel distance between the vertical line of the reference component and the corresponding vertical line of the component to be installed according to the positions of two vertical lines among all vertical line pairs; Obtaining a second proportional relationship r2 between the pixel distance and the actual distance of the range of the component to be installed in the second image; The first pixel distance is multiplied by the second proportional relationship r2 to obtain the first actual distance.

4. A photovoltaic module installation method based on surface straight line features according to claim 3, characterized in that: Extracting a vertical line of a reference component and a vertical line of a corresponding component to be installed from the second image as an upper component reference line and a lower component reference line, respectively, including: The second image includes a first-type vertical line and a plurality of second-type vertical lines, and the width of the first-type vertical line is greater than that of the second-type vertical line; An opening operation is first performed on the second image, and then the first type of vertical line is extracted using the Hough detection algorithm. The first type of vertical line located in the range of the reference component is used as the upper component reference line, and the first type of vertical line located in the range of the component to be installed is used as the lower component reference line.

5. A photovoltaic module installation method based on surface straight line features according to claim 4, characterized in that: The method of using the horizontal coordinate value of the first type of intersection point between the first horizontal detection line and the vertical line of the reference component to identify the position of the corresponding vertical line includes: Select a first horizontal detection line located at the center of the reference component range, and obtain a first type of intersection point between the upper component reference line and the first horizontal detection line; Clustering the horizontal coordinates of the first type of intersections to obtain a plurality of clusters; obtaining the midpoint value of each cluster, averaging the midpoint values ​​of all clusters, and using the obtained average value as the position identifier of the upper component reference line; The method of using the horizontal coordinate value of the second type of intersection point between the second horizontal detection line and the vertical line of the component to be installed to identify the position of the corresponding vertical line includes: Select a second horizontal detection line located at the center of the range of the component to be installed, and obtain a second type of intersection point between the lower component reference line and the second horizontal detection line; Clustering the horizontal coordinates of the second type of intersections to obtain a number of clusters; obtaining the midpoint value of each cluster, averaging the midpoint values ​​of all clusters, and using the obtained average value as the position identifier of the lower component reference line.

6. A photovoltaic module installation method based on surface straight line features according to claim 5, characterized in that: Extracting a vertical line of the reference component and a vertical line of the component to be installed other than the upper component and the lower component reference lines from the second image includes: Using a Hough detection algorithm to extract the second type of vertical lines of the reference component and the second type of vertical lines of the component to be installed in the second image; The method of using the horizontal coordinate value of the first type of intersection point between the first horizontal detection line and the vertical line of the reference component to identify the position of the corresponding vertical line includes: Acquire a first type of intersection point between a second type of vertical line of the reference component and the first type of horizontal detection line; Clustering the second type of vertical lines of the reference component according to the horizontal coordinates of the first type of intersection points to obtain a plurality of clusters, and using the midpoint value of each cluster as the position identifier of the corresponding second type of vertical line of the reference component; The method of using the horizontal coordinate value of the second type of intersection point between the second horizontal detection line and the vertical line of the component to be installed to identify the position of the corresponding vertical line includes: Obtaining a second type of intersection point between the second type of vertical line of the component to be installed and the second horizontal detection line; The second type of vertical lines of the components to be installed are clustered according to the horizontal coordinates of the second type of intersections to obtain a plurality of clusters, and the midpoint value of each cluster is used as the position identifier of the corresponding second type of vertical line of the components to be installed.

7. A photovoltaic module installation method based on surface straight line features according to claim 3, characterized in that: Obtaining a first pixel distance between a vertical line of the reference component and a corresponding vertical line of the component to be installed according to positions of two vertical lines among all vertical line pairs, comprising: Construct a third point set, wherein the points of the third point set correspond to the vertical line pairs one by one, and the abscissa value of each point of the third point set is the abscissa value of the first type of intersection point, and the ordinate value is the abscissa value of the second type of intersection point; Fitting the third point set to obtain a third straight line equation, wherein the independent variable of the third straight line equation is the position of the vertical line of the reference component in the vertical line pair, and the dependent variable is the position of the corresponding vertical line of the component to be installed; The value of the dependent variable corresponding to the horizontal coordinate value of the image center of the second image is obtained according to the third straight line equation, and the first pixel distance is obtained by subtracting the value of the independent variable from the value of the dependent variable.

8. The photovoltaic module installation method based on surface straight line features according to claim 4, characterized in that: Calculating a second actual distance between a lower edge horizontal line of the reference component and an upper edge horizontal line of the component to be installed according to the second image includes: Calculate the pixel distance y1 from the center of the image in the second image to the horizontal line at the lower edge of the reference component, and the pixel distance y2 from the center of the image to the horizontal line at the upper edge of the component to be installed; Obtaining a first proportional relationship r1 between the pixel distance and the actual distance of the reference component range, and a second proportional relationship r2 between the pixel distance and the actual distance of the component to be installed range; Multiplying the pixel distance y1 by the first proportional relationship r1 to obtain the corresponding actual distance 1; Multiply the pixel distance y2 by the second proportional relationship r2 to obtain the corresponding actual distance 2; The second actual distance is obtained according to the actual distance one and the actual distance two.

9. A photovoltaic module installation method based on surface straight line features according to claim 8, characterized in that: The first proportional relationship r1 between the pixel distance and the actual distance of the reference component range is obtained by: Calculating the distance between adjacent second-type vertical lines within the range of the reference component according to the position of each second-type vertical line of the reference component in the second image; Obtaining a pixel length of a battery cell in the reference component range in the second image according to the distances between all adjacent second-type vertical lines in the reference component range; According to the pixel length and the actual length of a battery unit in the reference component range, a first proportional relationship r1 between the pixel distance and the actual distance in the reference component range is obtained; The step of obtaining a second proportional relationship r2 between the pixel distance and the actual distance of the range of the component to be installed includes: Calculating the distance between adjacent second-type vertical lines in the range of the component to be installed according to the position of each second-type vertical line of the component to be installed in the second image; Obtaining the pixel length of a battery cell in the range of the components to be installed in the second image according to the distances between all adjacent second-type vertical lines in the range of the components to be installed; According to the pixel length and the actual length of a battery unit in the range of the component to be installed, a second proportional relationship r2 between the pixel distance and the actual distance in the range of the component to be installed is obtained.

10. A component installation robot, characterized in that: include: A robotic arm to grab, move and adjust components to be installed; a camera, located at the end of the robotic arm, for acquiring an image containing the reference component and the component to be installed; Memory for storing computer programs; A processor, configured to implement the photovoltaic component installation method based on surface straight line features as described in any one of claims 1 to 9 when running the computer program.

Citation Information

Patent Citations

  • Floor mounting method and robot

    CN110405773A

  • Installation method, device and installation system of photovoltaic module

    CN116455300A

  • Photovoltaic module installation method and module installation robot

    CN119036043A