A method and system for elastic correction and splicing of line scan photovoltaic module images
By pre-positioning, pre-correcting and key point information processing of photovoltaic module images, the mapping correction matrix is generated, which solves the problem of poor correction and splicing effects in photovoltaic module image stitching, and achieves high-quality and efficient splicing.
Patent Information
- Application Number
- CN202310794634.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2043-06-30
AI Technical Summary
There are problems in the existing photovoltaic module image stitching technology, which has poor image correction and stitching effect and low accuracy.
By obtaining the image of the photovoltaic module to be stitched, pre-positioning and pre-correcting, determining the boundary corner points and key point information, generating a mapping matrix for image correction, and mapping correction and stitching of the images.
Effectively remove image distortion, improve splicing accuracy and quality, and improve splicing speed, which is suitable for large-scale promotion.
Smart Images

Figure CN116862767B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic module image splicing, and in particular to an elastic correction and splicing method and system for line-scanning photovoltaic module images. Background Art
[0002] With the rapid development of computer technology and the photovoltaic industry in recent years, visual methods are used to detect defects in photovoltaic modules before they leave the factory to determine the price of the module and whether rework is required. Since the modules are usually large, a single camera cannot capture the entire module. Multiple cameras are required to capture the entire module at the same time, and the images captured by multiple cameras are stitched together to form a complete module. At present, it is difficult to eliminate the problems of image distortion, poor stitching quality, unstable stitching, and slow stitching speed in the image stitching technology for photovoltaic modules.
[0003] In the related technology, the main method is to use a multi-camera or multiple-time photographing of the photovoltaic module image to be spliced by a planar array camera to obtain multiple images to be spliced; use the distortion parameters of the camera to correct the distortion of the photographed image, and perform preprocessing to obtain a binary image containing the border information of the photovoltaic module to be spliced; perform straight line detection on the binary image, and mark the detected straight lines in the photovoltaic module image to be spliced; solve the intersection of each straight line to obtain the image correction key points and image splicing key points; perform projection transformation on the original photovoltaic module image to obtain a photovoltaic module image of standard size. Perform image registration based on control points, establish a corresponding image splicing transformation model; sequentially perform image splicing on the photovoltaic module images of standard size to obtain an ideal spliced image to achieve image splicing. However, in actual application, it was found that the above method directly performs straight line detection on the binary image. When there are many straight lines in the photovoltaic module image, the wrong boundary may be detected, which will lead to image correction errors and cause the final stitching image to have low stitching accuracy. Secondly, each camera needs to be calibrated, which is more complicated and the calibration result directly affects the final stitching effect. Finally, for photovoltaic modules with larger sizes, multiple groups of cameras are required to shoot multiple times at the same time, which leads to slow stitching speed and poor image quality consistency. Summary of the invention
[0004] Therefore, the technical problem to be solved by the present invention is to overcome the problems of poor image correction and splicing effect and low precision in the prior art.
[0005] In order to solve the above technical problems, the present invention provides a method for elastic correction and splicing of line scan photovoltaic module images, comprising:
[0006] Step S1: Acquire the image of the photovoltaic module to be spliced;
[0007] Step S2: pre-positioning the photovoltaic assembly images to be spliced, obtaining boundary position information of the photovoltaic assembly, and determining boundary corner points;
[0008] Step S3: pre-correcting the image of the photovoltaic module to be spliced based on the determined boundary corner points;
[0009] Step S4: locating all key point information of the photovoltaic module image according to the layout information of the photovoltaic module;
[0010] Step S5: Generate target control point information to be corrected based on all key point information;
[0011] Step S6: generating a mapping matrix for image correction according to the key point information and the target correction control point information;
[0012] Step S7: mapping and correcting the photovoltaic module images according to the mapping matrix, and splicing the corrected photovoltaic module images.
[0013] In one embodiment of the present invention, the photovoltaic module image in step S1 is obtained by taking pictures with a line scan camera.
[0014] In one embodiment of the present invention, in step S3, based on the determined boundary corner points, the image of the photovoltaic assembly to be spliced is pre-corrected, and the method includes:
[0015] The image of the photovoltaic module to be spliced is pre-corrected by perspective transformation, and the formula is:
[0016]
[0017] in, is the perspective transformation matrix, (x, y, 1) is the pixel coordinate of the original image, and (X, Y, Z) is the point position after perspective transformation;
[0018] Then convert the three-dimensional (X, Y, Z) to two-dimensional, the formula is: x'=X / Z, y'=Y / Z, where x', y' are the image pixel coordinates after transformation.
[0019] In one embodiment of the present invention, all key point information of the photovoltaic module image in step S4 includes: corner points of cells on the non-joined side and the joined side of the photovoltaic module image, and adjacent points between cells as key point information.
[0020] In one embodiment of the present invention, in step S5, target control point information to be corrected is generated according to all key point information, and the method includes: generating size information of a single cell in the photovoltaic module image according to all key point information, and using the size information of the cell as the target control point information to be corrected.
[0021] In one embodiment of the present invention, in step S6, a mapping matrix for image correction is generated according to the key point information and the target correction control point information, and the formula is:
[0022] dst1(x,y)=src(map_x(x,y),map_y(x,y))
[0023]
[0024]
[0025] Among them, dst1 is the corrected image, src is the image before correction, map_x and map_y are the mapping matrices in the x and y directions generated by the key point information. To generate the x-direction correction coefficient based on the key point information and the target correction control point information, Generate the y-direction correction coefficient based on the key point information and the target correction control point information.
[0026] In one embodiment of the present invention, when stitching the corrected photovoltaic module images in step S7, the step further includes fusing the spliced portions of the photovoltaic module images, and the formula is:
[0027]
[0028] Among them, src1 is the first photovoltaic module image to be spliced, src2 is the second photovoltaic module image to be spliced, w is the fusion width of src1 and src2, and dst2 is the fused image. is the fusion weight of the first photovoltaic module image to be spliced, is the fusion weight of the second photovoltaic assembly image to be spliced.
[0029] In order to solve the above technical problems, the present invention provides an elastic correction and splicing system for line-scanning photovoltaic module images, comprising:
[0030] Acquisition module: used to acquire images of photovoltaic modules to be spliced;
[0031] Pre-positioning module: used for pre-positioning the image of the photovoltaic module to be spliced, obtaining the boundary position information of the photovoltaic module, and determining the boundary corner point;
[0032] Pre-correction module: used to pre-correct the image of the photovoltaic module to be spliced based on the determined boundary corner points;
[0033] Positioning module: used to locate all key point information of the photovoltaic module image according to the layout information of the photovoltaic module;
[0034] Generation module: used to generate target control point information to be corrected based on all key point information;
[0035] Matrix construction module: used to generate a mapping matrix for image correction according to the key point information and target correction control point information;
[0036] Stitching module: used for mapping and correcting the photovoltaic module images according to the mapping matrix, and stitching the corrected photovoltaic module images.
[0037] In order to solve the above technical problems, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the elastic correction and splicing method of the line scan photovoltaic component image as described above are implemented.
[0038] In order to solve the above technical problems, the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the elastic correction and splicing method of the line scan photovoltaic component image as mentioned above are implemented.
[0039] The above technical solution of the present invention has the following advantages compared with the prior art:
[0040] The present invention can effectively remove the influence of image distortion in subsequent image stitching by performing pre-positioning and pre-correction operations on the photovoltaic module image, thereby ensuring high-quality image stitching;
[0041] The present invention also performs fusion and smoothing processing on the spliced photovoltaic module images to ensure the delicate connection at the straight line splicing, effectively improving the image splicing quality;
[0042] The present invention uses a line scan camera instead of an area array camera, reducing the number of photographing times to 2, thereby increasing the speed of stitching, which is beneficial to increasing the production capacity of the factory and reducing the transformation cost of the factory;
[0043] The present invention has good splicing effect and high splicing stability, strong practicability, small changes to industrial on-site assembly lines, low cost, is beneficial to factory cost reduction and efficiency improvement, and is suitable for large-scale promotion. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to make the contents of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments of the present invention in conjunction with the accompanying drawings.
[0045] Figure 1 is a flow chart of the method of the present invention;
[0046] Figure 2 This is the result of stitching the photovoltaic module images using the common stitching method by the line scan camera;
[0047] Figure 3 is a result diagram of elastically stitching the photovoltaic module images in an embodiment of the present invention;
[0048] Figure 4 It is a schematic diagram of the type information of the photovoltaic module in the embodiment of the present invention. DETAILED DESCRIPTION
[0049] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0050] Embodiment 1
[0051] Reference Figure 1 As shown, the present invention relates to a method for elastic correction and splicing of line scan photovoltaic assembly images, comprising:
[0052] Step S1: obtaining an image of a photovoltaic module to be spliced (i.e., a picture of a photovoltaic module);
[0053] Step S2: pre-positioning the photovoltaic assembly images to be spliced, obtaining boundary position information of the photovoltaic assembly, and determining boundary corner points;
[0054] Step S3: pre-correcting the image of the photovoltaic module to be spliced based on the determined boundary corner points;
[0055] Step S4: locating all key point information of the photovoltaic module image according to the layout information of the photovoltaic module;
[0056] Step S5: Generate target control point information to be corrected based on all key point information;
[0057] Step S6: generating a mapping matrix for image correction according to the key point information and the target correction control point information;
[0058] Step S7: mapping and correcting the photovoltaic module images according to the mapping matrix, and splicing the corrected photovoltaic module images.
[0059] The following is a detailed introduction to this embodiment:
[0060] Furthermore, the photovoltaic module image in step S1 is obtained by taking a line scan camera (i.e., a line array camera). Line scan imaging uses a single row of sensor pixels (effective value is one-dimensional) to construct a two-dimensional image. Line scan cameras usually provide higher resolution at a lower cost than area array cameras, without redundant processing of image tailing or frame overlap. The advantages of line scan cameras are simple structure, low cost, high flexibility, and wide dynamic range. They are suitable for industrial inspection. Since the sensor of a line scan camera is composed of only one row of photosensitive elements, it can perform high-frequency scanning.
[0061] Furthermore, the present invention uses a line scan camera instead of an area array camera, which can reduce the number of photographs to 2. The reasons are: first, the size of existing photovoltaic modules is usually large, and a single area array camera cannot capture the whole thing; second, photovoltaic modules have high imaging quality requirements and strict requirements on lenses and cameras, and usually a single camera cannot meet the pixel requirements.
[0062] Furthermore, in step S2, the photovoltaic module images to be spliced are pre-positioned to obtain the boundary position information of the photovoltaic modules and determine the boundary corner points. The purpose of determining the boundary points of the photovoltaic module images in this embodiment is to determine the approximate splicing position of the photovoltaic module images.
[0063] by Figure 4 For example, Figure 4 The left and right photovoltaic module images to be spliced include four boundary corner points. In short, the left and right photovoltaic module images to be spliced each include four boundary corner points.
[0064] Furthermore, in step S3, based on the determined boundary corner points, the photovoltaic assembly image to be spliced is pre-corrected, and the method includes: pre-correcting the line segments corresponding to each cell in the photovoltaic assembly image to be spliced by perspective transformation (a process of converting from two-dimensional to three-dimensional, and then to two-dimensional), and the formula is:
[0065]
[0066] in, is the perspective transformation matrix, (x, y, 1) is the pixel coordinate of the original image, (X, Y, Z) is the point after transformation, and then the three-dimensional (X, Y, Z) is converted to two-dimensional. The formula is: x'=X / Z, y'=Y / Z, where x', y' are the pixel coordinates of the image after transformation.
[0067] The purpose of the perspective transformation in this embodiment is to straighten the possible beveled edges of each battery cell to prevent distortion during subsequent splicing.
[0068] Furthermore, all key point information of the photovoltaic module image in step S4 includes: corner points of the cells in the non-joined side of the photovoltaic module image, and adjacent points between the cells as key point information.
[0069] by Figure 4 For example, Figure 4 The photovoltaic module image to be spliced includes two left and right photovoltaic module images. In this embodiment, the photovoltaic module layout information is specifically as follows: each photovoltaic module image includes multiple columns of cells (each column consists of 22 cells). Therefore, Figure 4 The left side (i.e., the non-joined side) of the photovoltaic module image (taking the left image as an example) has 23 key point information (including 2 cell corner points and 21 cell-to-cell adjacent points). Figure 4 The right side (i.e. the splicing side) of the photovoltaic module image (taking the left image as an example) also has 23 key point information, a total of 46 key point information. Figure 4 The right image of the photovoltaic module image in the middle also has 46 key point information in total. In other embodiments, the layout information of the photovoltaic module is different.
[0070] Furthermore, in step S5, target control point information to be corrected is generated according to all key point information. The method includes: generating size information of a single cell in the photovoltaic module image according to all key point information, and using the size information of the cell as target control point information to be corrected.
[0071] Furthermore, in step S6, a mapping matrix for image correction is generated according to the key point information and the target correction control point information, and the formula is:
[0072] dst1(x,y)=src(map_x(x,y),map_y(x,y))
[0073]
[0074]
[0075] Among them, dst1 is the corrected image, src is the image before correction, map_x and map_y are the mapping matrices in the x and y directions generated by the key point information. To generate the x-direction correction coefficient based on the key point information and the target correction control point information, Generate the y-direction correction coefficient based on the key point information and the target correction control point information.
[0076] It should be noted that Figure 4 For example, the left and right photovoltaic module images both include 46 key point information, and the left and right photovoltaic module images can generate mapping matrices (i.e., map_x and map_y). Figure 4 The left / right photovoltaic module images in the image are adjusted to solve the problem of compression and stretching of the solar cells during the shooting process.
[0077] As is known to all, there are usually many straight lines (boundaries of solar cells) in photovoltaic module images. Traditional methods often detect wrong boundaries, which leads to image correction errors and low stitching accuracy in the final stitched image. However, this embodiment can effectively remove the influence of image distortion in subsequent image stitching by performing pre-positioning and pre-correction operations on photovoltaic module images, thereby ensuring high-quality image stitching.
[0078] Furthermore, when stitching the corrected photovoltaic module images in step S7, the stitching of the photovoltaic module images is also fused (i.e., smoothed), so that the stitching is more delicate. The formula is:
[0079]
[0080] Among them, src1 is the first photovoltaic module image to be spliced, src2 is the second photovoltaic module image to be spliced, w is the fusion width of src1 and src2, and dst2 is the fused image. is the fusion weight of the first photovoltaic module image to be spliced, is the fusion weight of the second photovoltaic assembly image to be spliced.
[0081] See also Figure 2 and Figure 3 , Figure 2 and Figure 3 Each includes two PV panel images to be spliced. Figure 2 It is the result of stitching the photovoltaic module images by the line scan camera using the common stitching method. Figure 3 This is the elastic correction splicing result of the present invention. Figure 2 Although the top and bottom are aligned during the splicing process, there is a problem of misalignment in the middle (the reason is the fluctuation of the movement speed of the photovoltaic modules on the assembly line). Figure 3 The top and bottom and the middle of the photovoltaic module image are all aligned, that is, the splicing stability is high. It can be seen that the present invention has a good effect on the splicing of photovoltaic module images and is suitable for large-scale promotion.
[0082] Embodiment 2
[0083] This embodiment provides an elastic correction and splicing system for line scan photovoltaic module images, including:
[0084] Acquisition module: used to acquire images of photovoltaic modules to be spliced;
[0085] Pre-positioning module: used for pre-positioning the image of the photovoltaic module to be spliced, obtaining the boundary position information of the photovoltaic module, and determining the boundary corner point;
[0086] Pre-correction module: used to pre-correct the image of the photovoltaic module to be spliced based on the determined boundary corner points;
[0087] Positioning module: used to locate all key point information of the photovoltaic module image according to the layout information of the photovoltaic module;
[0088] Generation module: used to generate target control point information to be corrected based on all key point information;
[0089] Matrix construction module: used to generate a mapping matrix for image correction according to the key point information and target correction control point information;
[0090] Stitching module: used for mapping and correcting the photovoltaic module images according to the mapping matrix, and stitching the corrected photovoltaic module images.
[0091] Embodiment 3
[0092] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the elastic correction and splicing method of the line scan photovoltaic assembly image described in the first embodiment are implemented.
[0093] Embodiment 4
[0094] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the elastic correction and splicing method of the line scan photovoltaic assembly image described in the first embodiment are implemented.
[0095] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0096] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0097] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0098] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0099] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0100] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.
Claims
1. A method for elastic correction and splicing of line scan photovoltaic module images, characterized in that: include: Step S1: acquiring an image of the photovoltaic components to be spliced taken by a line scan camera; Step S2: pre-positioning the photovoltaic assembly images to be spliced, obtaining boundary position information of the photovoltaic assembly, and determining boundary corner points; Step S3: pre-correcting the image of the photovoltaic module to be spliced based on the determined boundary corner points; Step S4: locating all key point information of the photovoltaic module image according to the layout information of the photovoltaic module, the key point information including: taking the corner points of the cells on the non-joined side and the joined side of the photovoltaic module image, and the adjacent points between the cells as key point information; Step S5: Generate the size information of a single cell in the photovoltaic module image according to all key point information, and use the size information of the cell as the target control point information to be corrected; Step S6: Generate a mapping matrix for image correction according to the key point information and the target correction control point information, the formula is: ; ; ; in, is the rectified image, is the image before correction, and Generated by key point information Direction and The mapping matrix of the direction, To generate control point information based on key point information and target correction Direction correction factor, To generate control point information based on key point information and target correction Direction correction coefficient; Step S7: mapping and correcting the photovoltaic module images according to the mapping matrix, and splicing the corrected photovoltaic module images. During the splicing, the splicing of the photovoltaic module images is also performed. The formula is: ; in, is the first photovoltaic module image to be spliced, is the second photovoltaic module image to be spliced, for and Fusion width, is the fused image, is the fusion weight of the first photovoltaic module image to be spliced, is the fusion weight of the second photovoltaic assembly image to be spliced.
2. The elastic correction and splicing method of line scan photovoltaic module images according to claim 1 is characterized by: In step S3, based on the determined boundary corner points, the image of the photovoltaic assembly to be spliced is pre-corrected, and the method includes: The image of the photovoltaic module to be spliced is pre-corrected by perspective transformation, and the formula is: ; in, is the perspective transformation matrix, is the pixel coordinate of the original image, is the point after perspective transformation; Then the three-dimensional Converted to two dimensions, the formula is: ,in, are the image pixel coordinates after transformation.
3. An elastic correction and splicing system for line scan photovoltaic module images, characterized by: include: Acquisition module: used to acquire the image of the photovoltaic module to be spliced taken by the line scan camera; Pre-positioning module: used for pre-positioning the image of the photovoltaic module to be spliced, obtaining the boundary position information of the photovoltaic module, and determining the boundary corner point; Pre-correction module: used to pre-correct the image of the photovoltaic module to be spliced based on the determined boundary corner points; Positioning module: used to locate all key point information of the photovoltaic module image according to the layout information of the photovoltaic module. The key point information includes: the corner points of the cells on the non-splicing side and the splicing side of the photovoltaic module image, and the adjacent points between the cells as key point information; Generation module: used to generate the size information of a single cell in the photovoltaic module image based on all key point information, and use the size information of the cell as the target control point information to be corrected; Matrix construction module: used to generate a mapping matrix for image correction according to the key point information and the target correction control point information, the formula is: ; ; ; in, is the rectified image, is the image before correction, and Generated by key point information Direction and The mapping matrix of the direction, To generate control point information based on key point information and target correction Direction correction factor, To generate control point information based on key point information and target correction Direction correction coefficient; The splicing module is used to perform mapping correction on the photovoltaic module image according to the mapping matrix, and to splice the corrected photovoltaic module images. During the splicing, the splicing parts of the photovoltaic module images are also fused. The formula is: ; in, is the first photovoltaic module image to be spliced, is the second photovoltaic module image to be spliced, for and Fusion width, is the fused image, is the fusion weight of the first photovoltaic module image to be spliced, is the fusion weight of the second photovoltaic assembly image to be spliced.
4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the elastic correction and splicing method of the line scan photovoltaic component image as described in any one of claims 1 to 2 are implemented.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the elastic correction and splicing method of line scan photovoltaic assembly images as described in any one of claims 1 to 2 are implemented.
Citation Information
Patent Citations
Bridge crack detection method
CN110378879A
Rapid splicing method and system for workpiece images with sparse feature points
CN111915485A
Delamination detection method and system for photovoltaic cell panel and control equipment
CN112184652A
Image splicing method and device, storage medium and electronic device
CN113344782A
Image splicing method and device of photovoltaic module, electronic device and storage medium
CN113393378A