Photovoltaic grid backboard flaw detection method based on artificial intelligence and machine vision
By combining artificial intelligence and machine vision technology, the defects in the photovoltaic grid back panel are automatically detected, which solves the problem of missed inspection in traditional manual detection, and significantly improves the pass rate and the quality of photovoltaic modules.
Patent Information
- Application Number
- CN202411888600.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-05-13
AI Technical Summary
Traditional photovoltaic grid backplane inspection mainly relies on artificial naked eyes, resulting in defects that are prone to missed inspection, and the yield rate is difficult to ensure, which affects the power generation efficiency and quality of photovoltaic modules.
Using detection methods based on artificial intelligence and machine vision, we collect and preprocess the bright field images of the photovoltaic grid backplane, extract the grid backplane area, segment the coated and uncoated areas, conduct defect detection, and use an AI classifier to identify defect categories.
Automatically detect defect locations of photovoltaic grid back panels, improve the pass rate, reduce workers' labor intensity and employment costs, and improve the power generation efficiency and quality of photovoltaic modules.
Smart Images

Figure CN119985485A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of photovoltaic grid back panel defect detection, and in particular to a photovoltaic grid back panel defect detection method based on artificial intelligence and machine vision. Background Art
[0002] The production process of photovoltaic grid backplane mainly involves multiple coating processes. The mainstream production process mainly involves coating the first surface of the first transparent substrate layer with a photolithography composition to form a pre-cured coating; performing a first curing of the pre-cured coating corresponding to the grid area to form a grid layer; adding a reflective material to the gaps (coating areas) between the grid layers, and performing a second curing to obtain a grid backplane. The schematic diagram of the photovoltaic grid backplane is shown in FIG. Figure 2 As shown. The grid backplane produced by the above method has the advantages of high yield rate, good reflective effect, simple process, low cost, and easy industrialization. Based on the above production process, the photovoltaic grid backplane will have defects such as missing coating, scratches, wrinkles, and crystal points during the production process. Traditional photovoltaic grid backplane inspection is done by manual observation with the naked eye. Manual observation of defects is labor-intensive and easy to miss, which will lead to the failure to effectively guarantee the yield rate of photovoltaic grid backplane shipments, and ultimately affect the power generation efficiency of terminal photovoltaic modules and the quality of photovoltaic modules. Summary of the invention
[0003] In order to overcome the defects in the above-mentioned prior art, the present invention provides a photovoltaic grid backplane defect detection method based on artificial intelligence and machine vision. The algorithm combining machine vision and artificial intelligence can automatically detect the defect location, has strong operability, and can greatly improve the qualified rate of photovoltaic grid backplane.
[0004] To achieve the above object, the present invention adopts the following technical solutions, including:
[0005] A photovoltaic grid back panel defect detection method based on artificial intelligence and machine vision comprises the following steps:
[0006] Step 1: Collect bright field images of the entire width of the photovoltaic grid backplane, including the positive bright field images A of the upper and lower surfaces. o , B o and backlit brightfield images of the upper / lower surfaces C o ;
[0007] Step 2: Bright field image A o , B o , C o Perform preprocessing to obtain preprocessed bright field image A s , B s , C s ;
[0008] Step 3: Based on the pre-processed bright field image A s , B s , C s , extract the bright field image grid backplane area A Rwg , B Rwg , C Rwg ;
[0009] Step 4: Bright field image grid backplane area A Rwg , B Rwg , C Rwg Segment and extract to obtain the coated grid area A of the bright field image Rf , B Rf , C Rf and uncoated grid area A Rt , B Rt , C Rt ;
[0010] Step 5: Apply grid area A to the bright field image Rf , B Rf , C Rf Perform defect detection to obtain the defect area A of the bright field image coated grid area RfD , B RfD , C RfD ;
[0011] Step 6: Uncoated grid area A for bright field image Rt , B Rt , C Rt Perform defect detection to obtain the defect area A of the uncoated grid area in the bright field image. RtD , B RtD , C RtD ;
[0012] Step 7: According to defect area A RfD , B RfD , C RfD and A RtD , B RtD , C RtD , from the bright field image A o , B o , C o Extract defect images.
[0013] Preferably, in step 2, the bright field image A o , B o , C o Use a filter with a certain pixel size to filter and obtain the preprocessed bright field image A s , B s , C s; The filter is a mean filter, a median filter, a low-pass filter or a Gaussian filter in the spatial domain filter; or the filter is a wavelet transform filter, a Fourier transform filter or a cosine transform filter in the frequency domain filter; or the filter is a morphological filter that performs denoising by morphological operations in the form of dilation and corrosion.
[0014] Preferably, the specific processing process of step 3 is as follows:
[0015] Step 3.1: Preprocess bright field image A s , B s , C s Perform horizontal edge detection and grayscale morphological operations respectively to obtain the processed bright field image A m , B m , C m ;
[0016] Step 3.2: Set the grayscale threshold to d1. m , B m , C m Perform threshold segmentation to filter out pixels with grayscale values greater than d1, thus obtaining area A Rm , B Rm , C Rm ;
[0017] Step 3.3: For area A Rm , B Rm , C Rm Perform connected domain analysis respectively, then select the connected areas with the largest height respectively, obtain the horizontal coordinate value of each connected area, and draw each rectangular area according to the horizontal coordinate value to obtain the bright field image grid backplane area A Rwg , B Rwg , C Rwg .
[0018] Preferably, in step 4, no coated grid area A Rt , B Rt , C Rt The segmentation extraction is as follows:
[0019] Step 4.1: The uncoated grid area consists of two parts, denoted as A and Rt1 , B Rt1 , C Rt1 and A Rt2 , B Rt2 , C Rt2 ;
[0020] Uncoated grid area A Rt1 , B Rt1 , C Rt1Extraction: First generate an elliptical structure element S of a certain pixel size e , use S e Preprocessed bright field image A s , B s , C s Grayscale morphological top-hat transformation, filtering operations of a certain pixel size and grayscale contrast enhancement are performed respectively, and then the obtained image is subjected to threshold segmentation and connected domain analysis. After that, the uncoated grid area A is selected according to the width range of the uncoated grid area and the connected domain width value. Rt1 , B Rt1 , C Rt1 ;
[0021] Step 4.2: Uncoated grid area A Rt2 , B Rt2 , C Rt2 Extraction: First, perform the first step of rough segmentation to extract the fuzzy uncoated mesh area A Rt3 , B Rt3 , C Rt3 , and then perform the second step of fine segmentation to extract the uncoated grid area A Rt2 , B Rt2 , C Rt2 ;
[0022] Step 4.3: Area A obtained in step 4.1 Rt1 , B Rt1 , C Rt1 The area A obtained in step 4.2 Rt2 , B Rt2 , C Rt2 The corresponding merged, that is, the uncoated grid area A is obtained Rt , B Rt , C Rt .
[0023] Preferably, in step 4, the uncoated grid area A Rt , B Rt , C Rt As a reference, segment and extract the coated grid area A of the grid backplane area in the bright field image Rf , B Rf , C Rf :
[0024] Take a bright field image of the grid backplane area A Rwg , B Rwg , C Rwg With uncoated grid area A Rt , B Rt , C Rt Perform a regional difference operation, and then perform a regional union operation on the obtained area to obtain the coated grid area A of the bright field image grid backplane areaRf , B Rf , C Rf .
[0025] Preferably, the specific processing process of step 4.2 is as follows:
[0026] Step 4.2.1, coarse segmentation extraction: pre-process the bright field image A s , B s , C s First, edge detection is performed, and then a filter of a certain pixel size is used to filter the image. Then, the image is segmented by threshold, and then connected domain analysis is performed. The qualified areas are screened out according to the shape characteristic parameters of the connected domain. Then, the domain of the entire image and the screened areas are used for regional difference operation. Then, the area after the difference operation is compared with the grid backplane area A of the bright field image. Rwg , B Rwg , C Rwg Perform region intersection operation to obtain the fuzzy uncoated mesh region A Rt3 , B Rt3 , C Rt3 ;
[0027] Step 4.2.2, fine segmentation extraction: calculate the bright field image grid backplane area A separately Rwg , B Rwg , C Rwg The width value of each area is divided into the grid backplane area A according to the width value of each area. Rwg , B Rwg , C Rwg Each is divided into N areas, denoted as A Rwgs1 , A Rwgs2 , ..., A RwgsN , B Rwgs1 , B Rwgs2 , ..., B RwgsN , C Rwgs1 , C Rwgs2 , ..., C RwgsN , for each of the N regions and the fuzzy uncoated grid region A Rt3 , B Rt3 , C Rt3 Correspondingly, the region intersection operation is performed, and then the grayscale average value of the intersection area is calculated, and this grayscale average value is used as the reference threshold to process the bright field image A s , B s , C s Perform threshold segmentation to obtain area A Rwgso1 , A Rwgso2 , ..., A RwgsoN , B Rwgso1 , B Rwgso2 , ..., B RwgsoN, C Rwgso1 , C Rwgso2 , ..., C RwgsoN , then A Rwgso1 , A Rwgso2 , ..., A RwgsoN The regions are merged into a new region, denoted as A RGtm4 , B Rwgso1 , B Rwgso2 , ..., B RwgsoN The regions are merged into a new region, denoted as B RGtm4 , C Rwgso1 , C Rwgso2 , ..., C RwgsoN The regions are merged into a new region, denoted as C RGtm4 ; For area A RGtm4 , B RGtm4 and C RGtm4 Perform grayscale morphological operations of a certain pixel size to obtain the uncoated grid area A Rt2 , B Rt2 , C Rt2 .
[0028] Preferably, the specific processing process of step 5 is as follows:
[0029] Step 5.1: Preprocess the bright field image A s , B s , C s Use two filters with different pixel sizes (w1, h1) and (w2, h2) to perform filtering, and obtain images A with the same pixel size and different grayscale after processing. sb , B sb , C sb and A ss , B ss , C ss ;
[0030] Step 5.2: Using the pixel size (w1, h1) as the reference value, the coated grid area A of the grid backplane area of the bright field image is respectively Rf , B Rf , C Rf Perform morphological corrosion operations to obtain the eroded area A RfE1 , B RfE1 , C RfE1 ; Taking the pixel size (w2, h2) as the reference value, the coated grid area A of the bright field image grid backplane area is Rf , B Rf , C Rf Perform morphological corrosion operations to obtain the eroded area A RfE2 , B RfE2 , C RfE2 ;
[0031] Step 5.3: Preprocess the bright field image A s , B s , C s and image A in step 5.1 sb , B sb , C sb Correspondingly, image subtraction operations are performed to obtain grayscale difference images A and min , B min , C min ; Preprocess the bright field image A s , B s , C s and image A in step 5.1 ss , B ss , C ss Correspondingly, image subtraction operations are performed to obtain grayscale difference images A and max , B max , C max ; Then the gray difference image A min , B min , C min Use gray threshold A respectively fv , B fv , C fv Perform threshold segmentation and use the obtained area to compare with area A in step 5.2 RfE1 , B RfE1 , C RfE1 Perform region intersection operation to obtain region A RfD1 , B RfD1 , C RfD1 ; Then the gray difference image A max , B max , C max Use gray threshold A respectively fv , B fv , C fv Perform threshold segmentation and use the obtained area to compare with area A in step 5.2 RfE2 , B RfE2 , C RfE2 Perform region intersection operation to obtain region A RfD2 , B RfD2 , C RfD2 ;
[0032] Step 5.4: Area A in step 5.3 RfD1 , B RfD1 , C RfD1 and A RfD2 , B RfD2 , C RfD2 The corresponding merged image shows the defect area A in the bright field image coated grid area.RfD , B RfD , C RfD , realizing the defect detection of coated grid area in bright field image.
[0033] Preferably, the specific processing process of step 6 is as follows:
[0034] Step 6.1: Using the pixel size (w1, h1) in step 5.1 as the reference value, the uncoated grid area A of the grid backplane area of the bright field image is respectively Rt , B Rt , C Rt Perform morphological corrosion operations to obtain the eroded area A RtE1 , B RtE1 , C RtE1 ; Using the pixel size (w2, h2) in step 5.1 as the reference value, the uncoated grid area A of the grid backplane area of the bright field image is respectively Rt , B Rt , C Rt Perform morphological corrosion operations to obtain the eroded area A RtE2 , B RtE2 , C RtE2 ;
[0035] Step 6.2: Use the gray threshold A described in step 5.3 fv , B fv , C fv Different grayscale thresholds A as the benchmark tv , B tv , C tv , respectively for the grayscale difference image A described in step 5.3 min , B min , C min Perform threshold segmentation and use the obtained area to compare with A in step 6.1 RtE1 , B RtE1 , C RtE1 Perform region intersection operation to obtain region A RtD1 , B RtD1 , C RtD1 ; Then use the gray threshold A tv , B tv , C tv The grayscale difference image A described in step 5.3 is max , B max , C max Perform threshold segmentation and use the obtained area to compare with A in step 6.1 RtE2 , B RtE2 , C RtE2 Perform region intersection operation to obtain region A RtD2 , B RtD2 , CRtD2 ;
[0036] Among them, in step 6.2, the gray threshold A tv , B tv , C tv The calculation method is as follows: First calculate the coated grid area A of the bright field image grid backplane area Rf , B Rf , C Rf The grayscale mean A fmean , B fmean , C fmean , and then calculate the uncoated grid area A Rt , B Rt , C Rt The grayscale mean A tmean , B tmean , C tmean , grayscale threshold A tv , B tv , C tv The calculation formula is as follows:
[0037]
[0038] Step 6.3: Area A in step 6.3 RtD1 , B RtD1 , C RtD1 and A RtD2 , B RtD2 , C RtD2 The corresponding merged image shows the defect area A without the coated grid area in the bright field image. RtD , B RtD , C RtD , complete the defect detection of the uncoated grid area in the bright field image.
[0039] Preferably, the specific processing process of step 7 is as follows: respectively obtain the defect area A of the bright field image coating grid area RfD , B RfD , C RfD and defect area A of the uncoated mesh area RtD , B RtD , C RtD The midpoint position coordinates of the bright field image A are taken as the center point. o , B o , C o Capture a defect image that is appropriate to the defect size.
[0040] Preferably, the following steps are also included: Step 8, after the defect image is sent to the AI classifier for classification prediction to obtain its defect category, the defect area, defect image and defect category are displayed on the detection software interface; alarm and labeling are performed according to the detection results to complete the defect detection of the photovoltaic grid backplane;
[0041] Among them, based on the previous defect images and defect categories collected, the pre-established AI classifier is trained to obtain a defect image classification model.
[0042] The advantages of the present invention are:
[0043] (1) The present invention can automatically detect the location of defects on photovoltaic grid back panels through an algorithm that combines machine vision with artificial intelligence. It has strong operability and can greatly improve the pass rate of photovoltaic grid back panels, solving the problem of easy missed detection in existing manual observation.
[0044] (2) The present invention greatly reduces the labor intensity of workers and can reduce the number of inspection personnel according to the label position, thereby reducing the company's labor costs and improving the company's production efficiency.
[0045] (3) The present invention greatly improves the yield rate of the enterprise's photovoltaic grid backplane shipments, bringing greater economic benefits to the enterprise. By detecting defects, the quality of the photovoltaic grid backplane can be improved, and the power generation efficiency of the photovoltaic modules can be effectively improved.
[0046] (4) The present invention can automatically detect defective images of photovoltaic grid back panels, label the defective locations, and send the defective images to an AI classifier for classification and prediction to obtain the defect category. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 The present invention is a flow chart of a photovoltaic grid back panel defect detection method based on artificial intelligence and machine vision.
[0048] Figure 2 Schematic diagram of photovoltaic grid backplane.
[0049] Figure 3 Schematic diagram of collecting bright field images of photovoltaic grid backplane. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] Depend on Figure 1 As shown, a photovoltaic grid back panel defect detection method based on artificial intelligence and machine vision, the specific steps are as follows:
[0052] Step 1: Collect bright field images.
[0053] An industrial camera is used to capture the bright field image of the entire width of the online mobile photovoltaic grid backplane, including the positive bright field image A of the upper and lower surfaces. o , B o and back bright field image C o ; The collected positive bright field image A o , B o and back bright field image C o The industrial camera is preferably an industrial line array camera; the central processor is preferably a digital controller with a human-machine interface, such as an embedded control system or an industrial computer.
[0054] Among them, the back bright field image C o It is a backlit bright field image of the upper or lower surface. A normal light image is an image taken when the camera and light source are located on the same side of the object to be measured; a backlit image is an image taken when the camera and light source are located on the two sides of the object to be measured. The operation of imaging the transmitted beam is called a bright field operation, and the image formed is called a bright field image.
[0055] Depend on Figure 3 As shown, two industrial cameras 1a, 1b and two light sources 2a, 2b are used to collect bright field images of the entire width of the photovoltaic grid backplane, wherein the camera 1a and the light source 2a are used to collect the positive bright field image A of the upper surface o , use camera 1b and light source 2b to collect the positive bright field image B of the lower surface o , using camera 1b and light source 2a to collect the backlit bright field image C of the lower surface o .
[0056] Step 2: Bright field image preprocessing.
[0057] The central processor processes the bright field image A in step 1. o , B o , C o Use a filter with a certain pixel size to filter and obtain the preprocessed bright field image A s , B s , C s; For example, use a 3×3 pixel or 5×5 pixel filter for filtering; in this step, the filter may be a mean filter, a median filter, a low-pass filter, or a Gaussian filter in the spatial domain filter; or the filter may be a wavelet transform filter, a Fourier transform filter, or a cosine transform filter in the frequency domain filter; or the filter may be a morphological filter that performs denoising by morphological operations in the form of dilation and erosion.
[0058] Step 3: Extract the grid backplane area of the bright field image.
[0059] Step 3.1: The central processing unit processes the pre-processed bright field image A in step 2. s , B s , C s Perform horizontal edge detection and grayscale morphological operations respectively to obtain the processed bright field image A m , B m , C m In this step, edge detection is preferably performed on each bright field image using the Sobel algorithm, or the Roberts algorithm, or the Prewitt algorithm, or the Laplacian algorithm, or the Canny algorithm.
[0060] Step 3.2: Set the grayscale threshold to d1. m , B m , C m Perform threshold segmentation to filter out pixels with grayscale values greater than d1, thus obtaining area A Rm , B Rm , C Rm ; The threshold segmentation methods mentioned in step 3.2 include grayscale histogram-based threshold segmentation method, adaptive threshold segmentation method, maximum entropy threshold segmentation method and maximum inter-class variance threshold segmentation method.
[0061] Step 3.3: For area A in step 3.2 Rm , B Rm , C Rm Perform connected domain analysis respectively, then select the connected areas with the largest height respectively, obtain the horizontal coordinate value of each connected area, and draw each rectangular area according to the horizontal coordinate value and the position of the industrial camera to obtain the bright field image grid backplane area A Rwg , B Rwg , C Rwg ; The bright field image is divided into two parts according to the area definition, mainly including the bright field image grid backplane area and the bright field image non-grid backplane area. The bright field image non-grid backplane area does not need to detect defects, so only the bright field image grid backplane area is extracted.
[0062] Step 4: Segment and extract the coated grid area and the uncoated grid area of the grid backplane area in the bright field image. Figure 2 shown.
[0063] Step 4.1: The coated grid area of the bright field image grid backplane area is recorded as A Rf , B Rf , C Rf , the uncoated grid area is marked as A Rt , B Rt , C Rt .
[0064] First, the uncoated grid area is segmented and extracted. The uncoated grid area consists of two parts, which are denoted as A and Rt1 , B Rt1 , C Rt1 and A Rt2 , B Rt2 , C Rt2 .
[0065] First, the uncoated grid area A Rt1 , B Rt1 , C Rt1 The extraction process is as follows: an elliptical structural element S with a certain pixel size is generated. e , for example, using an elliptical structure element S of 10×10 pixels e , use S e For the pre-processed bright field image A in step 3.1 above s , B s Grayscale morphological top-hat transformation and filtering operations of a certain pixel size and grayscale contrast enhancement are performed respectively. For example, the filter size can be set to 5×1. Then, the obtained image is subjected to threshold segmentation and connected domain analysis. After that, the uncoated grid area A is selected according to the width range of the uncoated grid area and the connected domain width value. Rt1 , B Rt1 ; Use S e The pre-processed bright field image C in step 3.1 above s Grayscale morphological bottom hat transformation and filtering operations of a certain pixel size and grayscale contrast enhancement are performed respectively. For example, the filter size can be set to 5×1. Then, the obtained image is subjected to threshold segmentation and connected domain analysis. After that, the uncoated grid area C is selected according to the width range of the uncoated grid area and the connected domain width value. Rt1 .
[0066] Step 4.2: Uncoated grid area A Rt2 , B Rt2 , C Rt2The main steps of segmentation and extraction of this area are divided into two steps. First, the first step is rough segmentation and extraction to obtain the fuzzy uncoated mesh area A. Rt3 , B Rt3 , C Rt3 , and then perform the second step of fine segmentation to extract the uncoated grid area A Rt2 , B Rt2 , C Rt2 The details are as follows:
[0067] Step 4.2.1, the blurred uncoated grid area A in step 4.2 Rt3 , B Rt3 , C Rt3 The segmentation and extraction steps are as follows, that is, the first step of rough segmentation and extraction steps described in step 4.2 are expanded as follows, respectively, for the pre-processed bright field image A in step 2 s , B s , C s First, edge detection is performed, and then the image is filtered using a filter of a certain pixel size. Then, the image is segmented by threshold, and then connected domain analysis is performed. The qualified areas are screened out according to the shape characteristic parameters of the connected domain. Then, the domain of the entire image and the screened areas are used for regional difference operation. Then, the area after the difference operation is compared with the bright field image grid backplane area A in step 3.3. Rwg , B Rwg , C Rwg Perform region intersection operation to obtain the fuzzy uncoated mesh region A Rt3 , B Rt3 , C Rt3 .
[0068] Step 4.2.2, uncoated grid area A in step 4.2 Rt2 , B Rt2 , C Rt2 The segmentation and extraction steps are as follows, that is, the second step of fine segmentation and extraction steps described in step 4.2 are expanded as follows, respectively calculating the bright field image grid backplane area A in step 3.3 Rwg , B Rwg , C Rwg The width value of each area is divided into the grid backplane area A according to the width value of each area. Rwg , B Rwg , C Rwg Each is divided into N areas, denoted as A Rwgs1 , A Rwgs2 , ..., A RwgsN , B Rwgs1 , B Rwgs2 , ..., B RwgsN , C Rwgs1 , C Rwgs2 , ..., CRwgsN , perform the following operations on each of the N regions: Rwgs1 , A Rwgs2 ...A RwgsN ., B Rwgs1 , B Rwgs2 , ..., B RwgsN , C Rwgs1 , C Rwgs2 , ..., C RwgsN The blurred uncoated grid area A in step 4.2.1 Rt3 , B Rt3 , C Rt3 The corresponding area intersection operation is performed, and then the grayscale average value of the intersection area is calculated. This grayscale average value is used as the reference threshold for the preprocessed bright field image A in step 3.1. s , B s , C s Perform threshold segmentation to obtain area A Rwgso1 , A Rwgso2 , ..., A RwgsoN , B Rwgso1 , B Rwgso2 , ..., B RwgsoN , C Rwgso1 , C Rwgso2 , ..., C RwgsoN , then A Rwgso1 , A Rwgso2 , ..., A RwgsoN The regions are merged into a new region, denoted as A RGtm4 , B Rwgso1 , B Rwgso2 , ..., B RwgsoN The regions are merged into a new region, denoted as B RGtm4 , C Rwgso1 , C Rwgso2 , ..., C RwgsoN The regions are merged into a new region, denoted as C RGtm4 ; For area A RGtm4 , B RGtm4 and C RGtm4 Perform grayscale morphological operations at a certain pixel size to obtain the uncoated grid area A described in step 4.1 Rt2 , B Rt2 , C Rt2 .
[0069] Step 4.3: Area A Rt1 , B Rt1 , C Rt1 With area A Rt2 , B Rt2 , C Rt2The corresponding merge is to obtain the uncoated grid area A described in step 4.1 Rt , B Rt , C Rt .
[0070] Step 4.4: After steps 4.1 to 4.3, the uncoated grid area A of the grid backplane area of the bright field image is obtained. Rt , B Rt , C Rt Next, A Rt , B Rt , C Rt As a reference, segment and extract the coated grid area A of the grid backplane area in the bright field image Rf , B Rf , C Rf ; The steps are as follows: take the bright field image grid backplane area A Rwg , B Rwg , C Rwg Uncoated grid area A with bright field image of grid backing area Rt , B Rt , C Rt Perform a regional difference operation, and then perform a regional union operation on the obtained area to obtain the coated grid area A of the bright field image grid backplane area Rf , B Rf , C Rf .
[0071] Step 5: Bright field image coating grid area defect detection.
[0072] Step 5.1: respectively process the pre-processed bright field image A in step 2 s , B s , C s Use two filters with different pixel sizes (w1, h1) and (w2, h2) to perform filtering, and obtain six images A with the same pixel size and different grayscale after processing. sb , B sb , C sb and A ss , B ss , C ss ; For example, use 35×35 pixel and 17×17 pixel filters for filtering.
[0073] Step 5.2: Using the pixel size (w1, h1) in step 5.1 as the reference value, the coated grid area A of the grid backplane area of the bright field image is respectively Rf , B Rf , C Rf Perform morphological corrosion operations to obtain the eroded area A RfE1 , B RfE1 , CRfE1 ; Using the pixel size (w2, h2) in step 5.1 as the reference value, the coated grid area A of the bright field image grid backplane area is Rf , B Rf , C Rf Perform morphological corrosion operations to obtain the eroded area A RfE2 , B RfE2 , C RfE2 .
[0074] Step 5.3: respectively process the pre-processed bright field image A in step 2 s , B s , C s and A in step 5.1 sb , B sb , C sb Correspondingly, image subtraction operations are performed to obtain grayscale difference images A and min , B min , C min , for the preprocessed bright field image A in step 2 s , B s , C s and A in step 5.1 ss , B ss , C ss Correspondingly, image subtraction operations are performed to obtain grayscale difference images A and max , B max , C max ; Then first grayscale difference image A min , B min , C min Use gray threshold A respectively fv , B fv , C fv Perform threshold segmentation and use the obtained area to compare with A in step 5.2 RfE1 , B RfE1 , C RfE1 Perform region intersection operation to obtain region A RfD1 , B RfD1 , C RfD1 ; Then the gray difference image A max , B max , C max Use gray threshold A respectively fv , B fv , C fv Perform threshold segmentation and use the obtained area to compare with A in step 5.2 RfE2 , B RfE2 , C RfE2 Perform region intersection operation to obtain region A RfD2 , B RfD2 , CRfD2 .
[0075] Step 5.4: Area A described in step 5.3 RfD1 , B RfD1 , C RfD1 and A RfD2 , B RfD2 , C RfD2 The corresponding merged image shows the defect area A in the bright field image coated grid area. RfD , B RfD , C RfD Through the above steps, the defect detection of the coated grid area of the bright field image is completed.
[0076] Step 6: Detect defects in the uncoated grid area of the bright field image.
[0077] Step 6.1: Using the pixel size (w1, h1) in step 5.1 as the reference value, the uncoated grid area A of the grid backplane area of the bright field image is respectively Rt , B Rt , C Rt Perform morphological corrosion operations to obtain the eroded area A RtE1 , B RtE1 , C RtE1 ; Using the pixel size (w2, h2) in step 5.1 as the reference value, the uncoated grid area A of the grid backplane area of the bright field image is respectively Rt , B Rt , C Rt Perform morphological corrosion operations to obtain the eroded area A RtE2 , B RtE2 , C RtE2 .
[0078] Step 6.2: Use the gray threshold A described in step 5.3 fv , B fv , C fv Different grayscale thresholds A as the benchmark tv , B tv , C tv The grayscale difference image A described in step 5.3 is min , B min , C min Perform threshold segmentation and use the obtained area to compare with A in step 6.1 RtE1 , B RtE1 , C RtE1 Perform region intersection operation to obtain region A RtD1 , B RtD1 , C RtD1 ; Then use the gray threshold A tv , B tv , C tvThe grayscale difference image A described in step 5.3 is max , B max , C max Perform threshold segmentation and use the obtained area to compare with A in step 6.1 RtE2 , B RtE2 , C RtE2 Perform region intersection operation to obtain region A RtD2 , B RtD2 , C RtD2 ; The gray threshold A tv , B tv , C tv The calculation steps are as follows: first calculate the coated grid area A of the bright field image grid backplane area described in step 4.1 Rf , B Rf , C Rf The grayscale mean A fmean , B fmean , C fmean Then calculate the uncoated grid area A Rt , B Rt , C Rt The grayscale mean A tmean , B tmean , C tmean , grayscale threshold A tv , B tv , C tv The calculation formula is as follows:
[0079]
[0080] Step 6.3: Area A described in step 6.3 RtD1 , B RtD1 , C RtD1 and A RtD2 , B RtD2 , C RtD2 The corresponding merged image shows the defect area A without the coated grid area in the bright field image. RtD , B RtD , C RtD Through the above steps, the defect detection of the uncoated grid area in the bright field image is completed.
[0081] Step 7: Extract defective image.
[0082] Calculate the defect area A of the bright field image coated grid area described in step 5.4 respectively RfD , B RfD , C RfD The bright field image of step 6.3 shows no defects in the coated grid area A RtD , B RtD , C RtDThe midpoint position coordinates of the bright field image A are taken as the center point. o , B o , C o Capture a defect image that is appropriate to the defect size.
[0083] Step 8: The CPU sends the defect image to the AI classifier to obtain its defect category.
[0084] The central processing unit sends the defect image obtained in step 7 to the AI classifier for classification prediction to obtain its defect category, and then displays the defect area, defect image and defect category on the detection software interface. The central processing unit controls the alarm and labeling to complete the defect detection of the photovoltaic grid backplane; based on the previous defect images and defect categories collected, the pre-established AI classifier is trained to obtain a defect image classification model.
[0085] After trial, the present invention can automatically detect the defect location and label near the defect location, has strong operability, can greatly improve the qualified rate of photovoltaic grid backplane, and solve the problem of easy missed detection in existing manual observation.
[0086] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A photovoltaic grid backsheet defect detection method based on artificial intelligence and machine vision, characterized in that: The following steps are involved: Step 1: Collect bright field images of the entire width of the photovoltaic grid backplane, including the positive bright field images A of the upper and lower surfaces. o , B o and backlit brightfield images of the upper / lower surfaces C o ; Step 2: Bright field image A o , B o , C o Perform preprocessing to obtain preprocessed bright field image A s , B s , C s ; Step 3: Based on the pre-processed bright field image A s , B s , C s , extract the bright field image grid backplane area A Rwg , B Rwg , C Rwg ; Step 4: Bright field image grid backplane area A Rwg , B Rwg , C Rwg Segment and extract to obtain the coated grid area A of the bright field image Rf , B Rf , C Rf and uncoated grid area A Rt , B Rt , C Rt ; Step 5: Apply grid area A to the bright field image Rf , B Rf , C Rf Perform defect detection to obtain the defect area A of the bright field image coated grid area RfD , B RfD , C RfD ; Step 6: Uncoated grid area A for bright field image Rt , B Rt , C Rt Perform defect detection to obtain the defect area A of the uncoated grid area in the bright field image. RtD , B RtD , C RtD ; Step 7: According to defect area A RfD , B RfD , C RfD and A RtD , B RtD , C RtD , from the bright field image A o , B o , C o Extract defect images.
2. The photovoltaic grid back panel defect detection method based on artificial intelligence and machine vision according to claim 1, characterized in that: In step 2, the bright field image A o , B o , C o Use a filter with a certain pixel size to filter and obtain the preprocessed bright field image A s , B s , C s ; The filter is a mean filter, a median filter, a low-pass filter or a Gaussian filter in the spatial domain filter; or the filter is a wavelet transform filter, a Fourier transform filter or a cosine transform filter in the frequency domain filter; or the filter is a morphological filter that performs denoising by morphological operations in the form of dilation and corrosion.
3. The photovoltaic grid back panel defect detection method based on artificial intelligence and machine vision according to claim 1, characterized in that: The specific processing process of step 3 is as follows: Step 3.1: Preprocess bright field image A s , B s , C s Perform horizontal edge detection and grayscale morphological operations respectively to obtain the processed bright field image A m , B m , C m ; Step 3.2: Set the grayscale threshold to d1. m , B m , C m Perform threshold segmentation to filter out pixels with grayscale values greater than d1, thus obtaining area A Rm , B Rm , C Rm ; Step 3.3: For area A Rm , B Rm , C Rm Perform connected domain analysis respectively, then select the connected areas with the largest height respectively, obtain the horizontal coordinate value of each connected area, and draw each rectangular area according to the horizontal coordinate value to obtain the bright field image grid backplane area A Rwg , B Rwg , C Rwg .
4. The photovoltaic grid back panel defect detection method based on artificial intelligence and machine vision according to claim 1, characterized in that: In step 4, the uncoated grid area A Rt , B Rt , C Rt The segmentation extraction is as follows: Step 4.1: The uncoated grid area consists of two parts, denoted as A and Rt1 , B Rt1 , C Rt1 and A Rt2 , B Rt2 , C Rt2 ; Uncoated grid area A Rt1 , B Rt1 , C Rt1 Extraction: First generate an elliptical structure element S of a certain pixel size e , use S e Preprocessed bright field image A s , B s , C s Grayscale morphological top-hat transformation, filtering operations of a certain pixel size and grayscale contrast enhancement are performed respectively, and then the obtained image is subjected to threshold segmentation and connected domain analysis. After that, the uncoated grid area A is selected according to the width range of the uncoated grid area and the connected domain width value. Rt1 , B Rt1 , C Rt1 ; Step 4.2: Uncoated grid area A Rt2 , B Rt2 , C Rt2 Extraction: First, perform the first step of rough segmentation to extract the fuzzy uncoated mesh area A Rt3 , B Rt3 , C Rt3 , and then perform the second step of fine segmentation to extract the uncoated grid area A Rt2 , B Rt2 , C Rt2 ; Step 4.3: Area A obtained in step 4.1 Rt1 , B Rt1 , C Rt1 The area A obtained in step 4.2 Rt2 , B Rt2 , C Rt2 The corresponding merged, that is, the uncoated grid area A is obtained Rt , B Rt , C Rt .
5. The photovoltaic grid back panel defect detection method based on artificial intelligence and machine vision according to claim 4, characterized in that: In step 4, the uncoated grid area A Rt , B Rt , C Rt As a reference, segment and extract the coated grid area A of the grid backplane area in the bright field image Rf , B Rf , C Rf : Take a bright field image of the grid backplane area A Rwg , B Rwg , C Rwg With uncoated grid area A Rt , B Rt , C Rt Perform a regional difference operation, and then perform a regional union operation on the obtained area to obtain the coated grid area A of the bright field image grid backplane area Rf , B Rf , C Rf .
6. The photovoltaic grid back panel defect detection method based on artificial intelligence and machine vision according to claim 4, characterized in that: The specific processing process of step 4.2 is as follows: Step 4.2.1, coarse segmentation extraction: pre-process the bright field image A s , B s , C s First, edge detection is performed, and then a filter of a certain pixel size is used to filter the image. Then, the image is segmented by threshold, and then connected domain analysis is performed. The qualified areas are screened out according to the shape characteristic parameters of the connected domain. Then, the domain of the entire image and the screened areas are used for regional difference operation. Then, the area after the difference operation is compared with the grid backplane area A of the bright field image. Rwg , B Rwg , C Rwg Perform region intersection operation to obtain the fuzzy uncoated mesh region A Rt3 , B Rt3 , C Rt3 ; Step 4.2.2, fine segmentation extraction: calculate the bright field image grid backplane area A separately Rwg , B Rwg , C Rwg The width value of each area is divided into the grid backplane area A according to the width value of each area. Rwg , B Rwg , C Rwg Each is divided into N areas, denoted as A Rwgs1 , A Rwgs2 , ..., A RwgsN , B Rwgs1 , B Rwgs2 , ..., B RwgsN , C Rwgs1 , C Rwgs2 , ..., C RwgsN , for each of the N regions and the fuzzy uncoated grid region A Rt3 , B Rt3 , C Rt3 Correspondingly, the region intersection operation is performed, and then the grayscale average value of the intersection area is calculated, and this grayscale average value is used as the reference threshold to process the bright field image A s , B s , C s Perform threshold segmentation to obtain area A Rwgso1 , A Rwgso2 , ..., A RwgsoN , B Rwgso1 , B Rwgso2 , ..., B RwgsoN , C Rwgso1 , C Rwgso2 , ..., C RwgsoN , then A Rwgso1 , A Rwgso2 , ..., A RwgsoN The regions are merged into a new region, denoted as A RGtm4 , B Rwgso1 , B Rwgso2 , ..., B RwgsoN The regions are merged into a new region, denoted as B RGtm4 , C Rwgso1 , C Rwgso2 , ..., C RwgsoN The regions are merged into a new region, denoted as C RGtm4 ; For area A RGtm4 , B RGtm4 and C RGtm4 Perform grayscale morphological operations of a certain pixel size to obtain the uncoated grid area A Rt2 , B Rt2 , C Rt2 .
7. The photovoltaic grid back panel defect detection method based on artificial intelligence and machine vision according to claim 4, characterized in that: The specific processing process of step 5 is as follows: Step 5.1: Preprocess the bright field image A s , B s , C s Use two filters with different pixel sizes (w1, h1) and (w2, h2) to perform filtering, and obtain images A with the same pixel size and different grayscale after processing. sb , B sb , C sb and A ss , B ss , C ss ; Step 5.2: Using the pixel size (w1, h1) as the reference value, the coated grid area A of the grid backplane area of the bright field image is respectively Rf , B Rf , C Rf Perform morphological corrosion operations to obtain the eroded area A RfE1 , B RfE1 , C RfE1 ; Taking the pixel size (w2, h2) as the reference value, the coated grid area A of the bright field image grid backplane area is Rf , B Rf , C Rf Perform morphological corrosion operations to obtain the eroded area A RfE2 , B RfE2 , C RfE2 ; Step 5.3: Preprocess the bright field image A s , B s , C s and image A in step 5.1 sb , B sb , C sb Correspondingly, image subtraction operations are performed to obtain grayscale difference images A and min , B min , C min ; Preprocess the bright field image A s , B s , C s and image A in step 5.1 ss , B ss , C ss Correspondingly, image subtraction operations are performed to obtain grayscale difference images A and max , B max , C max ; Then the gray difference image A min , B min , C min Use gray threshold A respectively fv , B fv , C fv Perform threshold segmentation and use the obtained area to compare with area A in step 5.2 RfE1 , B RfE1 , C RfE1 Perform region intersection operation to obtain region A RfD1 , B RfD1 , C RfD1 ; Then the gray difference image A max , B max , C max Use gray threshold A respectively fv , B fv , C fv Perform threshold segmentation and use the obtained area to compare with area A in step 5.2 RfE2 , B RfE2 , C RfE2 Perform region intersection operation to obtain region A RfD2 , B RfD2 , C RfD2 ; Step 5.4: Area A in step 5.3 RfD1 , B RfD1 , C RfD1 and A RfD2 , B RfD2 , C RfD2 The corresponding merged image shows the defect area A in the bright field image coated grid area. RfD , B RfD , C RfD , realizing the defect detection of coated grid area in bright field image.
8. The photovoltaic grid back panel defect detection method based on artificial intelligence and machine vision according to claim 7, characterized in that: The specific processing process of step 6 is as follows: Step 6.1: Using the pixel size (w1, h1) in step 5.1 as the reference value, the uncoated grid area A of the grid backplane area of the bright field image is respectively Rt , B Rt , C Rt Perform morphological corrosion operations to obtain the eroded area A RtE1 , B RtE1 , C RtE1 ; Using the pixel size (w2, h2) in step 5.1 as the reference value, the uncoated grid area A of the grid backplane area of the bright field image is respectively Rt , B Rt , C Rt Perform morphological corrosion operations to obtain the eroded area A RtE2 , B RtE2 , C RtE2 ; Step 6.2: Use the gray threshold A described in step 5.3 fv , B fv , C fv Different grayscale thresholds A as the benchmark tv , B tv , C tv , respectively, for the grayscale difference image A described in step 5.3 min , B min , C min Perform threshold segmentation and use the obtained area to compare with A in step 6.1 RtE1 , B RtE1 , C RtE1 Perform region intersection operation to obtain region A RtD1 , B RtD1 , C RtD1 ; Then use the gray threshold A tv , B tv , C tv The grayscale difference image A described in step 5.3 is max , B max , C max Perform threshold segmentation and use the obtained area to compare with A in step 6.1 RtE2 , B RtE2 , C RtE2 Perform region intersection operation to obtain region A RtD2 , B RtD2 , C RtD2 ; Among them, in step 6.2, the gray threshold A tv , B tv , C tv The calculation method is as follows: First calculate the coated grid area A of the bright field image grid backplane area Rf , B Rf , C Rf The grayscale mean A fmean , B fmean , C fmean , and then calculate the uncoated grid area A Rt , B Rt , C Rt The grayscale mean A tmean , B tmean , C tmean , grayscale threshold A tv , B tv , C tv The calculation formula is as follows: Step 6.3: Area A in step 6.3 RtD1 , B RtD1 , C RtD1 and A RtD2 , B RtD2 , C RtD2 The corresponding merged image shows the defect area A without the coated grid area in the bright field image. RtD , B RtD , C RtD , complete the defect detection of the uncoated grid area in the bright field image.
9. The photovoltaic grid back panel defect detection method based on artificial intelligence and machine vision according to claim 1, characterized in that: The specific processing process of step 7 is as follows: respectively obtain the defect area A of the bright field image coating grid area RfD , B RfD , C RfD and defect area A of the uncoated mesh area RtD , B RtD , C RtD The midpoint position coordinates of the bright field image A are taken as the center point. o , B o , C o Capture a defect image that is appropriate to the defect size.
10. The photovoltaic grid back panel defect detection method based on artificial intelligence and machine vision according to claim 1, characterized in that: The following steps are also included: Step 8: After the defect image is sent to the AI classifier for classification prediction to obtain its defect category, the defect area, defect image and defect category are displayed on the detection software interface; alarm and labeling are performed according to the detection results to complete the defect detection of the photovoltaic grid backplane; Among them, based on the previous defect images and defect categories collected, the pre-established AI classifier is trained to obtain a defect image classification model.
Citation Information
Cited By
AI appearance defect identification method for multiple acquisition terminals
CN120894318A