Adaptive adjustment method and related system of line scan camera
By placing a test board with a calibration pattern on the quality inspection conveyor belt, using a line scan camera to scan and image the conveyor belt, adjusting the frequency doubling and frequency division of the line scan camera, the problem of the mismatch between the movement speed of the solar panel and the acquisition speed of the line scan camera is solved, and high-accuracy detection is achieved.
Patent Information
- Application Number
- CN202411874197.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-12-19
AI Technical Summary
During the production process, solar panels may have defects such as stains, nodes, scratches, etc., resulting in product quality being affected. The prior art is difficult to ensure that the movement speed of solar panels matches the acquisition speed of line scanning cameras, affecting detection accuracy.
By placing a test board on the quality inspection conveyor belt, there are circular or regular polygon calibration patterns on the test board, the conveyor belt is scanned and imaged with a line scan camera, the test image area is intercepted, and the test image area is converted into a grayscale map and binarized processing is performed, the calibration pattern external rectangle is generated, the correction ratio is calculated, and the frequency doubling and frequency division of the line scan camera is adjusted to achieve the matching of the movement speed of the solar panel and the acquisition speed of the line scan camera.
By automatically adjusting the frequency doubling and frequency division of the line scan camera, the synchronization of the movement speed of the solar panel and the acquisition speed of the line scan camera is achieved, improving detection accuracy and efficiency.
Smart Images

Figure CN119334958B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of industrial manufacturing, and in particular to an adaptive adjustment method and related system for a line scan camera used for detecting solar panels. Background Art
[0002] Solar panels are devices that can absorb sunlight and convert solar radiation energy directly or indirectly into electrical energy through photoelectric effect or photochemical effect. During the production process, the surface of solar panels may produce various defects such as stains, nodes, scratches, etc., which may seriously affect the quality of the product. Therefore, the industry generally uses machine vision technology to detect surface defects of solar panels.
[0003] Line scan cameras are core components used in machine vision technology. Line scan cameras are a special type of industrial camera, mainly used in industrial inspection, quality control, machine vision and other fields.
[0004] Line scan cameras generally only capture one line at a time (the line width is usually 1 pixel). As the object moves, the line scan camera continuously captures the lines, stitches them together line by line, and finally forms a two-dimensional image.
[0005] The principle of line scan cameras determines that the objects they photograph must be moving. When the solar panel to be inspected moves, there is a question of whether the movement speed matches the acquisition speed of the line scan camera. If the movement speed of the solar panel does not match the acquisition speed of the line scan camera, it is likely to affect the accuracy of the detection of surface defects of the solar panel. Therefore, how to match the movement speed of the solar panel with the acquisition speed of the camera is an important topic in this field. Summary of the invention
[0006] The embodiments of the present application provide an adaptive adjustment method and a related system for a line scan camera that can be used for solar panel detection, which is beneficial for adaptively improving the matching between the movement speed of the solar panel and the acquisition speed of the line scan camera.
[0007] In a first aspect, the present application provides an adaptive adjustment method of a line scan camera, wherein the line scan camera is used for surface defect detection of a solar panel, wherein the solar panel to be detected is carried on a quality inspection conveyor belt, and the quality inspection conveyor belt can drive the solar panel carried thereon to move, and the method comprises:
[0008] The inspection conveyor belt is controlled to drive the test board to move, and the line scan camera is controlled to scan and image the inspection conveyor belt in motion to obtain a scanned image P1. The test board is carried on the inspection conveyor belt. The solar panel carried on the inspection conveyor belt can have the same movement speed as the test board. The inspection conveyor belt is a motion mechanism for the line scan camera to perform scanning and imaging. The test board includes a circular or regular polygonal calibration pattern. The scanned image P1 includes a test image area Pc1, and the test area Pc1 is an image area formed by scanning and imaging the calibration pattern included in the test board.
[0009] Cut out the test image area Pc1 from the scanned image P1;
[0010] Convert the test image region gPc1 into a grayscale image Pc1;
[0011] Binarize the grayscale image gPc1 to obtain a binary image bPc1 of the calibration pattern;
[0012] Generate a calibration pattern circumscribed rectangle cr1 corresponding to the binarized image bPc1; calculate a correction ratio rcf1 based on the aspect ratio of the circumscribed rectangle cr1; and adjust the frequency multiplication and division of the line scan camera based on the correction ratio rcf1.
[0013] Optionally, the method further includes:
[0014] After adjusting the frequency multiplication and division of the line scan camera based on the correction ratio rcf1, an adjustment cycle timer is started;
[0015] When it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with adjusted frequency multiplication and division is controlled to scan and image the moving quality inspection conveyor belt again to obtain a scanned image P2, wherein the scanned image P2 includes a test image area Pc2, and the test area Pc2 is an image area formed by scanning and imaging the calibration image included in the test plate;
[0016] Cut out the test image area Pc2 from the scanned image P2;
[0017] Convert the test image region gPc2 into a grayscale image Pc2;
[0018] Binarize the grayscale image gPc2 to obtain a binary image bPc2 of the calibration pattern;
[0019] Generate a calibration pattern circumscribed rectangle cr2 corresponding to the binarized image bPc2; calculate a correction ratio rcf2 based on the aspect ratio of the circumscribed rectangle cr2; and adjust the frequency multiplication and division of the line scan camera again based on the correction ratio rcf2.
[0020] Optionally, the method further includes:
[0021] When the correction ratio rcf2 is greater than the correction ratio rcf1, the timing duration of the adjustment cycle timer is shortened from t1 to t2, and after the frequency multiplication and division of the line scan camera are adjusted again based on the correction ratio rcf2, the adjustment cycle timer is restarted;
[0022] When it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with adjusted frequency multiplication and division is controlled to scan and image the moving quality inspection conveyor belt again to obtain a scanned image P3, wherein the scanned image P3 includes a test image area Pc3, and the test area Pc3 is an image area formed by scanning and imaging the calibration image included in the test plate;
[0023] Cut out the test image area Pc3 from the scanned image P3;
[0024] Convert the test image region gPc3 into a grayscale image Pc3;
[0025] Binarize the grayscale image gPc3 to obtain a binary image bPc3 of the calibration pattern;
[0026] Generate a calibration pattern circumscribed rectangle cr3 corresponding to the binarized image bPc3; calculate a correction ratio rcf3 based on the aspect ratio of the circumscribed rectangle cr3; and adjust the frequency doubling and frequency division of the line scan camera again based on the correction ratio rcf3.
[0027] Optionally, the method further includes:
[0028] When the correction ratio rcf3 is less than the correction ratio rcf2, and the correction ratio rcf3 is greater than the allowable threshold, the timing duration of the adjustment cycle timer is shortened from t2 to t4, and after the frequency multiplication and division of the line scan camera are adjusted again based on the correction ratio rcf3, the adjustment cycle timer is restarted;
[0029] When it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with adjusted frequency multiplication and division is controlled to scan and image the moving quality inspection conveyor belt again to obtain a scanned image P4, wherein the scanned image P4 includes a test image area Pc4, and the test area Pc4 is an image area formed by scanning and imaging the calibration image included in the test plate;
[0030] Cut out the test image area Pc4 from the scanned image P4;
[0031] Convert the test image region gPc4 into a grayscale image Pc4;
[0032] Binarize the grayscale image gPc4 to obtain a binary image bPc4 of the calibration pattern;
[0033] Generate a calibration pattern circumscribed rectangle cr4 corresponding to the binarized image bPc4; calculate a correction ratio rcf4 based on the aspect ratio of the circumscribed rectangle cr4; and adjust the frequency multiplication and division of the line scan camera again based on the correction ratio rcf4.
[0034] Optionally, the correction ratio rcf2 is equal to the aspect ratio x` / y` of the circumscribed rectangle cr1, the width of the circumscribed rectangle cr1 is x1` and the height thereof is y1`;
[0035] Adjusting the frequency multiplication and division of the line scan camera based on the correction ratio rcf1 specifically includes:
[0036] Find the greatest common divisor of x` and y` z1`=gcd(x1`,y1`);
[0037] Calculate the target frequency multiplication x1=x1` / gcd(x1`,y1`) of the line scan camera; Calculate the target frequency division y1=y1` / gcd(x1`,y1`) of the line scan camera;
[0038] The current frequency multiplication of the line scan camera is adjusted to the target frequency multiplication x1, and the current frequency division of the line scan camera is adjusted to the target frequency division y1.
[0039] A second aspect of an embodiment of the present application provides an adaptive adjustment system for a line scan camera, comprising: a quality inspection conveyor belt, an adjustment controller and a line scan camera; the line scan camera is used for surface defect detection of solar panels, and the solar panels to be inspected are carried on the quality inspection conveyor belt, and the quality inspection conveyor belt can drive the solar panels it carries to move.
[0040] The regulating controller is used to perform the following operations:
[0041] Control the inspection conveyor belt to drive the test board to move together, and control the line scan camera to scan and image the inspection conveyor belt in motion to obtain a scanned image P1, the test board is carried on the inspection conveyor belt, the solar panel carried on the inspection conveyor belt can have the same movement speed as the test board, the inspection conveyor belt is a motion mechanism for the line scan camera to perform scanning and imaging, and the test board includes a circular or regular polygonal calibration pattern; wherein the scanned image P1 includes a test image area Pc1, and the test area Pc1 is an image area formed by scanning and imaging the calibration pattern included in the test board; the test image area Pc1 is cut out from the scanned image P1;
[0042] Convert the test image region gPc1 into a grayscale image Pc1;
[0043] Binarize the grayscale image gPc1 to obtain a binary image bPc1 of the calibration pattern;
[0044] Generate a calibration pattern circumscribed rectangle cr1 corresponding to the binarized image bPc1; calculate a correction ratio rcf1 based on the aspect ratio of the circumscribed rectangle cr1; and adjust the frequency multiplication and division of the line scan camera based on the correction ratio rcf1.
[0045] Optionally, the adjustment controller is further configured to perform the following operations:
[0046] After adjusting the frequency multiplication and division of the line scan camera based on the correction ratio rcf1, an adjustment cycle timer is started;
[0047] When it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with adjusted frequency multiplication and division is controlled to scan and image the moving quality inspection conveyor belt again to obtain a scanned image P2, wherein the scanned image P2 includes a test image area Pc2, and the test area Pc2 is an image area formed by scanning and imaging the calibration image included in the test plate;
[0048] Cut out the test image area Pc2 from the scanned image P2;
[0049] Convert the test image region gPc2 into a grayscale image Pc2;
[0050] Binarize the grayscale image gPc2 to obtain a binary image bPc2 of the calibration pattern;
[0051] Generate a calibration pattern circumscribed rectangle cr2 corresponding to the binarized image bPc2; calculate a correction ratio rcf2 based on the aspect ratio of the circumscribed rectangle cr2; and adjust the frequency multiplication and division of the line scan camera again based on the correction ratio rcf2.
[0052] Optionally, the adjustment controller is further configured to perform the following operations:
[0053] When the correction ratio rcf2 is greater than the correction ratio rcf1, the timing duration of the adjustment cycle timer is shortened from t1 to t2, and after the frequency multiplication and division of the line scan camera are adjusted again based on the correction ratio rcf2, the adjustment cycle timer is restarted;
[0054] When it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with adjusted frequency multiplication and division is controlled to scan and image the moving quality inspection conveyor belt again to obtain a scanned image P3, wherein the scanned image P3 includes a test image area Pc3, and the test area Pc3 is an image area formed by scanning and imaging the calibration image included in the test plate;
[0055] Cut out the test image area Pc3 from the scanned image P3;
[0056] Convert the test image region gPc3 into a grayscale image Pc3;
[0057] Binarize the grayscale image gPc3 to obtain a binary image bPc3;
[0058] Generate a calibration pattern circumscribed rectangle cr3 of the binarized image bPc3; calculate a correction ratio rcf3 based on the aspect ratio of the circumscribed rectangle cr3; and adjust the frequency doubling and frequency division of the line scan camera again based on the correction ratio rcf3.
[0059] Optionally, the adjustment controller is further configured to perform the following operations:
[0060] When the correction ratio rcf3 is less than the correction ratio rcf2, and the correction ratio rcf3 is greater than the allowable threshold, the timing duration of the adjustment cycle timer is shortened from t2 to t4, and after the frequency multiplication and division of the line scan camera are adjusted again based on the correction ratio rcf3, the adjustment cycle timer is restarted;
[0061] When it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with adjusted frequency multiplication and division is controlled to scan and image the moving quality inspection conveyor belt again to obtain a scanned image P4, wherein the scanned image P4 includes a test image area Pc4, and the test area Pc4 is an image area formed by scanning and imaging the calibration image included in the test plate;
[0062] Cut out the test image area Pc4 from the scanned image P4;
[0063] Convert the test image region gPc4 into a grayscale image Pc4;
[0064] Binarize the grayscale image gPc4 to obtain a binary image bPc4 of the calibration pattern;
[0065] Generate a calibration pattern circumscribed rectangle cr4 corresponding to the binarized image bPc4; calculate a correction ratio rcf4 based on the aspect ratio of the circumscribed rectangle cr4; and adjust the frequency multiplication and division of the line scan camera again based on the correction ratio rcf4.
[0066] Optionally, the correction ratio rcf2 is equal to the aspect ratio x` / y` of the circumscribed rectangle cr1, the width of the circumscribed rectangle cr1 is x1` and the height thereof is y1`;
[0067] Adjusting the frequency multiplication and division of the line scan camera based on the correction ratio rcf1 may specifically include:
[0068] Find the greatest common divisor of x` and y` z1`=gcd(x1`,y1`);
[0069] Calculate the target frequency multiplication x1=x1` / gcd(x1`,y1`) of the line scan camera; Calculate the target frequency division y1=y1` / gcd(x1`,y1`) of the line scan camera;
[0070] The current frequency multiplication of the line scan camera is adjusted to the target frequency multiplication x1, and the current frequency division of the line scan camera is adjusted to the target frequency division y1.
[0071] Accordingly, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program is used to implement part or all of the steps of any one of the methods provided in the embodiments of the present application.
[0072] Accordingly, the embodiment of the present application provides a computer program product, which includes computer instructions, which are stored in a computer-readable storage medium, and when the computer instructions are executed by a processor of a computer device, some or all of the steps of any method provided in the embodiment of the present application are executed. The computer program product can be a software installation package.
[0073] It can be seen that in the technical solution of the embodiment of the present application, the solar panel to be tested is carried on the quality inspection conveyor belt, and the quality inspection conveyor belt can drive the solar panel it carries to move, control the quality inspection conveyor belt to drive the test board to move, and control the line scan camera to scan and image the quality inspection conveyor belt in motion to obtain a scanned image P1, the test board is carried on the quality inspection conveyor belt, and the solar panel carried on the quality inspection conveyor belt can have the same movement speed as the test board, the quality inspection conveyor belt is a motion mechanism that the line scan camera needs to perform scanning and imaging, and the test board contains a circular or regular polygonal calibration pattern; the scanned image P1 contains a test image area Pc1, and the test area Pc1 is for the test board. The calibration pattern is scanned and imaged to form an image area; the test image area Pc1 is cut out from the scanned image P1; the test image area gPc1 is converted into a grayscale image Pc1; the grayscale image gPc1 is binarized to obtain a binarized image bPc1 of the calibration pattern; a circumscribed rectangle cr1 of the calibration pattern corresponding to the binarized image bPc1 is generated; a correction ratio rcf1 is calculated based on the aspect ratio of the circumscribed rectangle cr1; and the frequency doubling and frequency division of the line scan camera are adjusted based on the correction ratio rcf1. The above scheme can automatically realize the synchronization between the movement speed of the solar panel energy test and the acquisition speed of the line scan camera, which is conducive to adaptively improving the matching between the movement speed of the solar panel energy test and the acquisition speed of the line scan camera. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0075] Figure 1A It is a schematic diagram of the architecture of an adaptive adjustment system for a line scan camera provided as an example in an embodiment of the present application.
[0076] Figure 1B It is a schematic diagram of the architecture of another adaptive adjustment system for a line scan camera provided as an example in an embodiment of the present application.
[0077] Figure 1C Schematic diagram of the architecture of a solar panel defect detection system provided in an embodiment of the present application.
[0078] Figure 2 It is a schematic diagram of image stretching and compression provided as an example in an embodiment of the present application.
[0079] Figure 3 It is a schematic diagram of a calibration pattern provided as an example in an embodiment of the present application.
[0080] Figure 4 It is a schematic diagram of a test image area provided as an example in an embodiment of the present application.
[0081] Figure 5 It is a schematic diagram of a grayscale image provided as an example in an embodiment of the present application.
[0082] Figure 6 It is a schematic diagram of a binarized image provided as an example in an embodiment of the present application.
[0083] Figure 7 It is a schematic diagram of a circumscribed rectangle provided as an example in an embodiment of the present application.
[0084] Figure 8 It is a schematic diagram of an unstretched and uncompressed image provided in an embodiment of the present application.
[0085] Fig. 9 is a schematic diagram of a solar panel provided in an embodiment of the present application;
[0086] Fig.10 It is a schematic diagram of a quality inspection conveyor belt carrying a solar panel provided in an embodiment of the present application. DETAILED DESCRIPTION
[0087] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0088] The terms "first", "second" and the like in the specification and claims of this application and the above drawings are used to distinguish different objects rather than to describe a specific order.
[0089] In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0090] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0091] See also Figure 1A and Figure 1B , Figure 1A and Figure 1B Schematic diagram of the architecture of the adaptive adjustment system for two line scan cameras provided in the embodiments of the present application. Figure 1A The self-adaptive adjustment system of the line scan camera shown in the figure includes: a quality inspection conveyor belt, an adjustment controller and a line scan camera, and the quality inspection conveyor belt, the adjustment controller and the line scan camera are connected to each other through a network. The line scan camera is used for surface defect detection of solar panels. The solar panels to be detected are carried on the quality inspection conveyor belt, and the quality inspection conveyor belt can drive the solar panels it carries to move. Figure 1A The adaptive adjustment system of the line scan camera shown in the figure, Figure 1B The adaptive adjustment system of the line scan camera shown includes multiple line scan cameras, one of which can be called a main line scan camera, and the other line scan cameras can be called backup line scan cameras. The backup line scan camera has similar functions to the main line scan camera, and can be activated when the main line scan camera is deactivated. Of course, the backup line scan camera and the main line scan camera may also be activated at the same time.
[0092] See also Figure 1C , Figure 1C A schematic diagram of the architecture of a solar panel defect detection system provided in an embodiment of the present application. Figure 1C The solar panel defect detection system shown includes a defect analysis server and an adaptive adjustment system of a line scan camera, wherein the defect analysis server and the adaptive adjustment system of the line scan camera are linked in communication. The scanned image obtained by the line scan camera can be transmitted to the defect analysis server, and the defect analysis server can analyze the surface defects of the solar panel based on the scanned image.
[0093] The technical solution of the embodiment of the present application can be based on Figure 1A or Figure 1B or Figure 1C The system is implemented by taking the architecture shown as an example or its modified architecture.
[0094] The principle of line scan cameras determines that the objects they photograph must be moving. When the solar panel to be inspected moves, there is a question of whether the movement speed matches the acquisition speed of the line scan camera. If the movement speed of the solar panel does not match the acquisition speed of the line scan camera, it is likely to affect the accuracy of the detection of surface defects of the solar panel. Figure 2 , Figure 2 The image stretching or compression is shown when the object is moving due to the mismatch between the moving speed and the acquisition speed of the line scan camera. The technical solution of the embodiment of the present application mainly studies how to improve the matching between the moving speed of the solar panel and the acquisition speed of the line scan camera.
[0095] The following specifically introduces an adaptive adjustment method for a line scan camera. The adaptive adjustment method for a line scan camera can be based on Figure 1A or Figure 1B or Figure 1C The method is specifically implemented by a system of the architecture shown in the example or a system of a modified architecture thereof, wherein the method may include:
[0096] S1. The adjustment controller controls the quality inspection conveyor belt to drive the test board to move, and controls the line scan camera to scan and image the quality inspection conveyor belt in motion to obtain a scanned image P1, wherein the test board is carried on the quality inspection conveyor belt, wherein the solar panel carried on the quality inspection conveyor belt can have the same movement speed as the test board, the quality inspection conveyor belt is a moving mechanism that the line scan camera needs to perform scanning and imaging, and the test board includes a circular or regular polygonal calibration pattern; the scanned image P1 includes a test image area Pc1, and the test area Pc1 is an image area formed by scanning and imaging the calibration pattern included in the test board.
[0097] In some possible implementations, the calibration pattern may be, for example, Figure 3 As shown in the example.
[0098] S2. Cut out the test image area Pc1 from the scanned image P1.
[0099] In some possible implementations, the test image area Pc1 may be, for example, Figure 4 As shown in the example.
[0100] S3. Convert the test image region gPc1 into a grayscale image Pc1.
[0101] In some possible implementations, the grayscale image Pc1 is, for example, Figure 5 As shown in the example.
[0102] S4. Binarize the grayscale image gPc1 to obtain a binary image bPc1 of the calibration pattern.
[0103] In some possible implementations, the binary image bPc1 of the calibration pattern is, for example, Figure 6 As shown in the example.
[0104] S5. Generate a calibration pattern circumscribed rectangle cr1 corresponding to the binarized image bPc1.
[0105] In some possible implementations, the calibration pattern circumscribed rectangle cr1 may be, for example, Figure 7 As shown in the example.
[0106] S6. Calculate a correction ratio rcf1 based on the aspect ratio of the circumscribed rectangle cr1; and adjust the frequency multiplication and division of the line scan camera based on the correction ratio rcf1.
[0107] In some possible implementations, the pattern without stretching or compression obtained after adjusting the frequency doubling and frequency division of the line scan camera can be as follows: Figure 8 As shown in the example.
[0108] See also Fig. 9 and Fig.10 , Fig. 9 It is a schematic diagram of a solar panel provided in an embodiment of the present application. Fig.10 Schematic diagram of a quality inspection conveyor belt carrying a solar panel provided in an embodiment of the present application. Fig.10 For example, a line scan camera is used to detect surface defects of solar panels. The solar panels to be inspected are carried on a quality inspection conveyor belt, which can drive the solar panels it carries to move. A test board is carried on the quality inspection conveyor belt, and the solar panels carried on the quality inspection conveyor belt can move at the same speed as the test board.
[0109] In some possible implementations, the method may further include:
[0110] An adjustment cycle timer is started after the frequency multiplication and division of the line scan camera are adjusted based on the correction ratio rcf1.
[0111] When it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with adjusted frequency multiplication and division is controlled to scan and image the moving quality inspection conveyor belt again to obtain a scanned image P2, wherein the scanned image P2 includes a test image area Pc2, and the test area Pc2 is an image area formed by scanning and imaging the calibration diagram contained in the test plate.
[0112] The test image region Pc2 is cut out from the scanned image P2. The test image region gPc2 is converted into a grayscale image Pc2. The grayscale image gPc2 is binarized to obtain a binarized image bPc2 of the calibration pattern. A calibration pattern circumscribed rectangle cr2 corresponding to the binarized image bPc2 is generated; a correction ratio rcf2 is calculated based on the aspect ratio of the circumscribed rectangle cr2; and the frequency multiplication and division of the line scan camera are adjusted again based on the correction ratio rcf2.
[0113] In some possible implementations, the method may further include:
[0114] When the correction ratio rcf2 is greater than the correction ratio rcf1, the timing duration of the adjustment cycle timer is shortened from t1 to t2, and after the frequency multiplication and division of the line scan camera are adjusted again based on the correction ratio rcf2, the adjustment cycle timer is restarted.
[0115] When it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with adjusted frequency multiplication and division is controlled to scan and image the moving quality inspection conveyor belt again to obtain a scanned image P3, wherein the scanned image P3 includes a test image area Pc3, and the test area Pc3 is an image area formed by scanning and imaging the calibration diagram contained in the test plate.
[0116] The test image area Pc3 is cut out from the scanned image P3; the test image area gPc3 is converted into a grayscale image Pc3; the grayscale image gPc3 is binarized to obtain a binarized image bPc3 of a calibration pattern; a calibration pattern circumscribed rectangle cr3 corresponding to the binarized image bPc3 is generated; a correction ratio rcf3 is calculated based on the aspect ratio of the circumscribed rectangle cr3; and the frequency multiplication and division of the line scan camera are adjusted again based on the correction ratio rcf3.
[0117] In some possible implementations, the method may further include: when the correction ratio rcf3 is less than the correction ratio rcf2, and the correction ratio rcf3 is greater than an allowable threshold, shortening the timing duration of the adjustment cycle timer from t2 to t4, and restarting the adjustment cycle timer after adjusting the frequency multiplication and division of the line scan camera again based on the correction ratio rcf3.
[0118] For example, t4=0.75*t2 or t4=0.8*t2. Of course, the specific ratio between t2 and t4 is not limited to the above examples.
[0119] When it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with adjusted frequency multiplication and division is controlled to scan and image the moving quality inspection conveyor belt again to obtain a scanned image P4, wherein the scanned image P4 includes a test image area Pc4, and the test area Pc4 is an image area formed by scanning and imaging the calibration diagram contained in the test plate.
[0120] The test image area Pc4 is cut out from the scanned image P4; the test image area gPc4 is converted into a grayscale image Pc4; the grayscale image gPc4 is binarized to obtain a binarized image bPc4 of the calibration pattern; a calibration pattern circumscribed rectangle cr4 corresponding to the binarized image bPc4 is generated; a correction ratio rcf4 is calculated based on the aspect ratio of the circumscribed rectangle cr4; and the frequency multiplication and division of the line scan camera are adjusted again based on the correction ratio rcf4.
[0121] In some possible implementations, the method may further include:
[0122] When the correction ratio rcf4 is greater than the allowable threshold, the second line scan camera is started, and the frequency multiplication and division of the second line scan camera are set to be the same as those of the line scan camera, and the second line scan camera is a backup line scan camera for the line scan camera.
[0123] In some possible implementations, the angle between the scanning plane of the second line scan camera and the conveying direction of the quality inspection conveyor belt is greater than the angle between the scanning plane of the line scan camera and the conveying direction of the quality inspection conveyor belt. For example, the value range of the angle X1 between the scanning plane of the line scan camera and the conveying direction of the quality inspection conveyor belt can be [70°, 80°); the value range of the angle X2 between the scanning plane of the line scan camera and the conveying direction of the quality inspection conveyor belt can be [80°, 90°], wherein X1 is greater than X2, for example, the difference between X1 and X2 is not less than 10° and not more than 20°, for example, the difference between X1 and X2 is equal to 15°.
[0124] The distance Y1 between the second line scan camera and the inspection conveyor belt is greater than the distance Y1 between the line scan camera and the inspection conveyor belt. For example, Y1 is 1.3 to 2 times of Y2, specifically Y1=1.5*Y2, and of course other values are possible.
[0125] When it is detected that the timing of the adjustment cycle timer has arrived, the second line scan camera is controlled to scan and image the quality inspection conveyor belt in motion again to obtain a scanned image P5, wherein the scanned image P5 includes a test image area Pc5, and the test area Pc5 is an image area formed by scanning and imaging the calibration diagram contained in the test plate.
[0126] The test image area Pc5 is cut out from the scanned image P5; the test image area gPc5 is converted into a grayscale image Pc5; the grayscale image gPc5 is binarized to obtain a binarized image bPc5 of the calibration pattern; a calibration pattern circumscribed rectangle cr5 corresponding to the binarized image bPc5 is generated; a correction ratio rcf5 is calculated based on the aspect ratio of the circumscribed rectangle cr5; when the correction ratio rcf5 is greater than an allowable threshold, the frequency multiplication and division of the second line scan camera are adjusted based on the correction ratio rcf5.
[0127] The scanned image obtained by the second line scan camera can be transmitted to the defect analysis server, and the defect analysis server can analyze the surface defects of the solar panel based on the scanned image.
[0128] In some possible implementations, the method may further include: when the correction ratio rcf5 allows a threshold, extending the timing duration of the adjustment cycle timer from t4 to t5, and restarting the adjustment cycle timer after adjusting the frequency multiplication and division of the line scan camera again based on the correction ratio rcf3, and t5 is the maximum allowed timing duration of the adjustment cycle timer.
[0129] When the correction ratio rcf5 is less than the correction ratio rcf4 and the correction ratio rcf5 is greater than the allowable threshold, the adjustment cycle timer is restarted after the frequency multiplication and division of the second line scan camera are adjusted based on the correction ratio rcf4.
[0130] When it is detected that the timing of the adjustment cycle timer has arrived, the second line scan camera is controlled to scan and image the quality inspection conveyor belt in motion again to obtain a scanned image P6, wherein the scanned image P6 includes a test image area Pc6, and the test area Pc6 is an image area formed by scanning and imaging the calibration image contained in the test plate.
[0131] The test image area Pc6 is cut out from the scanned image P6; the test image area gPc6 is converted into a grayscale image Pc6; the grayscale image gPc6 is binarized to obtain a binarized image bPc6 of the calibration pattern; a calibration pattern circumscribed rectangle cr6 corresponding to the binarized image bPc6 is generated; a correction ratio rcf6 is calculated based on the aspect ratio of the circumscribed rectangle cr6; when the correction ratio rcf6 is greater than an allowable threshold, the frequency multiplication and division of the second line scan camera are adjusted again based on the correction ratio rcf6.
[0132] The scanned image obtained by the second line scan camera can be transmitted to the defect analysis server, and the defect analysis server can analyze the surface defects of the solar panel based on the scanned image.
[0133] In some possible implementations, the correction ratio rcf2 is equal to the aspect ratio x` / y` of the circumscribed rectangle cr1, where the width of the circumscribed rectangle cr1 is x1` and the height thereof is y1`.
[0134] Adjusting the frequency multiplication and division of the line scan camera based on the correction ratio rcf1 specifically includes:
[0135] Find the greatest common divisor of x` and y`, z1`=gcd(x1`,y1`).
[0136] The target frequency multiplication x1=x1` / gcd(x1`,y1`) of the line scan camera is calculated; the target frequency division y1=y1` / gcd(x1`,y1`) of the line scan camera is calculated.
[0137] The current frequency multiplication of the line scan camera is adjusted to the target frequency multiplication x1, and the current frequency division of the line scan camera is adjusted to the target frequency division y1.
[0138] like Figure 1A or Figure 1B As shown in the example, a line scan camera adaptive adjustment system provided by an embodiment of the present invention may mainly include: a quality inspection conveyor belt, an adjustment controller and a line scan camera.
[0139] The line scan camera is used for surface defect detection of solar panels. The solar panels to be detected are carried on a quality inspection conveyor belt, and the quality inspection conveyor belt can drive the solar panels it carries to move.
[0140] The adjustment controller is used to perform the following operations: control the quality inspection conveyor belt to drive the test board to move together, and control the line scan camera to scan and image the quality inspection conveyor belt in motion to obtain a scanned image P1, the test board is carried on the quality inspection conveyor belt, the solar panel carried on the quality inspection conveyor belt can have the same movement speed as the test board, the quality inspection conveyor belt is a moving mechanism that the line scan camera needs to perform scanning and imaging, and the test board contains a circular or regular polygonal calibration pattern; wherein the scanned image P1 contains a test image area Pc1, and the test area Pc1 is an image area formed by scanning and imaging the calibration pattern contained in the test board; the test image area Pc1 is cut out from the scanned image P1.
[0141] The test image region gPc1 is converted into a grayscale image Pc1. The grayscale image gPc1 is binarized to obtain a binary correction ratio image bPc1 of the calibration pattern. A calibration pattern circumscribed rectangle cr1 corresponding to the binarized image bPc1 is generated; a correction ratio rcf1 is calculated based on the aspect ratio of the circumscribed rectangle cr1; and a frequency multiplication and division of the line scan camera is adjusted based on the correction ratio rcf1.
[0142] In some possible implementations, the adjustment controller is further configured to perform the following operations: starting an adjustment cycle timer after adjusting the frequency multiplication and division of the line scan camera based on the rcf1;
[0143] When it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with adjusted frequency multiplication and division is controlled to scan and image the moving quality inspection conveyor belt again to obtain a scanned image P2, wherein the scanned image P2 includes a test image area Pc2, and the test area Pc2 is an image area formed by scanning and imaging the calibration image included in the test plate;
[0144] The test image area Pc2 is cut out from the scanned image P2; the test image area gPc2 is converted into a grayscale image Pc2; the grayscale image gPc2 is binarized to obtain a binarized image bPc2 of a calibration pattern; a calibration pattern circumscribed rectangle cr2 corresponding to the binarized image bPc2 is generated; a correction ratio rcf2 is calculated based on the aspect ratio of the circumscribed rectangle cr2; and the frequency multiplication and division of the line scan camera are adjusted again based on the correction ratio rcf2.
[0145] In some possible implementations, the adjustment controller is further configured to perform the following operations:
[0146] When the correction ratio rcf2 is greater than the correction ratio rcf1, the timing duration of the adjustment cycle timer is shortened from t1 to t2, and after the frequency multiplication and division of the line scan camera are adjusted again based on the correction ratio rcf2, the adjustment cycle timer is restarted;
[0147] When it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with adjusted frequency multiplication and division is controlled to scan and image the moving quality inspection conveyor belt again to obtain a scanned image P3, wherein the scanned image P3 includes a test image area Pc3, and the test area Pc3 is an image area formed by scanning and imaging the calibration image included in the test plate;
[0148] The test image area Pc3 is cut out from the scanned image P3; the test image area gPc3 is converted into a grayscale image Pc3; the grayscale image gPc3 is binarized to obtain a binarized image bPc3; a calibration pattern circumscribed rectangle cr3 of the binarized image bPc3 is generated; a correction ratio rcf3 is calculated based on the aspect ratio of the circumscribed rectangle cr3; and the frequency multiplication and division of the line scan camera are adjusted again based on the correction ratio rcf3.
[0149] In some possible implementations, the adjustment controller is further configured to perform the following operations: when the correction ratio rcf3 is less than the correction ratio rcf2, and the correction ratio rcf3 is greater than an allowable threshold, shortening the timing duration of the adjustment cycle timer from t2 to t4, and restarting the adjustment cycle timer after adjusting the frequency multiplication and division of the line scan camera again based on the correction ratio rcf3;
[0150] When it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with adjusted frequency multiplication and division is controlled to scan and image the moving quality inspection conveyor belt again to obtain a scanned image P4, wherein the scanned image P4 includes a test image area Pc4, and the test area Pc4 is an image area formed by scanning and imaging the calibration diagram contained in the test plate.
[0151] The test image area Pc4 is cut out from the scanned image P4; the test image area gPc4 is converted into a grayscale image Pc4; the grayscale image gPc4 is binarized to obtain a binarized image bPc4 of the calibration pattern; a calibration pattern circumscribed rectangle cr4 corresponding to the binarized image bPc4 is generated; a correction ratio rcf4 is calculated based on the aspect ratio of the circumscribed rectangle cr4; and the frequency multiplication and division of the line scan camera are adjusted again based on the correction ratio rcf4.
[0152] In some possible implementations, the method may further include:
[0153] When the correction ratio rcf4 is greater than the allowable threshold, the second line scan camera is started, and the frequency multiplication and division of the second line scan camera are set to be the same as those of the line scan camera, and the second line scan camera is a backup line scan camera for the line scan camera.
[0154] In some possible implementations, the angle between the scanning plane of the second line scan camera and the conveying direction of the quality inspection conveyor belt is greater than the angle between the scanning plane of the line scan camera and the conveying direction of the quality inspection conveyor belt. For example, the value range of the angle X1 between the scanning plane of the line scan camera and the conveying direction of the quality inspection conveyor belt can be [70°, 80°); the value range of the angle X2 between the scanning plane of the line scan camera and the conveying direction of the quality inspection conveyor belt can be [80°, 90°], wherein X1 is greater than X2, for example, the difference between X1 and X2 is not less than 10° and not more than 20°, for example, the difference between X1 and X2 is equal to 15°.
[0155] The distance Y1 between the second line scan camera and the inspection conveyor belt is greater than the distance Y1 between the line scan camera and the inspection conveyor belt. For example, Y1 is 1.3 to 2 times of Y2, specifically Y1=1.5*Y2, and of course other values are possible.
[0156] When it is detected that the timing of the adjustment cycle timer has arrived, the second line scan camera is controlled to scan and image the quality inspection conveyor belt in motion again to obtain a scanned image P5, wherein the scanned image P5 includes a test image area Pc5, and the test area Pc5 is an image area formed by scanning and imaging the calibration diagram contained in the test plate.
[0157] The test image area Pc5 is cut out from the scanned image P5; the test image area gPc5 is converted into a grayscale image Pc5; the grayscale image gPc5 is binarized to obtain a binarized image bPc5 of the calibration pattern; a calibration pattern circumscribed rectangle cr5 corresponding to the binarized image bPc5 is generated; a correction ratio rcf5 is calculated based on the aspect ratio of the circumscribed rectangle cr5; when the correction ratio rcf5 is greater than an allowable threshold, the frequency multiplication and division of the second line scan camera are adjusted based on the correction ratio rcf5.
[0158] The scanned image obtained by the second line scan camera can be transmitted to the defect analysis server, and the defect analysis server can analyze the surface defects of the solar panel based on the scanned image.
[0159] In some possible implementations, the method may further include: when the correction ratio rcf5 allows a threshold, extending the timing duration of the adjustment cycle timer from t4 to t5, and restarting the adjustment cycle timer after adjusting the frequency multiplication and division of the line scan camera again based on the correction ratio rcf3, and t5 is the maximum allowed timing duration of the adjustment cycle timer.
[0160] When the correction ratio rcf5 is less than the correction ratio rcf4 and the correction ratio rcf5 is greater than the allowable threshold, the adjustment cycle timer is restarted after the frequency multiplication and division of the second line scan camera are adjusted based on the correction ratio rcf4.
[0161] When it is detected that the timing of the adjustment cycle timer has arrived, the second line scan camera is controlled to scan and image the quality inspection conveyor belt in motion again to obtain a scanned image P6, wherein the scanned image P6 includes a test image area Pc6, and the test area Pc6 is an image area formed by scanning and imaging the calibration image contained in the test plate.
[0162] The test image area Pc6 is cut out from the scanned image P6; the test image area gPc6 is converted into a grayscale image Pc6; the grayscale image gPc6 is binarized to obtain a binarized image bPc6 of the calibration pattern; a calibration pattern circumscribed rectangle cr6 corresponding to the binarized image bPc6 is generated; a correction ratio rcf6 is calculated based on the aspect ratio of the circumscribed rectangle cr6; when the correction ratio rcf6 is greater than an allowable threshold, the frequency multiplication and division of the second line scan camera are adjusted again based on the correction ratio rcf6.
[0163] The scanned image obtained by the second line scan camera can be transmitted to the defect analysis server, and the defect analysis server can analyze the surface defects of the solar panel based on the scanned image.
[0164] In some possible implementations, the correction ratio rcf2 is equal to the aspect ratio x` / y` of the circumscribed rectangle cr1, where the width of the circumscribed rectangle cr1 is x1` and the height thereof is y1`.
[0165] Adjusting the frequency multiplication and division of the line scan camera based on the correction ratio rcf1 specifically includes:
[0166] Find the greatest common divisor of x` and y`, z1`=gcd(x1`,y1`).
[0167] The target frequency multiplication x1=x1` / gcd(x1`,y1`) of the line scan camera is calculated; the target frequency division y1=y1` / gcd(x1`,y1`) of the line scan camera is calculated.
[0168] The current frequency multiplication of the line scan camera is adjusted to the target frequency multiplication x1, and the current frequency division of the line scan camera is adjusted to the target frequency division y1.
[0169] It can be seen that in the technical solution of the embodiment of the present application, the solar panel to be tested is carried on the quality inspection conveyor belt, and the quality inspection conveyor belt can drive the solar panel it carries to move, control the quality inspection conveyor belt to drive the test board to move, and control the line scan camera to scan and image the quality inspection conveyor belt in motion to obtain a scanned image P1, the test board is carried on the quality inspection conveyor belt, and the solar panel carried on the quality inspection conveyor belt can have the same movement speed as the test board, the quality inspection conveyor belt is a motion mechanism that the line scan camera needs to perform scanning and imaging, and the test board contains a circular or regular polygonal calibration pattern; the scanned image P1 contains a test image area Pc1, and the test area Pc1 is a calibration pattern for the test board. The invention relates to an image area formed by scanning and imaging a fixed pattern; extracting the test image area Pc1 from the scanned image P1; converting the test image area gPc1 into a grayscale image Pc1; binarizing the grayscale image gPc1 to obtain a binarized image bPc1 of the calibration pattern; generating a calibration pattern circumscribed rectangle cr1 corresponding to the binarized image bPc1; calculating a correction ratio rcf1 based on the aspect ratio of the circumscribed rectangle cr1; and adjusting the frequency doubling and frequency division of the line scan camera based on the correction ratio rcf1. The above scheme can automatically realize the synchronization between the movement speed of the solar panel energy test and the acquisition speed of the line scan camera, thereby facilitating the adaptive improvement of the matching between the movement speed of the solar panel energy test and the acquisition speed of the line scan camera.
[0170] An embodiment of the present application also provides a computer storage medium, which stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method recorded in the above method embodiments.
[0171] The embodiment of the present application also provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs some or all steps of any method recorded in the above method embodiment.
[0172] In addition, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0173] The above disclosure is only part of the embodiments of the present invention, which certainly cannot be used to limit the scope of the rights of the present invention. Ordinary technicians in this field can understand that implementing all or part of the processes of the above embodiments and making equivalent changes according to the claims of the present invention still fall within the scope of the invention.
Claims
1. A method for adaptively adjusting a line scan camera, characterized in that: The method is applied to a line scan camera adaptive adjustment system, which includes: a quality inspection conveyor belt, an adjustment controller and a line scan camera. The line scan camera is used for surface defect detection of solar panels. The solar panels to be detected are carried on the quality inspection conveyor belt, and the quality inspection conveyor belt can drive the solar panels carried by it to move. A defect analysis server and the adaptive adjustment system of the line scan camera are linked by communication. The scanned images obtained by the line scan camera are transmitted to the defect analysis server, and the defect analysis server analyzes the surface defects of the solar panels accordingly. The method includes: The inspection conveyor belt is controlled to drive the test board to move, and the line scan camera is controlled to scan and image the inspection conveyor belt in motion to obtain a scanned image P1, the test board is carried on the inspection conveyor belt, the solar panel carried on the inspection conveyor belt and the test board have the same movement speed, the inspection conveyor belt is a motion mechanism for the line scan camera to perform scanning and imaging, and the test board includes a circular or regular polygonal calibration pattern; the scanned image P1 includes a test image area Pc1, and the test image area Pc1 is an image area formed by scanning and imaging the calibration pattern included in the test board; Cut out the test image area Pc1 from the scanned image P1; Convert the test image area Pc1 into a grayscale image gPc1; Binarize the grayscale image gPc1 to obtain a binary image bPc1 of the calibration pattern; Generate a calibration pattern circumscribed rectangle cr1 corresponding to the binary image bPc1; calculate a correction ratio rcf1 based on the aspect ratio of the circumscribed rectangle cr1; and adjust the frequency multiplication and division of the line scan camera based on the correction ratio rcf1; The method further includes: starting an adjustment cycle timer after adjusting the frequency multiplication and division of the line scan camera based on the correction ratio rcf1; when it is detected that the timing of the adjustment cycle timer has arrived, controlling the line scan camera with the adjusted frequency multiplication and division to scan and image the quality inspection conveyor belt in motion again to obtain a scanned image P2, wherein the scanned image P2 includes a test image area Pc2, and the test image area Pc2 is an image area formed by scanning and imaging the calibration pattern included in the test plate; Cut out the test image area Pc2 from the scanned image P2; convert the test image area Pc2 into a grayscale image gPc2; perform binarization processing on the grayscale image gPc2 to obtain a binarized image bPc2 of a calibration pattern; generate a calibration pattern circumscribed rectangle cr2 corresponding to the binarized image bPc2; calculate a correction ratio rcf2 based on the aspect ratio of the circumscribed rectangle cr2; and adjust the frequency multiplication and division of the line scan camera again based on the correction ratio rcf2; The method further includes: when the correction ratio rcf2 is greater than the correction ratio rcf1, shortening the timing duration of the adjustment cycle timer from t1 to t2, and restarting the adjustment cycle timer after adjusting the frequency multiplication and frequency division of the line scan camera again based on the correction ratio rcf2; when it is detected that the timing of the adjustment cycle timer has arrived, controlling the line scan camera with the adjusted frequency multiplication and frequency division to scan and image the quality inspection conveyor belt in motion again to obtain a scanned image P3, wherein the scanned image P3 includes a test image area Pc3, and the test image area Pc3 is an image area formed by scanning and imaging the calibration pattern included in the test plate; Cut out the test image area Pc3 from the scanned image P3; convert the test image area Pc3 into a grayscale image gPc3; perform binarization processing on the grayscale image gPc3 to obtain a binarized image bPc3 of a calibration pattern; generate a calibration pattern circumscribed rectangle cr3 corresponding to the binarized image bPc3; calculate a correction ratio rcf3 based on the aspect ratio of the circumscribed rectangle cr3; and adjust the frequency multiplication and division of the line scan camera again based on the correction ratio rcf3; Wherein, the method further comprises: When the correction ratio rcf3 is less than the correction ratio rcf2, and the correction ratio rcf3 is greater than the allowable threshold, the timing duration of the adjustment cycle timer is shortened from t2 to t4, and after the frequency multiplication and frequency division of the line scan camera are adjusted again based on the correction ratio rcf3, the adjustment cycle timer is restarted; when it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with the adjusted frequency multiplication and frequency division is controlled to scan and image the quality inspection conveyor belt in motion again to obtain a scanned image P4, wherein the scanned image P4 includes a test image area Pc4, and the test image area Pc4 is an image area formed by scanning and imaging the calibration pattern included in the test plate; t4=0.75*t2 or t4=0.8*t2; Cut out the test image area Pc4 from the scanned image P4; convert the test image area Pc4 into a grayscale image gPc4; perform binarization processing on the grayscale image gPc4 to obtain a binarized image bPc4 of a calibration pattern; generate a calibration pattern circumscribed rectangle cr4 corresponding to the binarized image bPc4; calculate a correction ratio rcf4 based on the aspect ratio of the circumscribed rectangle cr4; and adjust the frequency multiplication and division of the line scan camera again based on the correction ratio rcf4; Wherein, the correction ratio rcf1 is equal to the aspect ratio x` / y` of the circumscribed rectangle cr1, the width of the circumscribed rectangle cr1 is x1` and the height thereof is y1`; Adjusting the frequency multiplication and division of the line scan camera based on the correction ratio rcf1 specifically includes: obtaining the greatest common divisor z1`=gcd(x1`,y1`) of x` and y`; calculating the target frequency multiplication x1=x1` / gcd(x1`,y1`) of the line scan camera; calculating the target division frequency y1=y1` / gcd(x1`,y1`) of the line scan camera; adjusting the current frequency multiplication of the line scan camera to the target frequency multiplication x1, and adjusting the current division frequency of the line scan camera to the target division frequency y1.
2. A line scan camera adaptive adjustment system, characterized in that: include: Quality inspection conveyor belts, adjustment controllers and line scan cameras; The line scan camera is used for surface defect detection of solar panels. The solar panels to be detected are carried on a quality inspection conveyor belt, and the quality inspection conveyor belt can drive the solar panels it carries to move; The defect analysis server and the adaptive adjustment system of the line scan camera are linked by communication. The scanned images obtained by the line scan camera are transmitted to the defect analysis server, and the defect analysis server analyzes the surface defects of the solar panel based on the scanned images. The regulating controller is used to perform the following operations: Control the inspection conveyor belt to drive the test board to move together, and control the line scan camera to scan and image the inspection conveyor belt in motion to obtain a scanned image P1, the test board is carried on the inspection conveyor belt, the solar panel carried on the inspection conveyor belt and the test board have the same movement speed, the inspection conveyor belt is a motion mechanism for the line scan camera to perform scanning and imaging, and the test board includes a circular or regular polygonal calibration pattern; wherein the scanned image P1 includes a test image area Pc1, and the test image area Pc1 is an image area formed by scanning and imaging the calibration pattern included in the test board; the test image area Pc1 is cut out from the scanned image P1; Convert the test image area Pc1 into a grayscale image gPc1; Binarize the grayscale image gPc1 to obtain a binary image bPc1 of the calibration pattern; Generate a calibration pattern circumscribed rectangle cr1 corresponding to the binary image bPc1; calculate a correction ratio rcf1 based on the aspect ratio of the circumscribed rectangle cr1; and adjust the frequency multiplication and division of the line scan camera based on the correction ratio rcf1; The regulating controller is also used to perform the following operations: After adjusting the frequency multiplication and division of the line scan camera based on the correction ratio rcf1, an adjustment cycle timer is started; When it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with adjusted frequency multiplication and division is controlled to scan and image the moving quality inspection conveyor belt again to obtain a scanned image P2, wherein the scanned image P2 includes a test image area Pc2, and the test image area Pc2 is an image area formed by scanning and imaging the calibration pattern included in the test plate; Cut out the test image area Pc2 from the scanned image P2; Convert the test image area Pc2 into a grayscale image gPc2; Binarize the grayscale image gPc2 to obtain a binary image bPc2 of the calibration pattern; Generate a calibration pattern circumscribed rectangle cr2 corresponding to the binary image bPc2; calculate a correction ratio rcf2 based on the aspect ratio of the circumscribed rectangle cr2; and adjust the frequency multiplication and division of the line scan camera again based on the correction ratio rcf2; The regulating controller is also used to perform the following operations: When the correction ratio rcf2 is greater than the correction ratio rcf1, the timing duration of the adjustment cycle timer is shortened from t1 to t2, and after the frequency multiplication and division of the line scan camera are adjusted again based on the correction ratio rcf2, the adjustment cycle timer is restarted; When it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with adjusted frequency multiplication and division is controlled to scan and image the moving quality inspection conveyor belt again to obtain a scanned image P3, wherein the scanned image P3 includes a test image area Pc3, and the test image area Pc3 is an image area formed by scanning and imaging the calibration pattern included in the test plate; Cut out the test image area Pc3 from the scanned image P3; Convert the test image area Pc3 into a grayscale image gPc3; Binarize the grayscale image gPc3 to obtain a binary image bPc3; Generate a calibration pattern circumscribed rectangle cr3 of the binary image bPc3; calculate a correction ratio rcf3 based on the aspect ratio of the circumscribed rectangle cr3; and adjust the frequency multiplication and division of the line scan camera again based on the correction ratio rcf3; The regulating controller is also used to perform the following operations: When the correction ratio rcf3 is less than the correction ratio rcf2, and the correction ratio rcf3 is greater than the allowable threshold, the timing duration of the adjustment cycle timer is shortened from t2 to t4, and after the frequency multiplication and division of the line scan camera are adjusted again based on the correction ratio rcf3, the adjustment cycle timer is restarted; t4=0.75*t2 or t4=0.8*t2; When it is detected that the timing of the adjustment cycle timer has arrived, the line scan camera with adjusted frequency multiplication and division is controlled to scan and image the moving quality inspection conveyor belt again to obtain a scanned image P4, wherein the scanned image P4 includes a test image area Pc4, and the test image area Pc4 is an image area formed by scanning and imaging the calibration pattern included in the test plate; Cut out the test image area Pc4 from the scanned image P4; Convert the test image area Pc4 into a grayscale image gPc4; Binarize the grayscale image gPc4 to obtain a binary image bPc4 of the calibration pattern; Generate a calibration pattern circumscribed rectangle cr4 corresponding to the binary image bPc4; calculate a correction ratio rcf4 based on the aspect ratio of the circumscribed rectangle cr4; and adjust the frequency multiplication and division of the line scan camera again based on the correction ratio rcf4; Wherein, the correction ratio rcf1 is equal to the aspect ratio x` / y` of the circumscribed rectangle cr1, the width of the circumscribed rectangle cr1 is x1` and the height thereof is y1`; Adjusting the frequency multiplication and division of the line scan camera based on the correction ratio rcf1 specifically includes: Find the greatest common divisor of x` and y` z1`=gcd(x1`,y1`); Calculate the target frequency multiplication x1=x1` / gcd(x1`,y1`) of the line scan camera; Calculate the target frequency division y1=y1` / gcd(x1`,y1`) of the line scan camera; The current frequency multiplication of the line scan camera is adjusted to the target frequency multiplication x1, and the current frequency division of the line scan camera is adjusted to the target frequency division y1.
Citation Information
Patent Citations
Solid wood sawn timber line scanning camera image automatic splicing and matting method
CN110782423A
Camera self-calibration and target tracking method based on multi-mode information reference in airport large-range scene
CN115222819A
Image processing method and device for panoramic infrared scanning imaging of oil and gas leakage
CN115775208A
TDI linear array scanning camera dead pixel correction method and system, storage medium and equipment
CN116744136A
Line frequency adjusting method and system for linear array camera
CN117768767A