Disclosure of Invention
Aiming at the technical problems, the invention provides a method and a device for detecting the surface of a solar EL battery silicon wafer, which can improve the matching efficiency of a source image and a template image, so as to accelerate the image processing speed and further enhance the quality detection capability of the battery silicon wafer. The technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for detecting a surface of a solar EL cell silicon wafer, including:
setting the layer number of a pyramid, and creating a first pyramid image corresponding to the acquired source image and a second pyramid image corresponding to a preset template image according to the layer number;
traversing the first pyramid images layer by layer, and generating an interested area image corresponding to the first pyramid image of each layer;
matching the region-of-interest image with each layer of image of the second pyramid image and outputting a matching result;
generating an image to be detected according to the matching result;
and detecting the image to be detected and outputting a detection result.
In a first possible implementation manner of the first aspect of the present invention, the matching the region-of-interest image and each layer of image of the second pyramid image and outputting a matching result includes:
and calculating a similarity value of the region-of-interest image and the second pyramid image.
In a second possible implementation manner of the first aspect of the present invention, the generating an image to be detected according to the matching result includes:
and dividing and eliminating the interference region image from the image to be detected.
In a third possible implementation manner of the first aspect of the present invention, the dividing and excluding the interference region image from the image to be detected includes:
and removing a background region image from the image to be detected according to the area characteristics.
In a fourth possible implementation manner of the first aspect of the present invention, the dividing and excluding the interference region image from the image to be detected includes:
extracting black edge characteristics from the image to be detected;
and carrying out region merging operation and region difference set operation according to the black edge characteristics to eliminate the black edge region image.
In a fifth possible implementation manner of the first aspect of the present invention, the detecting the image to be detected and outputting a detection result specifically includes:
and screening out dirty areas from the image to be detected according to the roundness characteristics, and calculating the dirty area and the number of the dirty areas.
In a sixth possible implementation manner of the first aspect of the present invention, the method for detecting a surface of a solar EL cell silicon wafer further includes:
and judging the processing level of the surface of the battery silicon wafer according to the detection result.
In a second aspect, an embodiment of the present invention provides an apparatus for detecting a silicon wafer surface of a solar EL cell, including:
the layer creating module is used for setting the layer number of the pyramid and creating a first pyramid image corresponding to the obtained source image and a second pyramid image corresponding to the preset template image according to the layer number;
the layer access module is used for traversing the first pyramid images layer by layer and generating an interested area image corresponding to the first pyramid image of each layer;
the image matching module is used for matching the region-of-interest image with each layer of image of the second pyramid image and outputting a matching result;
the image positioning module is used for generating an image to be detected according to the matching result;
and the image detection module is used for detecting the image to be detected and outputting a detection result.
In a first possible implementation manner of the second aspect of the present invention, the image matching module includes:
and the similarity calculation module is used for calculating the similarity value of the region-of-interest image and the second pyramid image.
In a second possible implementation manner of the second aspect of the present invention, the image positioning module includes:
and the image screening module is used for dividing and eliminating the interference region image from the image to be detected.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
according to the method for detecting the surface of the solar EL battery silicon wafer, image data are layered in a pyramid mode, a source image with huge data volume is divided into a plurality of layers which are ordered and easy to process, and therefore layering access to the image can be conducted at the same time, and the speed of traversing the image is improved; meanwhile, the pyramid-shaped layering is beneficial to image matching of layers which are small in data volume and are visited first, and the effect of synchronous image traversal and image matching is achieved, so that the matching efficiency of a source image and a template image is improved, the image processing speed is increased, and the quality detection capability of the battery silicon wafer is enhanced.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a method for detecting a surface of a solar EL cell silicon wafer according to an exemplary embodiment of the present invention is shown, including:
s101, setting the layer number of a pyramid, and creating a first pyramid image corresponding to a source image and a second pyramid image corresponding to a preset template image according to the layer number; the template image is a standard solar cell silicon wafer image which is shot by X-rays in a darkroom environment, has no surface dirt and is good in quality.
S102, traversing the first pyramid images layer by layer, and generating an interested area image corresponding to the first pyramid image of each layer;
s103, matching the region-of-interest image with each layer of image of the second pyramid image and outputting a matching result; the matching result comprises information such as row, column coordinates and angles of the matching position, matching scores and the like.
It will be appreciated that the larger the number of layers, the less time is used to find a match. In addition, it is necessary to ensure that the image of the highest layer has enough information (at least four points), if the pyramid layer number is too large, the template is not easy to identify, and if the pyramid layer number is too small, the time for finding the template is increased. Therefore, the computer carries out reasonable layering according to the data size of the image to be processed, and is beneficial to shortening the time required by template identification, thereby improving the image matching efficiency.
Preferably, the pyramid layer number is set to be 2 for most of the cell images for matching.
S104, generating an image to be detected according to the matching result;
preferably, the generating an image to be detected according to the matching result includes:
and obtaining the image to be detected by image processing methods such as translation and rotation affine transformation.
And S105, detecting the image to be detected and outputting a detection result.
According to the method for detecting the surface of the solar EL battery silicon wafer, provided by the embodiment of the invention, image data are layered in a pyramid mode, and a source image with huge data volume is divided into a plurality of layers which are ordered and easy to process, so that the image can be accessed in a layered mode at the same time, and the speed of traversing the image is increased; meanwhile, the pyramid-shaped layering is beneficial to image matching of layers which are small in data volume and are visited first, and the effect of synchronous image traversal and image matching is achieved, so that the matching efficiency of a source image and a template image is improved, the image processing speed is increased, and the quality detection capability of the battery silicon wafer is enhanced.
Preferably, the setting of the number of layers and creating, according to the number of layers, a first pyramid image corresponding to the source image and a second pyramid image corresponding to the preset template image includes:
and performing image processing on the first pyramid image and the second pyramid image by adopting a smoothing filter.
It can be understood that, when creating a pyramid image of each layer, downsampling is involved, and the downsampled image may have jaggies and needs to be processed by a smoothing filter; the gaussian smoothing filter works well but is time consuming, preferably using a small template averaging filter for image processing.
Preferably, the matching the region-of-interest image and each layer image of the second pyramid image and outputting a matching result includes:
and calculating a similarity value of the region-of-interest image and the second pyramid image.
It can be understood that, when calculating the similarity value between the template image and the region-of-interest image (ROI image), a similarity measurement criterion needs to be selected; the similarity metric criteria are SAD (sum of absolute values), SSD (sum of squared differences) and NCC (normalized correlation coefficient), which is the most time consuming but most efficient to calculate and can adapt well to the illumination change, and is preferably chosen.
In this embodiment, in the target detection process, a common method is to set a template, and traverse the whole source image in the form of a sliding window; each sliding generates an ROI image with the size equal to that of the template, and based on a certain measuring mode, a similarity measure value of the template and the current ROI image is calculated. Thus, an image is formed after traversing the whole image, and the position corresponding to the maximum similarity metric value is found, which is the position of the target to be searched. The similarity measurement is utilized to quantify the similarity, and the method has great advantages for quickly identifying the image and positioning the target area image.
Preferably, the generating an image to be detected according to the matching result includes:
and dividing and eliminating the interference region image from the image to be detected.
The pyramid-mode-based image shape template matching method can enable any number of subsequent cells to be detected to be capable of performing translation and rotation to position the same position information as a template image when the position information in the image changes, so that the subsequent segmentation effect is consistent, and the universality and the rapidity of the solar EL cell silicon wafer surface detection method are improved.
Preferably, the dividing and excluding the interference region image from the image to be detected includes:
carrying out gray level binarization processing on the image to be detected;
and removing a background area image from the image to be detected after the gray level binarization processing according to the area characteristics.
In this embodiment, the positioned picture to be processed is subjected to gray level binarization; connecting the pictures with similar gray values into a region, preferably screening the area characteristics because the shape-area characteristics of the silicon wafer are most obvious, and setting an area fixed threshold; corroding the area with the screened characteristics and then performing expansion treatment; the regions after feature screening were subjected to morphological opening operations with rectangles 500 × 500 in length and width.
Preferably, the dividing and excluding the interference region image from the image to be detected further includes:
extracting black edge characteristics from the image to be detected;
and carrying out region merging operation and region difference set operation according to the black edge characteristics to eliminate the black edge region image.
It can be understood that four black edges from top to bottom on the surface of the battery silicon wafer interfere with detection, so that misjudgment is caused, and stains such as surface fingerprints cannot be correctly identified and detected.
In the embodiment, four black edges on the silicon chip of the EL battery are respectively extracted, and then the four areas of the four black edges are subjected to area combination operation one by one to obtain the whole black edge area; performing difference set operation on the silicon chip area and the black edge area of the EL battery to be processed; because affine transformation positioning is carried out based on shape template matching, black edge regions can be accurately segmented for any subsequent number of battery silicon wafers to be detected.
Preferably, the detecting the image to be detected and outputting a detection result includes:
carrying out image enhancement processing on the image to be detected;
carrying out local threshold binarization processing and connected region operation on the image to be detected;
and screening out dirty areas from the image to be detected according to the roundness characteristics, and calculating the dirty area and the number of the dirty areas.
It will be appreciated that the smudging is primarily caused by hands or touch smudging, and is generally characterized by a relatively high degree of roundness, typically relative to line marks, hidden cracks, etc., upon which the surface smudging is screened.
Preferably, the detecting the image to be detected further includes:
and judging the processing level of the surface of the battery silicon wafer according to the detection result.
Specifically, whether the surface of the battery silicon wafer in the source image has the dirty defect is judged according to the dirty area of the surface of the battery silicon wafer and the number of the dirty areas, and when the dirty area or the number of the dirty areas do not meet the preset condition, the battery silicon wafer is judged to have the dirty defect on the surface.
In this embodiment, for the dirty aspect, A, B, C three grade types and fail types are specifically defined:
the method comprises the following steps of firstly, judging the number of dirty areas;
when the number of the dirt is less than or equal to M, entering the next step;
when the number of the dirt is larger than M, judging that the grade D is unqualified;
secondly, judging the dirty area;
when the single area of the dirt is less than or equal to SA, judging the area as A level;
when SA is less than or equal to SB, judging as B level;
when SB is less than or equal to SC, judging as C grade;
when the SC is less than or equal to the dirty single area and less than or equal to SD, judging that the D-grade is unqualified;
the specific SA, SB, SC, SD and M threshold values are defined numerically according to the requirements of quality inspectors of EL battery silicon wafer manufacturers.
In this embodiment, a technician can set a threshold value according to needs on the basis of a basic test standard to personalize the test standard, adapt to the special production standard of an enterprise and the change of the industry, improve the flexibility of the steps of the detection method, and improve the enterprise benefit.
Preferably, the method for acquiring the source image specifically comprises the following steps:
adjusting the vertical height of a camera, placing the camera on a laboratory bench by using a ruler, and adjusting the camera to a visual field with the length and width of the range of 175-177 of the size of a picture to be shot;
adjusting the focal length, placing the silicon wafer to be tested on an experiment table, and adjusting the focal length of a camera until four chamfer grid lines of the silicon wafer can be clearly seen;
eliminating lens distortion, using a square calibration board with the side length of 170mm, and adjusting until all round points on the calibration board can be clearly seen;
and obtaining a source image by extracting the solar cell silicon wafer image to be detected shot by X-ray.
Referring to fig. 2, a device for detecting the surface of a solar EL cell silicon wafer according to an exemplary embodiment of the present invention is shown, including:
the layer creating module 201 is configured to set the number of layers of a pyramid and create a first pyramid image corresponding to the obtained source image and a second pyramid image corresponding to the preset template image according to the number of layers;
the layer access module 202 is configured to traverse the first pyramid images layer by layer, and generate an image of an area of interest corresponding to the first pyramid image of each layer;
the image matching module 203 is configured to match the region-of-interest image with each layer of image of the second pyramid image and output a matching result;
the image positioning module 204 is used for generating an image to be detected according to the matching result;
and the image detection module 205 is configured to detect the image to be detected and output a detection result.
Preferably, the image matching module comprises:
and the similarity calculation module is used for calculating the similarity value of the region-of-interest image and the second pyramid image.
Preferably, the image localization module comprises:
and the image screening module is used for dividing and eliminating the interference region image from the image to be detected.
Preferably, the image screening module includes:
and the background region image screening module is used for removing the background region image from the image to be detected according to the area characteristics.
Preferably, the image screening module includes:
the black edge region image screening module is used for extracting black edge characteristics from the image to be detected; and carrying out region merging operation and region difference set operation according to the black edge characteristics to eliminate the black edge region image.
Preferably, the image detection module includes:
and the roundness detection module is used for screening out dirty areas from the image to be detected according to the roundness characteristics and calculating the dirty area and the number of the dirty areas.
Preferably, the solar EL cell silicon wafer surface detection device further includes:
and the judging module is used for judging the processing level of the surface of the battery silicon wafer according to the detection result.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.