Photovoltaic glass front and back detection method

CN122928868APending Publication Date: 2026-10-16SUPERIOR INTELLIGENT TECH (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611391880.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-10
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

其中人工检测不仅具有劳动强度大、检测效率低、检测成本高的问题,同时还容易出现误判和漏判的问题

Benefits of technology

最后对所述真实尺寸进行区间划分,形成每一个类型光伏玻璃的判定尺寸区间;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122928868A_ABST
    Figure CN122928868A_ABST
Patent Text Reader

Abstract

The application discloses a photovoltaic glass front and back surface detection method, and belongs to the technical field of photovoltaic glass detection. The photovoltaic glass front and back surface detection method can automatically detect whether the front and back surfaces of photovoltaic glass are reversed based on the difference in light transmittance of the front and back surfaces of the photovoltaic glass or based on the texture and particle characteristics of the front and back surfaces of the photovoltaic glass. The photovoltaic glass front and back surface detection method can effectively improve the detection efficiency, is not easily affected by external factors to interfere with the detection, has high detection quality, low detection cost, strong operability and convenient use.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of a patent application entitled "Method for Detecting the Front and Back Sides of Photovoltaic Glass", the original application was filed on May 10, 2023, application number 202310520413.1. Technical Field

[0002] This invention relates to the field of photovoltaic glass testing technology, and in particular to a method for testing the front and back sides of photovoltaic glass. Background Technology

[0003] Photovoltaic glass is an indispensable component for solar cells, and the distinction between its front and back sides has a substantial impact on the performance and quality of the photovoltaic module. Generally, the front side of photovoltaic glass undergoes special treatment, possessing high light transmittance and anti-reflective properties, while the back side is ordinary flat glass. If the front and back of the photovoltaic glass are placed incorrectly during production, it can lead to reduced power generation efficiency of the photovoltaic module, or even render the module unusable. Therefore, it is necessary to add a method for detecting the front and back sides of the glass at the glass loading stage to avoid various problems caused by incorrect placement of the photovoltaic glass.

[0004] Currently, traditional methods for inspecting the front and back of photovoltaic glass generally include manual inspection and automatic inspection using photoelectric sensors. Manual inspection is not only labor-intensive, inefficient, and costly, but also prone to false positives and false negatives. Photoelectric sensors have poor environmental adaptability, being affected by factors such as light, temperature, and humidity, resulting in low accuracy and a high false positive rate. Furthermore, if the transmitter or receiver of the photoelectric sensor is covered by dust, oil, or other impurities, it will affect the transmission and reception of the light signal, leading to a decrease in inspection quality or even inspection failure. Summary of the Invention

[0005] The advantage of this invention is that it provides a method for detecting the front and back of photovoltaic glass. Based on the difference in light transmittance between the front and back of the photovoltaic glass, it can automatically detect whether the front and back of the photovoltaic glass are reversed using a specific detection processing algorithm, or automatically detect whether the front and back of the photovoltaic glass are reversed based on the texture and particle characteristics of the front and back of the photovoltaic glass. This method can not only effectively improve detection efficiency, but also is not easily affected by external factors, resulting in high detection quality, low detection cost, strong operability, and convenient use.

[0006] To achieve at least one of the advantages of the present invention, in a first aspect, the present invention provides a method for detecting the front and back sides of photovoltaic glass, comprising the following steps: Customizable judgment thresholds are set for each type of photovoltaic glass. 500 to 3000 rounds of testing are conducted for each type of photovoltaic glass. The test results are then classified after data conversion to obtain the target area size. The millimeter-to-pixel ratio is obtained by numerical calculation between the actual size of the captured image and the target area size. The millimeter-to-pixel ratio is multiplied by the target area size to obtain the true size of the target area. Finally, the true size is divided into intervals to form the judgment size interval for each type of photovoltaic glass. Obtain the original image of the photovoltaic glass area and remove the edge light to obtain a black image; To calculate the area of ​​the target region, an array of processing kernels with rectangular internal data shapes is constructed. The processing kernels and the black image are dilated and iterated multiple times to obtain a data image for calculating the area of ​​the region. Then, based on the gray values ​​of adjacent black and white pixels in the data image, weight fusion, contour finding, and contour area calculation are performed sequentially to obtain the minimum bounding rectangle area. Finally, the minimum bounding rectangle area is converted to obtain the light and shadow area. Based on the light and shadow area, when detecting the front and back of a certain type of photovoltaic glass, if the size exceeds the corresponding judgment range, it is determined that the front or back of the photovoltaic glass is reversed.

[0007] According to an embodiment of the present invention, the step of removing edge light to obtain a black image specifically includes: Image dimensionality processing ensures that the image dimension is between 2 and 4. If it is multi-dimensional, redundant dimensions are removed. If it is low-dimensional, new dimensions are added on the basic dimensions and kept in RGB format. Image preprocessing involves first multiplying the image by 0.8 to the power of 8, then converting the image to grayscale, scaling the grayscale image to obtain a black image with data distributed between [0, 255], and then rotating the black image to keep the edge light at the top of the image. Calculate the edge light position and obtain the black image size. The width of the black image size is divided by 10 as the iteration interval. Then, iterate from 0 to the width size with the interval. The number of iterations in each round is the number of rows of image data to be calculated. Based on the number of rows of image data, iterate to find the index position of 255 pixels and store it in memory. After the iteration is completed, obtain the index list, discard the minimum and maximum values, and finally calculate the mean, which is the edge light position. Discard local image data containing edge light, and use an array based on the edge light location to discard and remove the image edge light.

[0008] According to an embodiment of the present invention, the step of data conversion of the area of ​​the smallest bounding rectangle to obtain the light and shadow area specifically includes: The data conversion method is xyxy→xywh, and the converted x is the sum of the original x and the edge light position. Then, the size is scaled to obtain the light and shadow area.

[0009] According to an embodiment of the present invention, the method for detecting the front and back sides of photovoltaic glass further includes the following steps: The results of each round of detection of the light and shadow area are returned for processing, and the detection results and detection status of each round of detection are stored locally or in the cloud.

[0010] According to an embodiment of the present invention, the method for detecting the front and back sides of photovoltaic glass further includes the following steps: An alarm module thread is established to poll the light and shadow area returned in each round of detection, and iterates the alarm defects and alarm rules. An alarm operation is performed when an NG situation occurs. The alarm operation includes one or more of the following: voice alarm prompt, alarm stop, and pop-up reminder. The alarm rules are customized based on the number of defects within a predetermined time and the corresponding defect name.

[0011] Secondly, the present invention also provides a method for detecting the front and back sides of photovoltaic glass, comprising the following steps: Obtain the original image of the photovoltaic glass area and perform grayscale processing to obtain a grayscale original image with only one channel; Remove noise from the original grayscale image to make the image smoother, while preserving the main structure and texture information of the original grayscale image; Image gradient calculation uses a Sobel filter kernel as the filter kernel Sx in the x-direction. The transpose of the Sx filter kernel yields the filter kernel Sy in the y-direction. Convolving the two filter kernels with the grayscale image yields the gradients in the x and y directions, respectively. , Then, the gradient field of the original grayscale image is obtained to characterize the texture intensity of the original grayscale image. The grayscale image is then binarized, and gradients greater than the first threshold are extracted. Finally, the glass texture particle features are identified to determine whether the front and back of the photovoltaic glass are reversed.

[0012] According to an embodiment of the present invention, in the step of image gradient calculation, an approximation process is performed by summing the absolute values ​​of the gradients in the x and y directions to obtain an approximate value of the overall gradient magnitude, which is used to characterize the texture intensity of the original grayscale image.

[0013] According to an embodiment of the present invention, the photovoltaic glass front and back detection method further includes the following texture feature quantification step: The gradient value is divided into several different intervals, and each pixel is taken as the center point in each interval. A circular region with radius r is established with the center point. Then, the gray value difference between each pixel in the circular region and the center point is calculated. If the gray value of the pixel is greater than or equal to the gray value of the center point, the gray value difference is defined as 1; otherwise, the gray value difference is defined as 0. The obtained binary string is converted into a decimal number to obtain the LBP value of the pixel. This process is repeated until the LBP values ​​of all pixels in all intervals are obtained, forming an LBP feature map with the same size as the original grayscale image. In other words, the LBP value of each pixel is mapped to the corresponding pixel to obtain a fixed-dimensional vector for each interval, which serves as the local LBP feature vector for that interval. Then, the LBP texture features of each local LBP feature vector are statistically analyzed, and the LBP values ​​are converted into numerical values. Finally, the converted numerical values ​​are concatenated in order into a vector, which serves as the local binary mode numerical gradient feature value of the grayscale image.

[0014] According to an embodiment of the present invention, the texture feature numeration step further includes the following step: Customize the judgment threshold for each type of photovoltaic glass, conduct 500 to 3000 rounds of testing for each type of photovoltaic glass, and classify the test results after data conversion to obtain the target area size; Then, the millimeter-to-pixel ratio is obtained by numerically calculating the actual size of the captured image and the size of the target area. The actual size of the target area is then obtained by multiplying the obtained millimeter-to-pixel ratio by the size of the target area. Finally, the actual dimensions are divided into intervals to form the determination size interval for each type of photovoltaic glass; When inspecting the front and back of a certain type of photovoltaic glass, if the size exceeds the corresponding judgment range, the front or back of the photovoltaic glass is judged to be reversed.

[0015] The first aspect of this invention provides a method for detecting the front and back of photovoltaic glass, which can automatically detect whether the front and back of the photovoltaic glass are reversed based on the difference in light transmittance between the front and back sides using a specific detection processing algorithm. The second aspect of this invention provides a method for detecting the front and back of photovoltaic glass, which can automatically detect whether the front and back of the photovoltaic glass are reversed based on the texture and particle characteristics of the front and back sides. Both methods not only effectively improve detection efficiency but are also less susceptible to interference from external factors, resulting in high detection quality, low detection cost, strong operability, and convenient use.

[0016] These and other objects, features and advantages of the present invention will become fully apparent from the following detailed description. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating a preferred embodiment of the photovoltaic glass front and back detection method of the present invention; Figure 2 A flowchart illustrating another preferred embodiment of the photovoltaic glass front and back detection method of the present invention is shown. Detailed Implementation

[0018] The following description is intended to disclose the present invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art. The basic principles of the invention defined in the following description can be applied to other embodiments, modifications, improvements, equivalents, and other technical solutions that do not depart from the spirit and scope of the invention.

[0019] Those skilled in the art should understand that, in the disclosure of this specification, the terms "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the above terms should not be construed as limiting the present invention.

[0020] It is understood that the term "a" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element can be one, while in another embodiment, the number of the element can be multiple, and the term "a" should not be understood as a limitation on the number.

[0021] refer to Figure 1 In a first aspect, a preferred embodiment of the photovoltaic glass front and back detection method provided by the present invention includes the following steps S10 and S20.

[0022] S10: Obtain the original image of the photovoltaic glass area and remove edge light to obtain a black image.

[0023] Specifically, on the assembly line, when the photovoltaic glass enters the camera's imaging position, the camera interacts with the PLC to acquire the original image of the photovoltaic glass area. Edge lighting is then removed from the original image to obtain a black image. This original image of the photovoltaic glass area can be stored locally or in the cloud before being sent to the inspection software for testing.

[0024] In addition, in the original image of the photovoltaic glass area sent by the camera, the target area (i.e., the original image of the photovoltaic glass area acquired by the camera) may be affected by external light, resulting in edge light. The intensity of these edge lights will have an adverse effect on the subsequent calculation of the target area area and affect the detection quality. Therefore, it is necessary to remove these edge lights and accurately find the position of the target area on the image.

[0025] In one embodiment, step S10, which removes edge light to obtain a black image, specifically includes the following steps S11 to S14.

[0026] S11, Image Dimension Processing: Ensure the image dimension is between 2 and 4 (channels are kept in three dimensions); if multidimensional, remove redundant dimensions; if low-dimensional, add new dimensions on top of the basic dimensions and keep them in RGB format.

[0027] S12, Image Preprocessing: In each round of detection, the image quality of the received images may vary. Therefore, it is necessary to maintain consistency in the basic image quality of each image before calculation. Thus, the image is first multiplied by 0.8 (or by other powers less than 1 such as 0.7 or 0.9) to enhance the foreground and background, making bright areas brighter and dark areas darker. The image is then converted to grayscale. To improve computational speed, the grayscale image is scaled, and then binarized using the OTSU law. The image brightness and darkness segmentation threshold is calculated to obtain a black image distributed between [0, 255]. The black image is then rotated to keep the edge light at the top of the image.

[0028] S13, Calculate the edge light position: Obtain the black image size, where the width of the black image size is divided by 10 as the iteration interval, and then iterate from 0 to the width size with the interval. The number of iterations in each round is the number of image data rows to be calculated. Based on the number of image data rows, iterate to find the index position of the 255 pixel value and store it in memory. After the iteration is completed, obtain the index list, discard the minimum and maximum values, and finally calculate the mean, which is the edge light position.

[0029] S14, discard the local image data with edge light, and use the slice attribute and index attribute in the array to discard and remove the image edge light based on the edge light position, finally obtaining a clean image with only the target area.

[0030] S20: Calculate the area of ​​the target region to obtain the light and shadow area, i.e., the quantitative data of light transmittance, and determine whether the front and back of the photovoltaic glass are laid in reverse.

[0031] First, the area of ​​the target region is calculated. An array of processing kernels with rectangular internal data shapes is constructed. These kernels are then expanded along with the black image, iterated multiple times, to make the target region more complete, resulting in a data image used to calculate the region's area. Then, based on the significant difference in grayscale values ​​between adjacent black and white pixels in the data image, the OpenCV modules `addWeighted`, `findContours`, `contourArea`, and `minAreaRect` are used sequentially to perform weight fusion, contour finding, and contour area calculation to obtain the area of ​​the minimum bounding rectangle. Finally, the area of ​​the minimum bounding rectangle is converted to obtain the light and shadow area, which is the quantified data of light transmittance. Based on this quantified light transmittance data (light and shadow area), the front and back of the photovoltaic glass are automatically determined to be reversed, effectively improving detection efficiency. This method is less susceptible to interference from external factors, resulting in high detection quality, low detection cost, and easier operation.

[0032] In one embodiment, in step S20, the data transformation of the area of ​​the minimum bounding rectangle specifically involves: the data transformation method is xyxy→xywh, and the transformed x is the sum of the original x and the edge light position, followed by size scaling. That is, each number is divided by the scaling ratio (the position mapped on the original image) to obtain the light and shadow area.

[0033] More preferably, before step S10 or step S20, or in the early stage of software operation, the following step is also included: custom setting the judgment threshold for each type of photovoltaic glass.

[0034] Specifically, 500 to 3000 rounds of testing are conducted for each type of photovoltaic glass. The AI ​​testing results are then converted and categorized to obtain the target area size. Next, the millimeter-to-pixel ratio is calculated by comparing the actual size of the image captured in each round with the target area size. This millimeter-to-pixel ratio is then multiplied by the target area size to obtain the true size of the target area. Finally, the true size is divided into intervals to form the judgment size interval for each type of photovoltaic glass. When testing the front and back of a certain type of photovoltaic glass, if the calculated light and shadow area exceeds the corresponding judgment size interval, the front or back of the photovoltaic glass is determined to be reversed.

[0035] This process iterates along this principle until no abnormal dimensions are found, at which point the classification is considered complete. The dimensions of each classified interval are averaged to obtain the normal area dimensions of the OK photovoltaic glass image. These dimensions are then used to update the judgment thresholds for each type of photovoltaic glass. In subsequent automatic detection, the updated judgment thresholds are used to determine whether the front and back of the photovoltaic glass are reversed.

[0036] In other words, the customizable judgment threshold offers great flexibility and is compatible with various types of photovoltaic glass from different batches. Under the same light source, the light and shadow areas of photovoltaic glass from different batches vary significantly. Therefore, a template configuration module was developed to iteratively update the judgment threshold for different types or batches of photovoltaic glass, forming a dynamic judgment detection system. This ensures that the detection accuracy of the front and back sides of the photovoltaic glass remains consistently high, making it more user-friendly. Specifically, the template configuration module sends a template image (sourced from glass of the same type and batch) to the detection software, obtains the coordinate information returned by the software, and updates the light and shadow area values. Different configuration methods will display different lines and numerical information in the template image.

[0037] More preferably, the photovoltaic glass front and back detection method further includes step S30: processing the quantitative data for result return and storing the detection results and detection status.

[0038] Specifically, the quantified transmittance data (light and shadow area) from each round of testing is returned for processing. The testing results and status for each round are stored locally or in the cloud. This allows for the classification and identification of different types of photovoltaic glass in subsequent batch processing. Furthermore, the quantified data results can be stored in Excel format by time period after the software is closed. This facilitates loading the data from the Excel file into memory when the software is restarted, enabling the classification of previously tested photovoltaic glass into its respective category, and then processing the image features of each photovoltaic glass according to its category.

[0039] More preferably, the photovoltaic glass front and back detection method further includes step S40: opening an alarm module thread, iterating alarm defects and alarm rules, and performing an alarm operation when an NG situation occurs.

[0040] To avoid disrupting the normal operating cycle of the production line and to promptly address instances of reversed photovoltaic glass installation, a separate alarm module thread is implemented. This alarm module polls the quantitative data returned from each round of inspections, iterates the alarm defects and rules, and triggers an alarm when an incomplete (NG) condition is detected. This alerts on-site personnel, allowing for timely intervention and preventing module scrapping due to reversed glass installation. The alarm actions include one or more of the following: voice alarm prompts, alarm-based line stoppage, and pop-up notifications. The alarm rules are custom-defined based on the number of defects within a predetermined time period and the corresponding defect names.

[0041] The alarm settings page allows you to set the defect name, number of defects, cumulative number of defects per unit time, alarm count within a certain time period, alarm type (pop-up alarm or alarm stop, whether to pop-up alarm), add or delete alarm rules, and whether to allow or not to allow alarms, among other configurable alarm functions.

[0042] It is worth mentioning that the applicant also discovered that in practical applications, the light transmittance of the front and back of some types of photovoltaic glass is similar. Therefore, the aforementioned methods are insufficient for quickly and effectively detecting whether the front and back of the photovoltaic glass are reversed. In some cases, the similarity has even led to indistinguishable differences, resulting in false positives and false negatives. Therefore, referring to... Figure 2 Secondly, the present invention also provides another preferred embodiment of a method for detecting the front and back sides of photovoltaic glass, including the following steps S100 to S300.

[0043] S100: Obtain the original image of the photovoltaic glass area and perform grayscale processing to obtain the grayscale original image.

[0044] To obtain the original image of the photovoltaic glass region, since color has little effect on the differentiation of texture particles, the original image of the photovoltaic glass region is first converted into a grayscale image. Since the grayscale image has only one channel, the resulting grayscale original image with only one channel has lower computational complexity and faster processing speed, while also preserving important texture and shape information in the original image of the photovoltaic glass region.

[0045] S200 removes noise from the original grayscale image while preserving its main structure and texture information.

[0046] Furthermore, the applicant discovered that during image acquisition, factors such as lighting and camera sensor input often result in noise in the images. Therefore, preprocessing, such as noise reduction, is necessary to better capture the texture features of the photovoltaic glass. Thus, a filter is used to smooth the image, removing noise from the original grayscale image, making it smoother without compromising edge information. Simultaneously, the main structure and texture information of the original grayscale image are preserved, facilitating subsequent gradient calculations.

[0047] S300, image gradient calculation, determines whether the glass texture grain features are reversed.

[0048] First, image gradient calculation is performed. A Sobel filter kernel is used as the filter kernel Sx in the x-direction. Then, the Sx filter kernel is transposed to obtain the filter kernel Sy in the y-direction. Finally, the two filter kernels are convolved with the grayscale image to obtain the gradients in the x and y directions, respectively. , Then, the gradient field of the original grayscale image is obtained to characterize the texture intensity of the original grayscale image. Next, the grayscale image is binarized, and gradients greater than a first threshold are extracted. Finally, the glass texture grain features are identified to determine whether the front and back of the photovoltaic glass are reversed.

[0049] More preferably, in order to reduce the amount of computation, in step S300, the approximation process is performed by summing the absolute values ​​of the gradients in the x and y directions to obtain an approximate value of the overall gradient magnitude, which is used to characterize the texture intensity of the original grayscale image.

[0050] In one embodiment, the photovoltaic glass front and back detection method further includes step S400, texture feature quantification.

[0051] Specifically, the gradient values ​​are divided into several different intervals. For example, the gradient values ​​from 0 to 255 are divided into 8 intervals at certain intervals. Within each interval, each pixel is used as the center point, and a circular region with radius r is established around the center point. Then, the grayscale difference between each pixel within the circular region and the center point is calculated. If the grayscale value of the pixel is greater than or equal to the grayscale value of the center point, the grayscale difference is defined as 1; otherwise, the grayscale difference is defined as 0. The obtained binary string is converted into a decimal number to obtain the LBP value of the pixel. This process is repeated until the LBP values ​​of all pixels in all intervals are obtained, forming an LBP feature map with the same size as the original grayscale image. That is, the LBP value of each pixel is mapped to the corresponding pixel, resulting in a fixed-dimensional vector for each interval, which serves as the local LBP feature vector for that interval. Then, the LBP texture features of each local LBP feature vector are statistically analyzed, and the LBP values ​​are converted into numerical values. Finally, the converted numerical values ​​are concatenated in sequence into a vector, which serves as the local binary pattern numerical gradient feature value of the grayscale image.

[0052] LBP stands for Local Binary Pattern, which can represent image texture features as a fixed-dimensional vector.

[0053] Therefore, based on the aforementioned steps of customizing the judgment thresholds for each type of photovoltaic glass, it is more convenient and intuitive to judge the thresholds for each type of photovoltaic glass, as well as to control or manage the threshold range. The implementation method of customizing the judgment thresholds for each type of photovoltaic glass can be referred to the previous text, and will not be repeated here.

[0054] This preferred embodiment of the invention automatically detects whether the front and back of photovoltaic glass are reversed based on the texture and particle characteristics of the front and back surfaces. This not only effectively improves the detection efficiency, but also makes the detection less susceptible to interference from external factors. It has high detection quality, low detection cost, strong operability, and is convenient to use.

[0055] It should be noted that the terms "first" and "second" used in this invention are for descriptive purposes only and do not indicate any order. They should not be construed as indicating or implying relative importance and can be interpreted as names.

[0056] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are merely examples and do not limit the invention. The advantages of the present invention have been fully and effectively realized. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments; any variations or modifications can be made to the implementation of the present invention without departing from these principles.

Claims

1. A method for detecting the front and back sides of photovoltaic glass, characterized in that, Includes the following steps: Customizable judgment thresholds are set for each type of photovoltaic glass. 500 to 3000 rounds of testing are conducted for each type of photovoltaic glass. The test results are then classified after data conversion to obtain the target area size. The millimeter-to-pixel ratio is obtained by numerical calculation between the actual size of the captured image and the target area size. The millimeter-to-pixel ratio is multiplied by the target area size to obtain the true size of the target area. Finally, the true size is divided into intervals to form the judgment size interval for each type of photovoltaic glass. Obtain the original image of the photovoltaic glass area and remove the edge light to obtain a black image; To calculate the area of ​​the target region, an array of processing kernels with rectangular internal data shapes is constructed. The processing kernels and the black image are dilated and iterated multiple times to obtain a data image for calculating the area of ​​the region. Then, based on the gray values ​​of adjacent black and white pixels in the data image, weight fusion, contour finding, and contour area calculation are performed sequentially to obtain the minimum bounding rectangle area. Finally, the minimum bounding rectangle area is converted to obtain the light and shadow area. Based on the light and shadow area, when detecting the front and back of a certain type of photovoltaic glass, if the size exceeds the corresponding judgment range, it is determined that the front or back of the photovoltaic glass is reversed.

2. The method for detecting the front and back sides of photovoltaic glass as described in claim 1, characterized in that, The process of removing edge light to obtain a black image specifically includes: Image dimensionality processing ensures that the image dimension is between 2 and 4. If it is multi-dimensional, redundant dimensions are removed. If it is low-dimensional, new dimensions are added on the basic dimensions and kept in RGB format. Image preprocessing involves first multiplying the image by 0.8 to the power of 8, then converting the image to grayscale, scaling the grayscale image to obtain a black image with data distributed between [0, 255], and then rotating the black image to keep the edge light at the top of the image. Calculate the edge light position and obtain the black image size. The width of the black image size is divided by 10 as the iteration interval. Then, iterate from 0 to the width size with the interval. The number of iterations in each round is the number of rows of image data to be calculated. Based on the number of rows of image data, iterate to find the index position of 255 pixels and store it in memory. After the iteration is completed, obtain the index list, discard the minimum and maximum values, and finally calculate the mean, which is the edge light position. Discard local image data containing edge light, and use an array based on the edge light location to discard and remove the image edge light.

3. The method for detecting the front and back sides of photovoltaic glass as described in claim 2, characterized in that, The process of converting the area of ​​the minimum bounding rectangle to obtain the light and shadow area specifically includes: The data conversion method is xyxy→xywh, and the converted x is the sum of the original x and the edge light position. Then, the size is scaled to obtain the light and shadow area.

4. The method for detecting the front and back sides of photovoltaic glass as described in claim 1, characterized in that, It also includes the following steps: The results of each round of detection of the light and shadow area are returned for processing, and the detection results and detection status of each round of detection are stored locally or in the cloud.

5. The method for detecting the front and back sides of photovoltaic glass as described in claim 1, characterized in that, It also includes the following steps: An alarm module thread is established to poll the light and shadow area returned in each round of detection, and iterates the alarm defects and alarm rules. An alarm operation is performed when an NG situation occurs. The alarm operation includes one or more of the following: voice alarm prompt, alarm stop, and pop-up reminder. The alarm rules are customized based on the number of defects within a predetermined time and the corresponding defect name.

6. A method for detecting the front and back sides of photovoltaic glass, characterized in that, Includes the following steps: The original image of the photovoltaic glass area is obtained and then converted to grayscale to obtain a grayscale original image with only one channel. Remove noise from the original grayscale image to make the image smoother, while preserving the main structure and texture information of the original grayscale image; Image gradient calculation uses a Sobel filter kernel as the filter kernel Sx in the x-direction. The transpose of the Sx filter kernel yields the filter kernel Sy in the y-direction. Convolving the two filter kernels with the grayscale image yields the gradients in the x and y directions, respectively. , Then, the gradient field of the original grayscale image is obtained to characterize the texture intensity of the original grayscale image. The grayscale image is then binarized, and gradients greater than the first threshold are extracted. Finally, the glass texture particle features are identified to determine whether the front and back of the photovoltaic glass are reversed.

7. The method for detecting the front and back sides of photovoltaic glass as described in claim 6, characterized in that, In the step of calculating the image gradient, an approximation is performed by summing the absolute values ​​of the gradients in the x and y directions to obtain an approximate value of the overall gradient magnitude, which is used to characterize the texture intensity of the original grayscale image.

8. The method for detecting the front and back sides of photovoltaic glass as described in claim 6, characterized in that, It also includes the following texture feature quantification steps: The gradient value is divided into several different intervals, and each pixel is taken as the center point in each interval. A circular region with radius r is established with the center point. Then, the gray value difference between each pixel in the circular region and the center point is calculated. If the gray value of the pixel is greater than or equal to the gray value of the center point, the gray value difference is defined as 1; otherwise, the gray value difference is defined as 0. The obtained binary string is converted into a decimal number to obtain the LBP value of the pixel, until the LBP values ​​of all pixels in all intervals are obtained, forming an LBP feature map with the same size as the original grayscale image; that is, the LBP value of each pixel is mapped to the corresponding pixel to obtain a fixed-dimensional vector for each interval, which serves as the local LBP feature vector of the interval. Then, the LBP texture features of each local LBP feature vector of the interval are statistically analyzed, and the LBP values ​​are converted into numerical values. Finally, the converted numerical values ​​are concatenated in order into a vector, which serves as the local binary mode numerical gradient feature value of the grayscale image.

9. The method for detecting the front and back sides of photovoltaic glass as described in claim 8, characterized in that, The texture feature quantification step also includes the following steps: Customize the judgment threshold for each type of photovoltaic glass, conduct 500 to 3000 rounds of testing for each type of photovoltaic glass, and classify the test results after data conversion to obtain the target area size; Then, the millimeter-to-pixel ratio is obtained by numerically calculating the actual size of the captured image and the size of the target area. The actual size of the target area is then obtained by multiplying the obtained millimeter-to-pixel ratio by the size of the target area. Finally, the actual dimensions are divided into intervals to form the determination size interval for each type of photovoltaic glass; When inspecting the front and back of a certain type of photovoltaic glass, if the size exceeds the corresponding judgment range, the front or back of the photovoltaic glass is judged to be reversed.