A method for detecting surface quality of diode
By taking a complete circumferential image of a transparent diode and using mapping image technology, we eliminate internal structural interference, identify and evaluate the surface defects of transparent diode glass shells, we solve the problem of detection difficulties in the prior art and achieve accurate detection of the surface quality of transparent diodes and evaluation.
Patent Information
- Application Number
- CN202210548200.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-20
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-05-20
AI Technical Summary
The prior art cannot accurately identify the surface defects of transparent light-emitting diode glass shells, which are disturbed by internal structure and light reflection phenomena, resulting in difficulty and inaccuracy of detection.
The complete circumferential image of the transparent diode is taken by visible light. The structural component area is excluded through seed filling method and edge recognition technology. The defect area is determined using the mapped image, the overlapping area area ratio and grayscale value are calculated, the real defect is judged, and the topological relationship is matched. For connection defects, calculate the diode surface quality degradation value.
The accuracy of identifying surface defects of transparent diode glass shell is improved, internal structure and reflective interference are eliminated, and accurate detection and evaluation of transparent diode surface quality is achieved.
Smart Images

Figure CN115047006B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of material testing and analysis, and in particular to a diode surface quality detection method. Background Art
[0002] Light-emitting diodes are the most commonly used type of diodes, and their packaging shells are generally made of colorless or colored transparent glass, called glass shells. For light-emitting diodes, since the diode glass shell is transparent and the diode has internal structure and contour features, it is easy to be interfered by the contour features of the diode's internal structural parts and the defect features on the internal structural parts in the process of optically identifying defects on the light-emitting diode glass shell. At the same time, the diode glass shell itself also has a reflective phenomenon, which will also cause interference in the process of optically identifying defects on the light-emitting diode glass shell surface. As a result, it is currently very difficult to detect defects on the transparent glass shell surface of light-emitting diodes, and it is impossible to accurately complete the surface quality inspection of transparent diodes.
[0003] Therefore, a method is needed to effectively identify surface defects of a transparent diode glass shell, accurately locate the defects, and thus accurately identify the surface defects of the diode. Summary of the invention
[0004] The present invention provides a diode surface quality detection method to solve the problem that the prior art cannot accurately identify surface defects of a light-transmitting diode glass shell. The technical solution adopted is as follows:
[0005] A diode surface quality detection method of the present invention comprises the following steps:
[0006] The transparent diode is placed vertically, a light source is used to illuminate the transparent diode horizontally, the transparent diode is rotated at intervals of a set rotation angle, and a complete circumference of the transparent diode is photographed by means of visible light to obtain an even number of transparent diode glass shell surface images and an even number of mapping images corresponding to the glass shell surface images; the glass shell surface images are photographed on the same side as the light source, and the mapping images corresponding to the glass shell surface images are photographed on the opposite side of the light source;
[0007] Perform straight line detection on each glass shell surface image, and select any pixel point on all the determined straight lines as the initial point, determine the structural component area in the corresponding glass shell surface image by a seed filling method, and use the area other than the structural component area in the glass shell surface image as the non-structural component area, and determine the structural component area and the non-structural component area in the corresponding mapping image according to the mapping relationship; perform edge recognition on the glass shell surface image, and remove the structural component area contour edge information and the glass shell external contour edge information from the identified edge information, determine the defect area in the glass shell surface image with the remaining edge information, and determine the defect area in the corresponding mapping image according to the mapping relationship;
[0008] The two glass shell surface images in the symmetric direction and the corresponding two mapping images are classified into the same symmetry group, the shooting angles of the two glass shell surface images in each symmetry group are exactly opposite and the shooting angles of the corresponding two mapping images are exactly opposite, in the non-structural component area of the two mapping images of the symmetry group, each overlapping area obtained from the defect area is determined, and it is judged whether the ratio of the area of each overlapping area to the area of the two defect areas obtained in the overlapping area is greater than the set ratio, if it is greater, it is considered that the two defect areas obtained in the overlapping area are real defect areas; the two defect areas obtained in the overlapping area are defect areas corresponding to the positions of the overlapping areas in the two mapping images; the average gray value of the defect area corresponding to the position of the real defect area on the two glass shell surface images in the symmetry group is calculated, and the defect area with a smaller average gray value is the real defect in the non-structural component area on the glass shell surface image;
[0009] In the structural component area of the two glass shell surface images of the symmetric group, determine whether the gray gradient direction of each defect area is perpendicular to the axis of the transparent diode glass shell. If not, the corresponding defect area is a real defect in the structural component area on the glass shell surface image.
[0010] According to the real defects in the non-structural component area and the real defects in the structural component area on each glass shell surface image, the real defects on each glass shell surface image are obtained, and the glass shell surface images under any two adjacent shooting angles are matched and connected to determine the number and size of the real defects on the complete circumference of the transparent diode glass shell;
[0011] The surface quality evaluation of transparent diodes is completed based on the number and size of real defects on the complete circumference of the glass shell.
[0012] The beneficial effects of the present invention are:
[0013] The present invention uses visible light means to obtain multiple glass shell surface images and corresponding mapping images on the complete circumference of a transparent diode, and analyzes and tests the surface of the transparent diode glass shell according to the obtained multiple glass shell surface images and the corresponding mapping images. When judging the surface quality of the transparent diode glass shell, the influence of the defects of the internal structural parts of the diode on the judgment of the real defects on the glass shell surface and the influence of the reflection of the glass shell on the judgment of the real defects on the glass shell surface can be eliminated by optical means, thereby improving the recognition accuracy of the real defects on the transparent diode glass shell surface and realizing the accurate detection of the surface quality of the transparent diode.
[0014] Furthermore, the topological relationship of each real defect in the graph structure of each glass shell surface image is determined, and the matching connection of glass shell surface images under any two adjacent shooting angles is completed according to the topological relationship of each real defect in the graph structure of each glass shell surface image.
[0015] Furthermore, the specific method for completing the surface quality evaluation of the transparent diode based on the number and size of real defects on the complete circumference of the glass shell is:
[0016] Calculate the diode surface quality reduction value:
[0017]
[0018] in, represents the number of real defects, s represents the total area of real defects, and S represents the total area of the glass shell surface; the larger the q value, the lower the surface quality evaluation of the transparent diode.
[0019] Furthermore, the set ratio is 90%, the set rotation angle is 45°, and the number of the even-numbered transparent diode glass shell surface images is 8. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a flow chart of the diode surface quality detection method of the present invention.
[0021] Figure 2 It is a schematic structural diagram of a light emitting diode of the present invention.
[0022] Figure 3 It is a schematic diagram of shooting angles of the present invention.
[0023] Figure 4 It is a schematic diagram of the light path of the light from the light source to the internal structural component of the light emitting diode and then emitted from the structural component.
[0024] Figure 5 It is a schematic diagram of the grayscale values of a row of pixels in the matrix corresponding to each defect area in the structural component area on the glass shell surface image of the present invention.
[0025] Figure 6 It is a schematic diagram of the glass shell surface images obtained by shooting at two adjacent shooting angles of the present invention.
[0026] Figure 7 It is a schematic diagram representing the nearest four nodes in the graph structure of the glass shell surface image of the present invention.
[0027] Figure 8 It is a schematic diagram of four neighboring nodes of node a when node a is taken as the target of the present invention.
[0028] Fig. 9 It is a schematic diagram of the corresponding matching relationship of the same real defect in the graph structure of different glass shell surface images in the graph structure of the glass shell surface images obtained at two adjacent shooting angles of the present invention.
[0029] Fig.10It is a schematic diagram of the position of the same real defect in the glass shell surface image obtained at multiple consecutive shooting angles according to the present invention. DETAILED DESCRIPTION
[0030] A diode surface quality detection method of the present invention is described in detail below in conjunction with the accompanying drawings and embodiments.
[0031] Method Example:
[0032] An embodiment of a diode surface quality detection method of the present invention has the following overall process: Figure 1 As shown, the specific process is as follows:
[0033] 1. Collect the diode glass shell surface images in different directions and the corresponding mapping images.
[0034] Light emitting diodes are the most common transparent diodes, so this embodiment takes light emitting diodes as an example for analysis. Figure 2 The figure is a schematic diagram of the structure of a light-emitting diode, in which a transparent glass shell is encapsulated with structural parts for emitting light after being powered on, and is connected to an external circuit via positive and negative needle pins of different lengths.
[0035] In this embodiment, in order to accurately explore the surface defects of the light-emitting diode glass shell, the diode glass shell surface image and the corresponding mapping image are collected in a darkroom environment. Specifically, the diode is placed vertically, and the diode is illuminated horizontally by a light source. The diode glass shell surface image is captured by a first camera on the same side of the light source, and a piece of white paper is placed on the opposite side of the light source, so that the diode forms a mapping image corresponding to the glass shell surface image on the white paper under the action of the light source, and the mapping image on the white paper is captured and recorded by a second camera on the opposite side of the light source.
[0036] In order to accurately identify defects in a complete circle of the diode glass shell, it is necessary to rotate the diode and then take the glass shell surface images and corresponding mapping images at different angles again. Finally, by continuously rotating the diode and changing the diode angle, a total of 2N glass shell surface images and corresponding mapping images are obtained in a circle of the diode glass shell. It is easy to understand that the smaller the diode rotation angle is between two adjacent shots, the greater the total number of 2N glass shell surface images and corresponding mapping images obtained after the diode rotates one circle. In this embodiment, in order to take into account both defect recognition efficiency and accuracy, the rotation angle value is set to 45° each time, forming the following: Figure 3 There are 2N=8 shooting directions shown, that is, a total of eight glass shell surface images and corresponding mapping images are obtained.
[0037] 2. Identify defective areas on the glass shell surface image, and subdivide the acquired glass shell surface image into structural parts area and non-structural parts area.
[0038] like Figure 2As shown, based on the structural feature that the light-emitting diode is connected to the internal structural parts by two needle-shaped pins, after graying the glass shell surface image to obtain the glass shell surface grayscale image, this embodiment performs Hough line detection on the glass shell surface grayscale image to determine two straight lines, and then uses any pixel point on the two straight lines as the initial point to determine the structural part area of the glass shell part through the seed filling method, that is, to determine the structural part area of the glass shell surface image.
[0039] Then, the determined structural component region is removed from the glass shell region in the glass shell surface image, so that the non-structural component region of the glass shell surface image can be obtained.
[0040] Since there is a mapping relationship between the glass shell surface image and the corresponding mapping image, after the structural component area and the non-structural component area of the glass shell surface image are determined, the structural component area and the non-structural component area in the mapping image can be obtained accordingly.
[0041] At the same time, CANNY edge detection is performed on the grayscale image of the glass shell surface. Since there is no texture information on the glass shell surface of a normal light-emitting diode when there are no defects, if after CANNY edge detection, the outline of the structural parts, that is, the boundary of the structural parts area, and the external outline of the glass shell are removed from the glass shell surface image, if there is still texture information, then these texture information can be preliminarily considered to be defect information, and a number of defect areas can be obtained accordingly.
[0042] But in fact, this kind of defect information does not necessarily represent the defects on the surface of the glass shell. This kind of defect information includes three possibilities: a. real defects on the surface of the glass shell; b. false defects caused by light and shadow changes due to the reflection of the glass shell; c. defects on the internal structural parts of the glass shell.
[0043] Since the goal is to accurately identify defects on the glass shell surface, it is necessary to identify and eliminate the defects in case b and case c.
[0044] 3. Calculate the defect response of each defect area in the non-structural area on the mapping image corresponding to the glass shell surface image, and determine the real defects in the non-structural area on the glass shell surface image.
[0045] In step 1, by rotating the diode at different angles, a total of 2N glass shell surface images and corresponding mapping images can be obtained. Then, if two glass shell surface images and corresponding mapping images in mutually symmetrical directions are classified into the same symmetry group, a total of N symmetry groups can be formed, each of which includes two glass shell surface images with exactly opposite shooting angles, that is, symmetrical, and the corresponding, equally symmetrical mapping images of the two symmetrical glass shell surface images.
[0046] Specifically in this embodiment, since the shooting angle 2N=8, N=4 symmetry groups are obtained. Figure 3 As shown, that is, 0°-180°, 45°-225°, 90°-270°, 135°-315°.
[0047] In the two mutually symmetrical mapping images of each symmetry group, the pixels in the structural part area and the pixels outside the defect area are removed, and then the overlapping parts of the defect areas in the two mutually symmetrical mapping images are judged to obtain multiple overlapping areas. If the ratio of the area of a certain overlapping area to the area of the defect area obtained by obtaining the overlapping area is greater than the set ratio, the defect area obtained by obtaining the overlapping area is considered to be a real defect area.
[0048] The defect area obtained in the overlapping area refers to the defect area corresponding to the position of the overlapping area in the two mapping images. In this embodiment, the set ratio is selected as 90%.
[0049] The real defect area determined above is actually two defect areas corresponding to the positions in the two mutually symmetrical mapping images on the symmetry group. However, in fact, a defect often only exists on one side. The reason why the defect area is identified on the mapping image on the other side is only because the glass shell is transparent. Therefore, it is also necessary to determine which area has a smaller average grayscale value in the two areas corresponding to the position of the real defect area in the two mutually symmetrical glass shell surface images of the symmetry group. The area with a smaller average grayscale value is the area where the real defect is located.
[0050] Thus, the specific distribution position, quantity and size of all real defects in the non-structural area on all 2N=8 glass shell surface images can be determined.
[0051] 4. Calculate the illumination distribution characteristics of each defect area in the structural component area on the glass shell surface image, and determine the real defects in the structural component area on the glass shell surface image.
[0052] like Figure 4 As shown, from a top view, the diode is a structure of a ring-shaped glass with a vacuum in the middle. Although the light transmittance of the ring-shaped glass, i.e., the glass shell, is very high, it still has a shielding effect, especially for colored light-emitting diodes, the colored glass has a greater light blocking effect.
[0053] Figure 4 In the figure, the horizontal line in the inner circle represents the internal structure of the glass shell. When the light reaches this position, it will be reflected back. The straight lines o, a, and b represent different light paths respectively.
[0054] On the optical paths o, a, and b, the thickness of the glass shell that the light needs to pass through increases successively. Therefore, based on the blocking effect of the glass shell on the light, it can be seen that the brightness of the light after reaching the structural parts through the three optical paths and then being reflected decreases successively.
[0055] The rule that the brightness of the light that enters the glass shell and then exits through the glass shell gradually decreases from the center of the glass shell to both sides is along the horizontal direction, so we first need to find the horizontal direction and take the direction perpendicular to the straight line obtained by the Hough line detection as the horizontal direction. Moreover, even if there is reflection on the glass shell, since the reflection phenomenon increases the overall brightness of the area, the rule that the brightness of the light that enters the glass shell and then exits through the glass shell gradually decreases from the center of the glass shell to both sides still holds true when the reflection phenomenon exists; similarly, since the presence or absence of defects on the structural parts will not affect its reflection of the light, nor will it block the reflection of the light, even if there are defects on the structural parts, the rule that the brightness of the light that enters the glass shell and then exits through the glass shell gradually decreases from the center of the glass shell to both sides still holds true.
[0056] Then it can be determined that only when there are defects on the surface of the glass shell that cause the thickness variation pattern of some areas of the glass shell to not conform to the pattern of gradually increasing from the center of the glass shell to both sides, the pattern of gradually decreasing brightness of the light entering the glass shell and then emitted through the glass shell from the center of the glass shell to both sides will be broken.
[0057] Therefore, it is possible to determine whether the defective area is caused by a real defect on the glass shell surface by judging whether the illumination distribution characteristics of each defective area in the structural component area on the glass shell surface image conform to the above rules.
[0058] The illumination distribution characteristics of each defective area in the structural part area on the glass shell surface image are determined by judging the grayscale change of each defective area in the horizontal direction. Specifically, the principal component analysis method is used to complete the analysis of the illumination distribution characteristics of the defective area:
[0059] Each defect area has a certain range, which can be regarded as a matrix composed of finite rows and columns of pixels, and the change of pixel value in each row of the matrix is calculated.
[0060] (1) Establish a coordinate system with a horizontal axis interval of 1 and a vertical axis representing the grayscale value of each pixel.
[0061] If the grayscale values of a row of pixels in the matrix are [1, 2, 1, 2], the resulting coordinate representation is as follows: Figure 5 As shown, the horizontal axis is used for counting and the vertical axis is used to represent the grayscale value.
[0062] (2) The principal component analysis method is used to calculate the main direction of the grayscale value of each row of pixels in the defect area.
[0063] According to the discrete point coordinates of the grayscale values of the pixels on each row in the matrix, the principal component directions of these data are obtained using the principal component analysis algorithm. If the matrix has K rows in total, K principal component directions can be obtained accordingly, and each principal component direction is a 2-dimensional unit vector.
[0064] (3) Determine the standard main direction of each defect area in the structural component area on the glass shell surface image when there is no real defect on the glass shell surface.
[0065] When there is no real defect on the glass shell surface, the grayscale value of each row of pixels in each defect area in the structural component area on the glass shell surface image shows a single change trend. Figure 4 The brightness of the light at the optical path o shown in the figure is the largest, so when the defect area is on the left side of the center of the glass bulb, the grayscale value of each row of pixels in the defect area increases in the horizontal direction, corresponding to the grayscale value of the pixel in the adjacent Figure 5 In the coordinates shown, each discrete point rises in sequence along the positive direction of the horizontal coordinate, and the standard main direction of the grayscale value of the corresponding row of pixels is upward along the positive direction of the horizontal coordinate. The specific upward angle can be determined in advance according to the glass shell transmittance of the detected light-emitting diode.
[0066] When the defect area is on the right side of the center of the glass bulb, the grayscale value of each row of pixels in the defect area decreases in the horizontal direction. Figure 5 In the coordinates shown, each discrete point decreases in sequence along the positive direction of the horizontal coordinate, and the standard main direction of the grayscale value of the corresponding row of pixels is downward along the positive direction of the horizontal coordinate. The specific downward angle can be determined in advance according to the glass shell transmittance of the detected light-emitting diode.
[0067] (4) Determine the degree of deviation between the main direction of the grayscale value of each row of pixels in the defect area and the standard main direction of the defect area.
[0068] The K principal component directions obtained in each defect area in the structural part area on the glass shell surface image are compared with the standard principal directions of the defect area, and it is determined whether a set proportion of the principal component directions in the K principal component directions are the same as the standard principal directions. If so, it is considered that there is no real defect on the glass shell surface in the defect area in the structural part area on the glass shell surface image. If not, it is considered that there is a real defect on the glass shell surface in the defect area in the structural part area on the glass shell surface image.
[0069] In other embodiments, the grayscale gradient direction of each defect area in the structural component area on the glass shell surface image can also be directly calculated, and then it is determined whether the grayscale gradient direction is horizontal. If so, it is considered that there is no real defect on the glass shell surface in the defect area in the structural component area on the glass shell surface image. If not, it is considered that there is a real defect on the glass shell surface in the defect area in the structural component area on the glass shell surface image.
[0070] Thus, the specific distribution positions, quantity and sizes of all real defects in the structural parts area on all 2N=8 glass shell surface images can be determined. Combined with the specific distribution positions, quantity and sizes of all real defects in the non-structural parts area on all 2N=8 glass shell surface images determined in step 3, the specific distribution positions, quantity and sizes of all real defects on all glass shell surface images can be determined.
[0071] 5. Calculate the matching relationship between the real defects in the glass shell surface images at any two adjacent angles, and determine the correct number and size of the real defects on the glass shell surface for a complete circle.
[0072] Through steps 1-4, the real defects in the glass shell surface image at each shooting angle can be determined. However, in fact, there are several repetitions of real defects in the glass shell surface images at two adjacent shooting angles. At this time, the number of real defects in the glass shell surface images at all angles is much higher than the actual number of real defects.
[0073] This is because, after two adjacent shooting angles are rotated 45°, there are still 135° of images corresponding to the overlap, that is, as shown in the attached figure. Figure 6 As shown, the glass shell surface image obtained in the shooting direction represented by the two parallel solid lines and the glass shell surface image obtained in the shooting direction represented by the two dotted lines overlap for a large part, specifically, the right part of the glass shell surface image obtained in the shooting direction represented by the two parallel solid lines overlaps with the left part of the glass shell surface image obtained in the shooting direction represented by the two dotted lines.
[0074] Moreover, although the images of the two glass shell surface images obtained at adjacent shooting angles overlap, there is image distortion due to the different viewing angles, and the position, size and shape of the real defects at the same position on the glass shell are different in the two glass shell surface images. However, although the position, size and shape of the real defects at the same position on the glass shell may be different in the two glass shell surface images, the topological relationship between the real defects in the overlapping area remains unchanged.
[0075] Therefore, the correct number of real defects can be obtained by calculating the corresponding matching relationship of real defects in two glass shell surface images obtained at adjacent shooting angles. The calculation process of the corresponding matching relationship is as follows:
[0076] (1) Construct a graph structure representation of each glass shell surface image.
[0077] The nodes represent real defects, and the edges represent the angles of the lines between the center points of the real defects. For each node, the four nodes with the closest Euclidean distance to it are connected to obtain edges to form a graph structure. The edges represent the direction values from the node to the adjacent nodes.
[0078] like Figure 7 As shown, it represents the representation of the four nearest nodes of nodes a, b, c, d, and e in the graph structure, such as Figure 8 As shown, it represents the four neighboring nodes of node a when node a is taken as the target.
[0079] Figure 7 The arrow in the middle is bidirectional, indicating that the two neighboring close relationships are mutual, that is, b is one of the four closest nodes to a, and a is also one of the four closest nodes to b. Figure 7 The one-way arrow from a to d indicates that d is one of the four closest nodes of a, but a is not one of the four closest nodes of d.
[0080] (2) Node representation.
[0081] like Figure 8 As shown, the information of the four nearest nodes of each node can be obtained. The node is represented by edge information. Each node has four edge information. A four-dimensional vector can be obtained. The elements in the vector are sorted in ascending order to obtain the ascending vector.
[0082] for Figure 8 For node a, use p(ab), p(ac), p(ae), and p(ad) to represent the weights of the four edges. Sort [p(ab), p(ac), p(ae), p(ad)] in ascending order, and use the ascending vector to represent the topological relationship of node a.
[0083] (3) Compute node matching.
[0084] First, the real defects in different images are labeled.
[0085] The cosine similarity between the vector representation of each node in the previous graph structure and the vector representation of each node in the other graph structure is taken as the proximity structure similarity of the two nodes.
[0086] like Fig. 9 As shown in the figure, the left node represents the node in the previous graph structure, the right node represents the node in the next graph structure, the node edge value represents the similarity of the adjacent structure, and the best matching result is obtained through the optimal matching calculation, and then the corresponding matching relationship of the same real defect in different images is obtained.
[0087] This embodiment uses the topological relationship between real defects in the glass shell surface images at different shooting angles to complete the connection of the glass shell surface images at different shooting angles. In other embodiments, other existing methods can also be used to complete the connection of the glass shell surface images at different shooting angles.
[0088] (4) Calculate the continuous matching chain.
[0089] like Fig.10 As shown in the figure, the real defects a and b in the glass shell surface image taken at 0° correspond to the real defects a1 and b1 in the glass shell surface image taken at 45°, and the real defects a1 and b1 in the glass shell surface image taken at 45° correspond to the real defects a2 and b2 in the glass shell surface image taken at 90°, and so on. The glass shell surface images taken at all adjacent angles are matched, and the continuous matching chain of each real defect on the circumference of the glass shell surface is calculated, for example: a-a1-a2-a3 is a real defect, and the count is 1.
[0090] The number of matching chains of real defects finally obtained is taken as the total number of real defects, and the position and size of each real defect on the circumference of the glass bulb surface are correspondingly determined.
[0091] 6. Complete the diode surface quality evaluation based on the number and size of real defects on the glass shell surface.
[0092] The more real defects there are on the glass shell surface and the larger the area they occupy, the worse the glass shell surface quality is. From this, the diode surface quality degradation value can be calculated:
[0093]
[0094] in, represents the number of real defects, s represents the total area of real defects, and S represents the total area of the glass shell surface. q represents the degradation value of the diode surface quality. The larger the q value, the worse the diode surface quality.
[0095] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A diode surface quality detection method, characterized in that: The following steps are involved: The transparent diode is placed vertically, a light source is used to illuminate the transparent diode horizontally, the transparent diode is rotated at intervals of a set rotation angle, and a complete circumference of the transparent diode is photographed by means of visible light to obtain an even number of transparent diode glass shell surface images and an even number of mapping images corresponding to the glass shell surface images; the glass shell surface images are photographed on the same side as the light source, and the mapping images corresponding to the glass shell surface images are photographed on the opposite side of the light source; Perform straight line detection on each glass shell surface image, and select any pixel point on all the determined straight lines as the initial point, determine the structural component area in the corresponding glass shell surface image by a seed filling method, and use the area other than the structural component area in the glass shell surface image as the non-structural component area, and determine the structural component area and the non-structural component area in the corresponding mapping image according to the mapping relationship; perform edge recognition on the glass shell surface image, and remove the structural component area contour edge information and the glass shell external contour edge information from the identified edge information, determine the defect area in the glass shell surface image with the remaining edge information, and determine the defect area in the corresponding mapping image according to the mapping relationship; The two glass shell surface images in the symmetric direction and the corresponding two mapping images are classified into the same symmetry group. The shooting angles of the two glass shell surface images in each symmetry group are exactly opposite and the shooting angles of the corresponding two mapping images are exactly opposite. In the non-structural part area of the two mapping images of the symmetry group, each overlapping area obtained from the defect area is determined, and it is judged whether the ratio of the area of each overlapping area to the area of the two defect areas obtained by obtaining the overlapping area is greater than the set ratio. If it is greater, it is considered that the two defect areas obtained by obtaining the overlapping area are real defect areas; The two defective areas of the overlapping area are defective areas corresponding to the positions of the overlapping areas in the two mapping images; Calculate the average grayscale value of the defect area corresponding to the position of the real defect area on the two glass shell surface images in the symmetric group, and the defect area with a smaller average grayscale value is the real defect in the non-structural part area on the glass shell surface image; In the structural component area of the two glass shell surface images of the symmetric group, determine whether the gray gradient direction of each defect area is perpendicular to the axis of the transparent diode glass shell. If not, the corresponding defect area is a real defect in the structural component area on the glass shell surface image. According to the real defects in the non-structural component area and the real defects in the structural component area on each glass shell surface image, the real defects on each glass shell surface image are obtained, and the glass shell surface images under any two adjacent shooting angles are matched and connected to determine the number and size of the real defects on the complete circumference of the transparent diode glass shell; The surface quality evaluation of transparent diodes is completed based on the number and size of real defects on the complete circumference of the glass shell.
2. The diode surface quality detection method according to claim 1, characterized in that: The topological relationship of each real defect in the graph structure of each glass shell surface image is determined, and the matching connection of the glass shell surface images under any two adjacent shooting angles is completed according to the topological relationship of each real defect in the graph structure of each glass shell surface image.
3. The diode surface quality detection method according to claim 1, characterized in that: The specific method for completing the surface quality evaluation of the transparent diode based on the number and size of real defects on the complete circumference of the glass shell is: Calculate the diode surface quality reduction value: in, represents the number of real defects, s represents the total area of real defects, and S represents the total area of the glass shell surface; the larger the q value, the lower the surface quality evaluation of the transparent diode.
4. The diode surface quality detection method according to claim 1, characterized in that: The set ratio is 90%, the set rotation angle is 45°, and the number of the even-numbered transparent diode glass shell surface images is 8.
