Mirror glass feature recognition method and application thereof
By using a mirror glass feature recognition method, which extracts bright spots, black spots, and foreground points in the RGB color space and combines them with edge feature point judgment, the problem of distinguishing mirror glass from stone ceramics has been solved. This method enables the accurate identification and sorting of mirror glass in waste glass optical sorting equipment, reducing raw material loss and processing costs.
Patent Information
- Application Number
- CN202211099331.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-07
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2042-09-07
AI Technical Summary
Existing technologies make it difficult to accurately identify mirrored glass and stone ceramics when sorting waste glass, leading to the wrong rejection of mirrored glass, which increases raw material loss and processing costs.
A mirror glass feature recognition method is adopted. By collecting images of waste glass raw materials, bright spots, black spots and foreground points are extracted in RGB color space. Combined with edge feature point judgment and binary image overlay statistics, a threshold is set to judge the mirror glass or stone ceramic area.
Accurately distinguish between mirror glass and stone ceramics, reduce the accidental rejection of mirror glass, improve sorting accuracy, and reduce raw material loss and processing costs.
Smart Images

Figure QLYQS_1 
Figure QLYQS_2 
Figure QLYQS_3
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of image processing, and can be applied to waste glass light selection equipment in the field of resource recycling. Specifically, it is a mirror glass feature recognition method and application thereof. BACKGROUND
[0002] Recycled waste glass is added to a glass melting furnace as a flux, which can greatly reduce energy consumption and thus reduce carbon emissions during glass production. In the field of resource recycling, the recycled waste glass raw materials need to be sorted. The demand for sorting is usually to use the optical properties of glass light transmission to remove stones, ceramics, metals and other non-transparent materials that can damage the glass melting furnace, so as to achieve safe and efficient production.
[0003] There are also some special cases, such as mirror glass coated with silver on the back. It belongs to glass, but the post-recycling process is different from other glass, and mirror glass is difficult to be penetrated by natural light (most of stones and ceramics are not transparent). Therefore, when removing impurities using existing technology, mirror glass can only be removed together with stones and ceramics. However, with the improvement of processing technology, the demand for recycling mirror glass has increased significantly. The increase of mirror glass in the removed products in the traditional removal method has also increased the loss of raw materials and the cost of processing enterprises. In addition, some existing methods only remove mirror glass from stones and ceramics by identifying bright spots, which cannot avoid the interference of glass debris on the surface of stones and ceramics. Using this removal method can easily cause difficult material leakage. In order to improve the selection rate of raw materials and recycling rate, a new market demand for glass sorting has emerged, that is, to accurately remove difficult materials while retaining mirror glass in waste glass raw materials. SUMMARY
[0004] The present application is to solve the above-mentioned deficiencies in the prior art, and proposes a mirror glass feature recognition method and application thereof, so as to accurately identify stones, ceramics and mirror glass in the light transmission selection condition, thereby significantly reducing the removal of mirror glass when removing difficult materials in waste glass light selection.
[0005] To achieve the above-mentioned application purposes, the present application adopts the following technical solutions:
[0006] The mirror glass feature recognition method of the present application is characterized in that the following steps are performed:
[0007] Step 1: Collecting waste glass raw material images;
[0008] Select any solid color background that is not black or white, and under the solid color background, use the white light transmission method to collect the raw material color image X of the waste glass raw materials containing mirror glass and stone ceramics in the RGB color space; and the width of the raw material color image X is W and the height is H;
[0009] Step 2: Feature point extraction, including: bright point extraction, black point extraction, and foreground point extraction;
[0010] Step 3: Edge feature point judgment, including: edge bright point judgment, edge black point judgment;
[0011] Step 4: Binary image superposition statistics;
[0012] Step 4.1: The actual bright point image X of the raw material edge after binarization 1br , the actual black point image X of the raw material edge after binarization 2br and the foreground point image X of the raw material after binarization 3b Perform connected component calculation simultaneously to obtain a number of connected components;
[0013] Step 4.2: Within the same connected component, add up the number of all actual bright points on the edge in X 1br , X 2br and X 3b and record it as N pw7 , and set the actual bright point number threshold as THWP3; add up the number of all actual black points on the edge in X 1br , X 2br and X 3b and record it as N pb7 , and set the actual black point number threshold as THBP3;
[0014] Step 5: Determine the area where the mirror glass or stone ceramics is located according to THWP3 and THBP3:
[0015] Within the same connected component, if the conditions N pw7 ≥THWP3 and N pb7 ≥THBP3 are satisfied, the target object within the connected component is determined to be mirror glass; if the conditions N pw7 <THWP3 and N pb7 ≥THBP3 are satisfied, the target object within the connected component is determined to be stone ceramics; otherwise, the target object within the connected component is determined to be other glass.
[0016] The feature of a method for identifying mirror glass features according to the present invention also lies in that the step 2 includes:
[0017] Step 2.1: Bright point extraction;
[0018] Step 2.1.1: According to the color characteristics of the raw color image X, set the threshold value of the red component R as THR1, set the threshold value of the green component G as THG1, and set the threshold value of the blue component B as THB1;
[0019] Step 2.1.2: According to the threshold values THR1, THG1 and THB1, determine the region where the highlight point is located in each pixel point of the raw color image X;
[0020] Step 2.2: Black point extraction;
[0021] Step 2.2.1: According to the color characteristics of the raw color image X, set the threshold value of the red component R as THR2, set the threshold value of the green component G as THG2, and set the threshold value of the blue component B as THB2;
[0022] Step 2.2.2: According to the threshold values THR2, THG2 and THB2, determine the region where the black point is located in each pixel point of the raw color image X;
[0023] Step 2.3: Foreground point extraction;
[0024] Step 2.3.1: According to the background color characteristics of the raw color image X, set the mean value of the background red component R1 as THR3, set the mean value of the background green component G1 as THG3, set the mean value of the background blue component B1 as THB3, and set the threshold value of the background removal intensity as THK3;
[0025] Step 2.3.2: According to the background color characteristics of the raw color image X, set the upper limit of the red threshold value of the background red component R1 as THR3 max , and set the lower limit of the red threshold value of the background red component R1 as THR3 min ;
[0026] Step 2.3.3: According to the background color characteristics of the raw color image X, set the upper limit of the green threshold value of the background green component G1 as THG3 max , and set the lower limit of the green threshold value of the background green component G1 as THG3 min ;
[0027] Step 2.3.4: According to the background color characteristics of the raw color image X, set the upper limit of the blue threshold value of the background blue component B1 as THB3 max , and set the lower limit of the blue threshold value of the background blue component B1 as THB3 min ;
[0028] Step 2.3.5: According to THR3 max , THR3 min , THR3 max , THR3 min , and THB3max and THB3 min judging the region where the foreground point is in each pixel point of the raw material color image X, and performing binaryzation processing on the raw material image X3 after the foreground point is extracted, to obtain the binaryzation raw material foreground point image X 3b .
[0029] The process of step 2.1.2 is as follows:
[0030] If the red component R of any one pixel point in the raw material color image X is greater than the threshold value THR1, and the green component G is greater than the threshold value THG1, and the blue component B is greater than the threshold value THB1, it is determined that the corresponding pixel point is a bright point, and the pixel value of the bright point is kept unchanged; otherwise, it is determined that the corresponding pixel point is a non-bright point, and the pixel value of the non-bright point is set to "0"; thereby the bright point extraction in the raw material color image X is completed, and the raw material image X1 after the bright point extraction is obtained; the raw material image X1 after the bright point extraction is binaryzation processed, to obtain the binaryzation raw material bright point image X 1b .
[0031] The process of step 2.2.2 is as follows:
[0032] If the red component R of any one pixel point in the raw material color image X is less than the threshold value THR2, and the green component G is less than the threshold value THG2, and the blue component B is less than the threshold value THB2, and the red component R, the green component G, and the blue component B are all greater than 0, it is determined that the corresponding pixel point is a black point, and the pixel value of the black point is kept unchanged; otherwise, it is determined that the corresponding pixel point is a non-black point, and the pixel value of the non-black point is set to "0"; thereby the black point extraction in the raw material color image X is completed, and the raw material image X2 after the black point extraction is obtained; the raw material image X2 after the black point extraction is binaryzation processed, to obtain the binaryzation raw material black point image X 2b .
[0033] The setting rule of step 2.3.2 is as follows:
[0034] If THR3+THK3>255, then THR3 max =255, otherwise, the red threshold upper limit THR3 max is obtained by using formula (2-1):
[0035] THR3 max =THR3+THK3 (2-1)
[0036] If THR3≤THK3, then THR3 min =1, otherwise, the red threshold lower limit THR3 min is obtained by using formula (2-2):
[0037] THR3min = THK3 - THG3 (2-2)
[0038] The setting rule of step 2.3.3 is as follows:
[0039] If THG3 + THK3 > 255, then THG3 max = 255, otherwise, the upper limit of green threshold THG3 is obtained by using formula (2-3) max :
[0040] THG3 max = THG3 + THK3 (2-3)
[0041] If THG3 ≤ THK3, then THG3 min = 1, otherwise, the lower limit of green threshold THG3 is obtained by using formula (2-4) min :
[0042] THG3 min = THG3 - THK3 (2-4)
[0043] The setting rule of step 2.3.4 is as follows:
[0044] If THB3 + THK3 > 255, then THB3 max = 255, otherwise, the upper limit of blue threshold THB3 is obtained by using formula (2-5) max :
[0045] THB3 max = THB3 + THK3 (2-5)
[0046] If THB3 ≤ THK3, then THB3 min = 1, otherwise, the lower limit of blue threshold THB3 is obtained by using formula (2-6) min :
[0047] THB3 min = THB3 - THK3 (2-6).
[0048] The region judgment process of the foreground point of step 2.3.5 is as follows:
[0049] If the background of the raw color image X is blue or gray, and the red component R, the green component G component and the blue component B of any one pixel point in the raw color image X simultaneously satisfy formula (2-7) and formula (2-8), then the corresponding pixel point is determined as a background point, and the pixel value of the background point is "0"; otherwise, the corresponding pixel point is determined as a foreground point, and the pixel value of the foreground point is kept unchanged; thereby the foreground point extraction in the raw color image X is completed, and the foreground point extracted raw image X3 is obtained;
[0050]
[0051] THG3 min ≤G≤THG3 max (2-8)
[0052] If the background of the raw color image X is green, and the red component R, the green component G, and the blue component B of any one pixel point in the raw color image X simultaneously satisfy formula (2-9) and formula (2-10), it is determined that the corresponding pixel point is a background point, and the pixel value of the background point is set to "0"; otherwise, it is determined that the corresponding pixel point is a foreground point, and the pixel value of the foreground point is kept unchanged; thereby the foreground point extraction in the raw color image X is completed, and the raw image X3 after foreground point extraction is obtained.
[0053]
[0054] THR3 min ≤R≤THR3 max (2-10)
[0055] If the background of the raw color image X is red, and the red component R, the green component G, and the blue component B of any one pixel point in the raw color image X simultaneously satisfy formula (2-11) and formula (2-8), it is determined that the corresponding pixel point is a background point, and the pixel value of the background point is set to "0"; otherwise, it is determined that the corresponding pixel point is a foreground point, and the pixel value of the foreground point is kept unchanged; thereby the foreground point extraction in the raw color image X is completed, and the raw image X3 after foreground point extraction is obtained.
[0056]
[0057] The step 3 includes:
[0058] Step 3.1: edge bright point judgment;
[0059] Step 3.1.1: set the size of the square filter template P as IxI, wherein I is an odd number greater than or equal to 3, and I is less than the greatest common divisor of W and H;
[0060] Step 3.1.2: set the pixel number of the i-th row and j-th column pixel in the filter template P as Wherein, the value range of i and j is [1, I];
[0061] Step 3.1.3: set the lower left corner region of the filter template P as P W1 , then P is obtained by using formula (3-1) W1 , the number of pixels contained in P is N1, and the lower left corner region P W1The pixel number in the m1-th row and n1-th column of the filter template P is: The pixels, where m1 takes values ranging from 1 to 1. The range of values corresponding to n1 is: Furthermore, for every increase of 1 in the value of m1, the range of values for the corresponding n1 also increases by 1;
[0062]
[0063] Set the filter template P to remove the lower left corner region P W1 The area outside of P W2 ;
[0064] Set the lower right corner region of the filter template P to P W3 Then, using equation (3-1), we can obtain P. W3 The number of pixels contained is N1, and the lower right corner region P W3 The pixel number in the m2th row and n2th column of the filter template P is... The number of pixels, where m2 takes values ranging from 1 to 1. The range of values corresponding to n2 is: Furthermore, for every 1 increase in the value of m2, the range of values for the corresponding n2 also increases by 1;
[0065] Set the filter template P to remove the lower right corner region P W3 The area outside of P W4 ;
[0066] The lower region of the filter template P is set as P. W5 Then, using equation (3-2), we can obtain P. W5 The number of pixels contained is N2, and the lower region P W5 The pixel number in the m3-th row and n3-th column of the filter template P is: The number of pixels, where m3 = 1, and the value range of n3 is [1, 1]:
[0067] N2=I (3-2)
[0068] Set the filter template P to remove the lower region P W5 The area outside of P W6 ;
[0069] The center pixel number of the filter template P is set to...
[0070] Let the threshold for the number of bright spots at the image edge be THWP1, and the threshold for the number of non-bright spots be THNWP1;
[0071] Step 3.1.4: Select the lower left corner region P of the filter template P. W1The corresponding binarized image of the raw material bright spot X 1b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels whose pixel values are all 0 is denoted as N. pw1 ;
[0072] The region P of the filter template P W2 The corresponding binarized image of the raw material bright spot X 1b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels with a value of 1 is denoted as N. pw2 ;
[0073] The lower right corner region P of the filter template P W3 The corresponding binarized image of the raw material bright spot X 1b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels whose pixel values are all 0 is denoted as N. pw3 ;
[0074] The region P of the filter template P W4 The corresponding binarized image of the raw material bright spot X 1b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels with a value of 1 is denoted as N. pw4 ;
[0075] The lower region P of the filter template P W5 The corresponding binarized image of the raw material bright spot X 1b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels whose pixel values are all 0 is denoted as N. pw5 ;
[0076] The region P of the filter template P W6 The corresponding binarized image of the raw material bright spot X 1b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels with a value of 1 is denoted as N. pw6 ;
[0077] Step 3.1.5: Determine the actual bright spot location at the edge based on THNWP1 and THWP1, and obtain the binarized image X of the actual bright spot at the raw material edge. 1br ;
[0078] Step 3.2: Identify black dots at the edge;
[0079] Step 3.2.1: Set the upper left corner region of the filter template P as P B1, then P is obtained by using formula (3-1) B1 The number of pixels contained in the top-left corner region P B1 The pixel number in the m4th row and n4th column of the filter template P is , wherein the value range of m4 is The value range corresponding to n4 is And for every increase of 1 in the value of m4, the value range of n4 corresponding thereto also increases by 1;
[0080] The region of the filter template P except the top-left corner region P B1 is set as P B2 ;
[0081] The top-right corner region of the filter template P is set as P B3 , then P is obtained by using formula (3-1) B3 The number of pixels contained in the top-right corner region P B3 The pixel number in the m5th row and n5th column of the filter template P is , wherein the value range of m5 is The value range corresponding to n5 is And for every increase of 1 in the value of m5, the value range of n5 corresponding thereto also increases by 1;
[0082] The region of the filter template P except the region P B3 is set as P B4 ;
[0083] The upper region of the filter template P is set as P B5 , and P is obtained by using formula (3-2) B5 The number of pixels contained in the lower region P B5 The pixel number in the m6th row and n6th column of the filter template P is , wherein m6=1, and the value range corresponding to n6 is [1, I];
[0084] The region of the filter template P except the region P B5 is set as P B6 ;
[0085] The center pixel number of the filter template P is
[0086] Let the threshold of the number of black points on the image edge be THBP2, and the threshold of the number of non-black points be THNBP2;
[0087] Step 3.2.2: The binary original black point image X B1 corresponding to the top-left corner region P2b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels whose pixel values are all 0 is denoted as N. pb1 ;
[0088] The region P of the filter template P B2 The corresponding binarized raw material black dot image X 2b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels with a value of 1 is denoted as N. pb2 ;
[0089] The upper right corner region P of the filter template P B3 The corresponding binarized raw material black dot image X 2b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels whose pixel values are all 0 is denoted as N. pb3 ;
[0090] The region P of the filter template P B4 The corresponding binarized raw material black dot image X 2b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels with a value of 1 is denoted as N. pb4 ;
[0091] The upper region P of the filter template P B5 The corresponding binarized raw material black dot image X 2b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels whose pixel values are all 0 is denoted as N. pb5 ;
[0092] The region P of the filter template P B6 The corresponding binarized raw material black dot image X 2b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels with a pixel value of 1 is N. pb6 ;
[0093] Step 3.2.3: Determine the region where the actual black dots are located at the edge based on the thresholds THNBP2 and THBP2, and obtain the binarized image X of the actual black dots at the edge of the raw material. 2br .
[0094] The judgment process in step 3.1.5 is as follows:
[0095] If (N) is satisfied pw1 ≥THNWP1 and N pw2 ≥THWP1) or (Npw3 ≥THNWP1 and N pw4 ≥THWP1) or (N pw5 ≥THNWP1 and N pw6 If ≥THWP1), then the binarized raw material bright spot image X 1b The pixel number corresponding to the center point of the filter template P is Pixels that are determined to be actual bright spots on the edge are marked with a pixel value of 1; otherwise, the binarized raw material bright spot image X is... 1b The corresponding center pixel number within the filter template P The pixels that are determined to be actual non-bright spots at the edge are marked with a pixel value of 0; thus completing the binarization of the raw material bright spot image X. 1b Compared with the binarized raw material foreground image X 3b Simultaneously, filtering based on the filter template P is performed to obtain a binarized image X of the actual bright spots at the raw material edge. 1br .
[0096] The judgment process in step 3.2.3 is as follows:
[0097] If (N) is satisfied pb1 ≥THNBP2 and N pb2 ≥THBP2) or (N pb3 ≥THNBP2 and N pb4 ≥THBP2) or (N pb5 ≥THNBP2 and N pb6 If ≥THBP2), then the binarized raw material black dot image X 2b The pixel number corresponding to the center point of the filter template P is Pixels that are determined to be actual black points on the edge are marked with a pixel value of 1; otherwise, the binarized raw material black point image X is... 2b The pixel number corresponding to the center point of the filter template P is The pixels that are determined to be actual non-black points on the edge are marked with a pixel value of 0; thus completing the binarization of the raw material black point image X. 2b Compared with the binarized raw material foreground image X 3b Simultaneously, filtering based on the filter template P is performed to obtain a binarized image X of the actual black dots at the edge of the raw material. 2br .
[0098] The present invention provides an electronic device, including a memory and a processor, characterized in that the memory is used to store a program that supports the processor in executing any of the above-described mirror glass feature recognition methods, and the processor is configured to execute the program stored in the memory.
[0099] The application discloses a computer readable storage medium, and a computer program is stored on the computer readable storage medium.
[0100] Compared with the prior art, the application has the beneficial effects that:
[0101] 1、The application accurately distinguifies foreground points and background points in the raw material color image through the algorithm of step 2.3, thereby providing effective support for subsequent extraction of actual feature points of the raw material edge.
[0102] 2、The application extracts actual bright points of the raw material edge and actual dark points of the raw material edge through steps 3 and 4, effectively avoids the interference of stone ceramic surface glass debris, accurately distinguishes mirror glass and stone ceramic under the condition of light transmission, and thereby can significantly reduce the taking out of mirror glass when waste glass light selection is used to remove refractory materials while ensuring high sorting accuracy. DETAILED DESCRIPTION
[0103] In the embodiment, a mirror glass feature recognition method is performed according to the following steps:
[0104] Step 1: using a CCD camera to collect waste glass raw material images;
[0105] In order to better highlight the black and white feature points of the target object, any non-black and white pure color background is selected, and a white light transmission method is used to collect the raw material color image X of waste glass raw material containing mirror glass and stone ceramic in the RGB color space under the pure color background; and the width of the raw material color image X is W, and the height is H.
[0106] Step 2: feature point extraction;
[0107] Step 2.1: bright point extraction;
[0108] Step 2.1.1: according to the RGB color feature of the bright point in the raw material color image X, the threshold value for judging the red component R of the bright point is set as THR1, the threshold value for judging the green component G of the bright point is set as THG1, and the threshold value for judging the blue component B of the bright point is set as THB1.
[0109] Step 2.1.2: according to the threshold values THR1, THG1 and THB1, the region where the bright point is located in each pixel point of the raw material color image X is judged.
[0110] If the red component R of any one pixel point in the raw color image X is greater than the threshold value THR1, the green component G is greater than the threshold value THG1, and the blue component B is greater than the threshold value THB1, it is determined that the corresponding pixel point is a bright point, and the pixel value of the bright point is kept unchanged; otherwise, it is determined that the corresponding pixel point is a non-bright point, and the pixel value of the non-bright point is set to "0"; thereby the bright point extraction in the raw color image X is completed, and the raw image X1 after the bright point extraction is obtained; the raw image X1 after the bright point extraction is binarized to obtain the raw bright point image X2 after the binarization 1b At this time, the bright point region includes the edge of the mirror glass, the scratch in the middle of the mirror glass, other glass, and the bright point generated by the glass debris attached to the stone ceramic surface;
[0111] Step 2.2: black point extraction;
[0112] Step 2.2.1: according to the RGB color features of the black point in the raw color image X, the threshold value for judging the red component R of the black point is set as THR2, the threshold value for judging the green component G of the black point is set as THG2, and the threshold value for judging the blue component B of the black point is set as THB2;
[0113] Step 2.2.2: according to the threshold values THR2, THG2 and THB2, the region where the black point is located in each pixel point of the raw color image X is judged:
[0114] If the red component R of any one pixel point in the raw color image X is less than the threshold value THR2, the green component G is less than the threshold value THG2, the blue component B is less than the threshold value THB2, and the red component R, the green component G and the blue component B are all greater than 0, it is determined that the corresponding pixel point is a black point, and the pixel value of the black point is kept unchanged; otherwise, it is determined that the corresponding pixel point is a non-black point, and the pixel value of the non-black point is set to "0"; thereby the black point extraction in the raw color image X is completed, and the raw image X2 after the black point extraction is obtained; the raw image X2 after the black point extraction is binarized to obtain the raw black point image X3 after the binarization 2b At this time, the black point region includes the middle part of the mirror glass, the edge of the other thick glass, and the stone ceramic;
[0115] Step 2.3: foreground point extraction;
[0116] Step 2.3.1: according to the RGB color features of the background in the raw color image X, the mean value of the background red component R1 is set as THR3, the mean value of the background green component G1 is set as THG3, the mean value of the background blue component B1 is set as THB3, and the threshold value of the background removal intensity is set as THK3, which is equivalent to the degree of removing the background;
[0117] Step 2.3.2: According to the RGB color feature of the background in the raw color image X, set the upper limit of the red threshold of the background red component R1 as THR3 max , and the lower limit of the red threshold of the background red component R1 as THR3 min ;
[0118] If THR3 + THK3 > 255, then let THR3 max = 255, otherwise, the upper limit of the red threshold THR3 max is obtained by using formula (2-1):
[0119] THR3 max = THR3 + THK3 (2-1)
[0120] If THR3 ≤ THK3, then let THR3 min = 1, otherwise, the lower limit of the red threshold THR3 min is obtained by using formula (2-2):
[0121] THR3 min = THR3 - THK3 (2-2)
[0122] Step 2.3.3: According to the RGB color feature of the background in the raw color image X, set the upper limit of the green threshold of the background green component G1 as THG3 max , and the lower limit of the green threshold of the background green component G1 as THG3 min ;
[0123] If THG3 + THK3 > 255, then THG3 max = 255, otherwise, the upper limit of the green threshold THG3 max is obtained by using formula (2-3):
[0124] THG3 max = THG3 + THK3 (2-3)
[0125] If THG3 ≤ THK3, then THG3 min = 1, otherwise, the lower limit of the green threshold THG3 min is obtained by using formula (2-4):
[0126] THG3 min = THG3 - THK3 (2-4)
[0127] Step 2.3.4: According to the RGB color feature of the background in the raw image X, set the upper limit of the blue threshold of the background blue component B1 as THB3 max , and the lower limit of the blue threshold of the background blue component B1 as THB3 min ;
[0128] If THB3 + THK3 > 255, then THB3 max =255, otherwise, use equation (2-5) to obtain the upper limit of the blue threshold THB3. max :
[0129] THB3 max =THB3 + THK3 (2-5)
[0130] If THB3 ≤ THK3, then THB3 min =1, otherwise, use equation (2-6) to obtain the lower limit of the blue threshold THB3. min :
[0131] THB3 min =THB3-THK3 (2-6)
[0132] Step 2.3.5: According to THR3 max THR3 min THR3 max THR3 min THB3 max and THB3 min Determine the region where the foreground point is located among each pixel of the raw material color image X:
[0133] In this embodiment, the background of the raw material color image X is blue, and the red component R, green component G, and blue component B of any pixel in the raw material color image X simultaneously satisfy equations (2-7) and (2-8). Then, the corresponding pixel is determined to be a background point, and the pixel value of the background point is set to "0". Otherwise, the corresponding pixel is determined to be a foreground point, and the pixel value of the foreground point remains unchanged. Thus, the foreground point extraction in the raw material color image X is completed, and the raw material image X3 after foreground point extraction is obtained.
[0134]
[0135] THG3 min ≤G≤THG3 max (2-8)
[0136] The raw material image X3 after the foreground point is extracted is binarized to obtain the binarized raw material foreground point image X. 3b At this point, the foreground area includes all mirrored glass, stone ceramics, other glass, and small glass fragments, except for the blue background dot.
[0137] If the background of the raw color image X is green, and the red component R, the green component G and the blue component B of any one pixel point in the raw color image X simultaneously satisfy formula (2-9) and formula (2-10), it is determined that the corresponding pixel point is a background point, and the pixel value of the background point is set to "0"; otherwise, it is determined that the corresponding pixel point is a foreground point, and the pixel value of the foreground point is kept unchanged; thereby the foreground point extraction in the raw color image X is completed, and the raw image X3 after foreground point extraction is obtained.
[0138]
[0139] THR3 min ≤R≤THR3 max (2-10)
[0140] If the background of the raw color image X is red, and the red component R, the green component G and the blue component B of any one pixel point in the raw color image X simultaneously satisfy formula (2-11) and formula (2-8), it is determined that the corresponding pixel point is a background point, and the pixel value of the background point is set to "0"; otherwise, it is determined that the corresponding pixel point is a foreground point, and the pixel value of the foreground point is kept unchanged; thereby the foreground point extraction in the raw color image X is completed, and the raw image X3 after foreground point extraction is obtained.
[0141]
[0142] Step 3: edge feature point judgment;
[0143] Step 3.1: edge bright point judgment;
[0144] Step 3.1.1: the size of the square filter template P is set to IxI, wherein I is an odd number greater than or equal to 3, and I is less than the greatest common divisor of W and H, in the embodiment, I is 7, W and H are 1328 and 1024 respectively, and the filter template with the size of 7x7 is obtained.
[0145] Step 3.1.2: the pixel number of the pixel in the i-th row and the j-th column of the filter template P is set to Wherein, the value range of i and j is [1, 7];
[0146] Step 3.1.3: the lower left corner region of the filter template P is set to P W1 , the number of pixels contained in P W1 is 6, and the lower left corner region P W1 contains the pixel with the pixel number of in the m1-th row and the n1-th column of the filter template P, wherein the value range of m1 is [5, 7], the corresponding value range of n1 is [1, 3], and the value range of n1 corresponding to the value of m1 increases by 1 every time the value of m1 increases by 1;
[0147] The left-bottom corner region P of the filter template P is set as P W1 W2 ;
[0148] The right-bottom corner region P of the filter template P is set as P W3 W3 The number of pixels contained in P is 6, and the right-bottom corner region P W3 contains the pixel numbered as in the m2th row and n2th column of the filter template P, wherein m2 takes a value in the range of [5, 7], n2 takes a value in the range of [5, 7] correspondingly, and the value range of n2 also increases by 1 correspondingly with the increase of 1 in the value of m2;
[0149] The filter template P is set as P W3 except for the right-bottom corner region P W4 ;
[0150] The lower region P of the filter template P is set as P W5 W5 The number of pixels contained in P is 7, and the lower region P W5 contains the pixel numbered as in the m3th row and n3th column of the filter template P, wherein m3 = 7, and n3 takes a value in the range of [1, 7] correspondingly;
[0151] The filter template P is set as P W5 except for the lower region P W6 ;
[0152] The center pixel of the filter template P is numbered as
[0153] Let the threshold value of the number of image edge bright points be THWP1, and the threshold value of the number of non-bright points be THNWP1;
[0154] Step 3.1.4: Count the number of pixels in the left-bottom corner region P W1 of the filter template P, whose pixel value in the binary bright point image X 1b after binarization and the pixel value in the binary foreground point image X 3b after binarization are both 0, and record the number as N pw1 ;
[0155] Count the number of pixels in the region P W2 of the filter template P, whose pixel value in the binary bright point image X 1b after binarization and the pixel value in the binary foreground point image X 3b after binarization are both 1, and record the number as N pw2 ;
[0156] the pixel value of the corresponding binarized raw highlight point image X W3 in the region P 1b of the filter template P and the pixel value of the binarized raw foreground point image X 3b are both 0, the number of pixels is recorded as N pw3 ;
[0157] the pixel value of the corresponding binarized raw highlight point image X W4 in the region P 1b of the filter template P and the pixel value of the binarized raw foreground point image X 3b are both 1, the number of pixels is recorded as N pw4 ;
[0158] the pixel value of the corresponding binarized raw highlight point image X W5 in the lower region P 1b of the filter template P and the pixel value of the binarized raw foreground point image X 3b are both 0, the number of pixels is recorded as N pw5 ;
[0159] the pixel value of the corresponding binarized raw highlight point image X W6 in the region P 1b of the filter template P and the pixel value of the binarized raw foreground point image X 3b are both 1, the number of pixels is recorded as N pw6 ;
[0160] Step 3.1.5: Determine the region where the actual edge highlight is located according to THNWP1 and THWP1:
[0161] If (N pw1 ≥ THNWP1 and N pw2 ≥ THWP1) or (N pw3 ≥ THNWP1 and N pw4 ≥ THWP1) or (N pw5 ≥ THNWP1 and N pw6 ≥ THWP1), the pixel point corresponding to the center pixel number P 1b in the filter template P of the binarized raw highlight point image X 24 is determined as an actual edge highlight, and its pixel value is marked as 1; otherwise, the pixel point corresponding to the center pixel number P 1b in the filter template P of the binarized raw highlight point image X 24 is determined as an actual edge non-highlight, and its pixel value is marked as 0; thereby completing the binarized raw highlight point image X 1b and the binarized raw foreground point image X 3bMeanwhile, the filtering processing based on the filtering template P is performed to obtain the binary original material edge actual highlight image X 1br At this time, the highlight area contains the highlight generated by the mirror glass edge, other glass edges and the glass debris attached to the stone ceramic edge;
[0162] Step 3.2: Edge black point judgment
[0163] Step 3.2.1: Set the top-left corner area of the filtering template P as P B1 , and the number of pixels contained in P B1 is 6, and the top-left corner area P B1 contains the pixel number of the m4th row and the n4th column in the filtering template P , wherein the value range of m4 is [1, 3], the value range corresponding to n4 is [1, 3], and the value range of n4 also increases by 1 for each increase of 1 in the value of m4;
[0164] Set the area of the filtering template P except the top-left corner area P B1 as P B2 ;
[0165] Set the top-right corner area of the filtering template P as P B3 , and the number of pixels contained in P B3 is N1=6, and the top-right corner area P B3 contains the pixel number of the m5th row and the n5th column in the filtering template P , wherein the value range of m5 is [1, 3], the value range corresponding to n5 is [5, 7], and the value range of n5 also increases by 1 for each increase of 1 in the value of m5;
[0166] Set the area of the filtering template P except the area P B3 as P B4 ;
[0167] Set the upper area of the filtering template P as P B5 , and the number of pixels contained in P B5 is N2=7, and the lower area P B5 contains the pixel number of the m6th row and the n6th column in the filtering template P , wherein m6=1, and the value range corresponding to n6 is [1, 7];
[0168] Set the area of the filtering template P except the area P B5 as P B6 ;
[0169] Set the center point pixel number of the filtering template P as
[0170] Let the threshold for the number of black dots at the image edge be THBP2, and the threshold for the number of non-black dots be THNBP2;
[0171] Step 3.2.2: Select the upper left corner region P of the filter template P. B1 The corresponding binarized raw material black dot image X 2b The pixel values and the binarized foreground image of the raw material X 3b的 The number of pixels with all values of 0 is denoted as N. pb1 ;
[0172] The region P of the filter template P B2 The corresponding binarized raw material black dot image X 2b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels with a value of 1 is denoted as N. pb2 ;
[0173] The upper right corner region P of the filter template P B3 The corresponding binarized raw material black dot image X 2b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels whose pixel values are all 0 is denoted as N. pb3 ;
[0174] The region P of the filter template P B4 The corresponding binarized raw material black dot image X 2b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels with a value of 1 is denoted as N. pb4 ;
[0175] The upper region P of the filter template P B5 The corresponding binarized raw material black dot image X 2b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels whose pixel values are all 0 is denoted as N. pb5 ;
[0176] The region P of the filter template P B6 The corresponding binarized raw material black dot image X 2b The pixel values and the binarized foreground image of the raw material X 3b The number of pixels with a pixel value of 1 is N. pb6 ;
[0177] Step 3.2.3: Determine the actual location of the black dot at the edge based on the thresholds THNBP2 and THBP2:
[0178] If (N) is satisfied pb1 ≥THNBP2 and Npb2 ≥THBP2) or (N pb3 ≥THNBP2 and N pb4 ≥THBP2) or (N pb5 ≥THNBP2 and N pb6 ≥THBP2), the binary raw material black point image X 2b The pixel point corresponding to the center point pixel number P 24 in the filter template P is determined as an edge actual black point, and its pixel value is marked as 1; otherwise, the binary raw material black point image X 2b The pixel point corresponding to the center point pixel number P in the filter template P is determined as an edge actual non-black point, and its pixel value is marked as 0; thereby completing the filter processing of the binary raw material black point image X 2b and the binary raw material foreground point image X 3b based on the filter template P to obtain the binary raw material edge actual black point image X 2br At this time, the black point region contains the part of the mirror glass edge close to the bright point and the part of the stone ceramic edge without glass chippings;
[0179] Step 4: Binary image superposition statistics;
[0180] Step 4.1: The binary raw material edge actual bright point image X 1br , the binary raw material edge actual black point image X 2br and the binary raw material foreground point image X 3b are simultaneously subjected to connected domain calculation to obtain a plurality of connected domains;
[0181] Step 4.2: In the same connected domain, the number of all edge actual bright points in X 1br , X 2br and X 3b is superimposed and marked as N pw7 , and the actual bright point number threshold is THWP3; the number of all edge actual black points in X 1br , X 2br and X 3b is superimposed and marked as N pb7 , and the actual black point number threshold is THBP3;
[0182] Step 5: Feature judgment;
[0183] Step 5.1: According to THWP3 and THBP3, the region where the mirror glass or the stone ceramic is located is judged:
[0184] In the same connected domain, if the conditions N pw7 ≥THWP3 and N pb7If THWP3≥ THBP3, the target object in the connected domain is determined as mirror glass; if condition N pw7 < THWP3 and N pb7 If THWP3≥ THBP3, the target object in the connected domain is determined as stone ceramic; otherwise, the target object in the connected domain is determined as other glass.
[0185] In this embodiment, an electronic device includes a memory for storing a program supporting the mirror glass feature recognition method described above on a processor, and the processor is configured to execute the program stored in the memory.
[0186] In this embodiment, a computer readable storage medium has a computer program stored thereon, and the computer program, when executed by a processor, performs the steps of the mirror glass feature recognition method described above.
Claims
1. A mirror glass feature recognition method, characterized by, is carried out as follows: Step 1: Collecting waste glass raw material image; selecting any non-black and white pure color background, and collecting the waste glass raw material containing mirror glass and stone ceramic in the RGB color space under the white light transmission mode on the pure color background to obtain a raw material color image X; and the width of the raw material color image X is W and the height is H; Step 2: Feature point extraction, including: bright spot extraction, black spot extraction, foreground spot extraction; Step 3: Edge feature point judgment, including: edge bright spot judgment, edge black spot judgment; Step 4: Binary image superposition statistics; Step 4.1: The binary material edge actual highlight image X 1br , the binary material edge actual highlight image X 2br , and the binary material foreground point image X 3b At the same time, the connected domain calculation is carried out to obtain a plurality of connected domains; Step 4.2: In the same connected domain, the number of all edge actual bright spots in X 1br , X 2br and X 3b is added and recorded as N pw7 , and the actual bright spot number threshold is THWP3; the number of all edge actual black spots in X 1br , X 2br and X 3b is added and recorded as N pb7 , and the actual black spot number threshold is THBP3; Step 5: judging the area where the mirror glass or stone ceramic is located according to THWP3 and THBP3: In the same connected domain, if condition N pw7 ≥ THWP3 and N pb7 ≥ THBP3 are satisfied, the target object in the connected domain is determined as mirror glass; if condition N pw7 <THWP3 and N pb7 ≥ THBP3 are satisfied, the target object in the connected domain is determined as stone ceramic; otherwise, the target object in the connected domain is determined as other glass.
2. The mirror glass feature recognition method of claim 1, wherein, The step 2 includes: Step 2.1: Bright spot extraction; Step 2.1.1: According to the color characteristics of the raw material color image X, the threshold value of the red component R is set as THR1, the threshold value of the green component G is set as THG1, and the threshold value of the blue component B is set as THB1; Step 2.1.2: According to the threshold values THR1, THG1 and THB1, the area where the bright spot is located in each pixel point of the raw material color image X is judged; Step 2.2: Black spot extraction; Step 2.2.1: According to the color characteristics of the raw material color image X, the threshold value of the red component R is set as THR2, the threshold value of the green component G is set as THG2, and the threshold value of the blue component B is set as THB2; Step 2.2.2: According to the threshold values THR2, THG2 and THB2, the area where the black spot is located in each pixel point of the raw material color image X is judged; Step 2.3: Foreground spot extraction; Step 2.3.1: According to the background color characteristics of the raw material color image X, the mean value of the background red component R1 is set as THR3, the mean value of the background green component G1 is set as THG3, the mean value of the background blue component B1 is set as THB3, and the threshold value of the background intensity is set as THK3; Step 2.3.2: According to the background color feature of the raw material color image X, set the upper limit of the red threshold of the background red component R1 as THR3 max and the lower limit of the red threshold of the background red component R1 as THR3 min ; Step 2.3.3: According to the background color feature of the raw material color image X, set the upper limit of the green threshold of the background green component G1 as THG3 max , and set the lower limit of the green threshold of the background green component G1 as THG3 min ; Step 2.3.4: According to the background color feature of the raw material image X, set the upper limit of the blue threshold of the background blue component B1 as THB3 max , and set the lower limit of the blue threshold of the background blue component B1 as THB3 min ; Step 2.3.5: According to THR3 max , THR3 min , THR3 max , THR3 min , THB3 max , THB3 min Determine the region where the foreground points are in each pixel point of the raw color image X, and perform binaryzation processing on the raw image X3 after foreground point extraction to obtain the binaryzation raw foreground point image X 3b .
3. The mirror glass feature recognition method of claim 2, wherein, The process of step 2.1.2 is as follows: If the red component R of any one pixel point in the raw color image X is greater than a threshold THR1, the green component G is greater than a threshold THG1, and the blue component B is greater than a threshold THB1, it is determined that the corresponding pixel point is a highlight, and the pixel value of the highlight is kept unchanged; otherwise, it is determined that the corresponding pixel point is a non-highlight, and the pixel value of the non-highlight is set to "0"; thereby the highlight extraction in the raw color image X is completed, and a raw image X1 after highlight extraction is obtained; the raw image X1 after highlight extraction is subjected to a binarization processing, and a raw highlight image X2 after binarization is obtained 1b .
4. The mirror glass feature recognition method of claim 2, wherein, The process of step 2.2.2 is as follows: If the red component R of any one pixel point in the raw color image X is less than a threshold THR2, the green component G is less than a threshold THG2, the blue component B is less than a threshold THB2, and the red component R, the green component G, and the blue component B are all greater than 0, it is determined that the corresponding pixel point is a black point, and the pixel value of the black point is kept unchanged. Otherwise, it is determined that the corresponding pixel point is a non-black point, and the pixel value of the non-black point is set to "0". Thus, the black point extraction in the raw color image X is completed, and a raw image X2 after black point extraction is obtained. The raw image X2 after black point extraction is subjected to a binarization processing, and a raw black point image X3 after binarization is obtained. 2b .
5. The mirror glass feature recognition method according to claim 2, characterized in that, The setting rules of step 2.3.2 are as follows: If THR3 + THK3 > 255, then let THR3 = 255, otherwise, the upper red threshold THR3 is obtained using equation (2-1) max : THR3 = 255 - THK3 max : THR3 max = THR3+THK3 (2-1) If THR3 < THK3, then let THR3 = 1, otherwise, the red threshold lower limit THR3 is obtained using equation (2-2) min : THR3 = 1 - (THK3 - THR3) / (THK3 - THL3) min : THR3 = 1 - (THK3 - THR3) / (THK3 - THL3) THR3 min = THR3- THK3 (2-2) The setting rules of step 2.3.3 are as follows: THG3 = 255 if THG3 + THK3 > 255, otherwise THG3 is obtained using equation (2-3) max = 255, otherwise, the upper green threshold THG3 is obtained using equation (2-3) max : THG3 max = THG3 + THK3 (2-3) THG3 = THK3, else THG3 = THK3 - (THK3 - THG3) * (THK3 - THG3) / (THK3 - THG3) min = 1, else THG3 = THK3 - (THK3 - THG3) * (THK3 - THG3) / (THK3 - THG3) min THG THG3 min = THG3 - THK3 (2-4) The setting rules of step 2.3.4 are as follows: THB3 = 255, else, the upper blue threshold THB3 is obtained using equation (2-5) max = 255, else, the upper blue threshold THB3 is obtained using equation (2-5) max : THB3 max = THB3 + THK3 (2-5) THB3 = THK3, else, the blue threshold lower limit THB3 is obtained using equation (2-6) min = 1, else, the blue threshold lower limit THB3 is obtained using equation (2-6) min : THB3 min = THB3 - THK3 (2-6).
6. The mirror glass feature recognition method of claim 2, wherein, The foreground spot area judgment process of step 2.3.5 is as follows: If the background of the raw material color image X is blue or gray, and the red component R, green component G component and blue component B of any one pixel point in the raw material color image X satisfy formula (2-7) and formula (2-8) at the same time, it is determined that the corresponding pixel point is a background point, and the pixel value of the background point is "0"; otherwise, it is determined that the corresponding pixel point is a foreground spot, and the pixel value of the foreground spot is kept unchanged; Thus, the foreground spot extraction in the raw material color image X is completed, and a foreground spot extracted raw material image X3 is obtained; THG3 min ≤ G ≤ THG3 max (2-8) If the background of the raw color image X is green, and the red component R, the green component G and the blue component B of any one pixel point in the raw color image X simultaneously satisfy formula (2-9) and formula (2-10), it is determined that the corresponding pixel point is a background point, and the pixel value of the background point is set to "0"; otherwise, it is determined that the corresponding pixel point is a foreground point, and the pixel value of the foreground point is kept unchanged. Thus, the foreground point extraction in the raw color image X is completed, and the raw image X3 after foreground point extraction is obtained. THR3 min ≤ R ≤ THR3 max (2-10) If the background of the raw color image X is red, and the red component R, the green component G and the blue component B of any one pixel point in the raw color image X simultaneously satisfy formula (2-11) and formula (2-8), it is determined that the corresponding pixel point is a background point, and the pixel value of the background point is set to "0"; otherwise, it is determined that the corresponding pixel point is a foreground point, and the pixel value of the foreground point is kept unchanged. Thus, the foreground point extraction in the raw color image X is completed, and the raw image X3 after foreground point extraction is obtained.
7. The mirror glass feature recognition method of claim 1, wherein, The step 3 comprises: Step 3.1: edge bright point judgment; Step 3.1.1: setting the size of the square filter template P as IxI, wherein I is an odd number greater than or equal to 3, and I is less than the greatest common divisor of W and H; Step 3.1.2: set the pixel number of the pixel in the i-th row and j-th column in the filtering template P as wherein the value range of i and j is both [1, I]; Step 3.1.3: set the lower-left corner region of the filter template P as P W1 then P is obtained by using formula (3-1) W1 the number of pixels N1 contained in the lower-left corner region P W1 the pixel number of the m1th row and the n1th column in the filter template P is pixels, wherein the value range of m1 is [ the value range of n1 corresponding to m1 is and the value range of n1 corresponding to m1 also increases by 1 with the increase of the value of m1 by 1; The filter template P is set to remove the region P W1 except the lower left corner region P W2 ; A lower right corner region of the filter template P is set as P W3 Then, P is obtained by using formula (3-1) W3 The number of pixels N1 contained in the lower right corner region P W3 The pixel number of the m2th row and the n2th column in the filter template P is , wherein the value range of m2 is The value range corresponding to n2 is And the value range of n2 corresponding to m2 also increases by 1 with the increase of the value of m2 by 1. The filter template P is set to remove the region P except for the lower right corner region P W3 W4 ; The lower region of the filter template P is set as P W5 Then, P is obtained by using formula (3-2) W5 The number of pixels N2 contained in the lower region P W5 The pixel number of the m3th row and the n3th column in the filter template P is pixels, wherein m3=I, and the corresponding value range of n3 is [1, I]: N2=I (3-2) The filter template P is set to remove the lower region P W5 except the region P W6 ; The center pixel number of the filter template P is set as Setting the image edge bright point number threshold as THWP1, and the non-bright point number threshold as THNWP1; Step 3.1.4: Counting the number of pixels whose pixel values are both 0 in the region P W1 corresponding to the lower left corner of the filter template P 1b and the binary foreground point image X 3b . pw1 ; The number of pixels whose pixel values are both 1 in the region P of the filter template P W2 corresponding to the binarized raw highlight point image X 1b and the binarized raw foreground point image X 3b is denoted as N pw2 ; The pixel value of the pixel at the right lower corner of the filter template P W3 corresponding to the pixel value of the pixel at the right lower corner of the filter template P 1b corresponding to the pixel value of the pixel at the right lower corner of the filter template P 3b The pixel value of the pixel at the right lower corner of the filter template P pw3 ; The number of pixels whose pixel values are both 1 in the region P of the filter template P W4 corresponding to the binarized raw highlight point image X 1b and the binarized raw foreground point image X 3b is denoted as N pw4 ; The number of pixels whose pixel values are both 0 in the lower region P W5 of the filter template P and the binary raw foreground dot image X 1b is denoted as N 3b ; and pw5 the number of pixels whose pixel values are both 0 in the lower region P W5 of the filter template P and the binary raw foreground dot image X 1b is denoted as N 3b . The number of pixels whose pixel values are both 1 in the region P of the filter template P W6 corresponding to the binarized raw highlight point image X 1b and the binarized raw foreground point image X 3b is denoted as N pw6 ; Step 3.1.5: Determine the region where the actual bright spot of the edge is located according to THNWP1, THWP1, and obtain the binary image X of the actual bright spot of the edge of the raw material 1br ; Step 3.2: edge black point judgment; Step 3.2.1: set the top-left corner region of the filter template P as P B1 then P is obtained by using formula (3-1) B1 the number of contained pixels N1, and the top-left corner region P B1 The pixel number of the m4th row and the n4th column in the filter template P is pixels, wherein the value range of m4 is The value range corresponding to n4 is and the value range of n4 corresponding to m4 also increases by 1 for each increase of 1 in the value of m4; The filter template P is set to remove the region P B1 except the region at the upper left corner B2 ; A top-right corner region of the filter template P is set as P B3 Then, P is obtained by using formula (3-1) B3 The number of contained pixels N1, and the top-right corner region P B3 The pixel number of the m5th row and the n5th column in the filter template P is pixels, wherein the value range of m5 is The value range corresponding to n5 is And the value range of n5 corresponding to m5 also increases by 1 with the increase of the value of m5 by 1; The filter template P is set to remove regions P B3 other than region P B4 ; The upper region of the filter template P is set as P B5 , P is obtained by using formula (3-2) B5 The number of pixels N2 contained, and the lower region P B5 The pixel number of the m6th row and the n6th column in the filter template P is pixels, where m6=1, and the corresponding value range of n6 is [1, I]; The filter template P is set to remove regions P B5 except for the region P B6 ; setting the center point pixel number of the filter template P Setting the image edge black point number threshold as THBP2, and the non-black point number threshold as THNBP2; Step 3.2.2: Counting the number of pixels whose pixel values are both 0 in the upper left region P B1 of the filter template P and the corresponding binarized raw black point image X 2b and the binarized raw foreground point image X 3b . pb1 ; The number of pixels whose pixel values are both 1 in the region P of the filter template P B2 corresponding to the binary raw black dot image X 2b and the binary raw foreground dot image X 3b is denoted as N pb2 ; The pixel value of the upper right corner region P of the filter template P B3 corresponding to the binary raw material black point image X 2b The pixel value of the binary raw material foreground point image X 3b The pixel value of the binary raw material foreground point image X pb3 ; The number of pixels whose pixel values in the region P of the filter template P B4 corresponding to the pixel values in the binary raw black dot image X 2b and the pixel values in the binary raw foreground dot image X 3b are both 1 is denoted as N pb4 ; The pixel number of the upper region P B5 of the filter template P 2b corresponding to the pixel value of the binary raw black point image X 3b and the pixel value of the binary raw foreground point image X pb5 is recorded as N The number of pixels whose pixel values are both 1 in the region P of the filter template P B6 corresponding to the binary-processed raw black point image X 2b and the binary-processed raw foreground point image X 3b is N pb6 ; Step 3.2.3: judging the region where the actual black point of the edge is located according to the threshold THNBP2, THBP2, to obtain the binary image X of the actual black point of the edge of the raw material 2br .
8. The mirror glass feature recognition method of claim 7, wherein, The judgment process of step 3.1.5 is as follows: If (N) is satisfied pw1 ≥THNWP1 and N pw2 ≥THWP1) or (N pw3 ≥THNWP1 and N pw4 ≥THWP1) or (N pw5 ≥THNWP1 and N pw6 If ≥THWP1), then the binarized raw material bright spot image X 1b The pixel number corresponding to the center point of the filter template P is The pixels that are identified as actual bright spots on the edge are marked with a pixel value of 1. Otherwise, the binary raw highlight image X 1b The pixel point corresponding to the center point pixel number in the filter template P The pixel point is determined as an actual non-highlight edge, and the pixel value is marked as 0. Thus, the binary original material highlight image X 1b with the binary original material foreground highlight image X 3b Meanwhile, the filtering process based on the filtering template P is performed to obtain the binary original material edge actual highlight image X 1br .
9. The mirror glass feature recognition method of claim 7, wherein, The judgment process of step 3.2.3 is as follows: if (N pb1 ≥ THNBP2 and N pb2 ≥ THBP2) or (N pb3 ≥ THNBP2 and N pb4 ≥ THBP2) or (N pb5 ≥ THNBP2 and N pb6 ≥ THBP2), the binary raw material black point image X 2b is determined as an edge actual black point, and the pixel value is marked as 1; otherwise, the binary raw material black point image X 2b is determined as an edge actual non-black point, and the pixel value is marked as 0. The pixel point corresponding to the center point pixel number 0 in the filtering template P is determined as an edge actual black point, and the pixel value is marked as 1; otherwise, the binary raw material black point image X The pixel point corresponding to the center point pixel number 0 in the filtering template P is determined as an edge actual non-black point, and the pixel value is marked as 0. Thus, the binary original material black point image X 2b with the binary original material foreground point image X 3b Meanwhile, the filtering process based on the filtering template P is performed to obtain the binary original material edge actual black point image X 2br .
10. An electronic device comprising a memory and a processor, characterized in that The memory is used to store a program supporting the processor to execute the mirror glass feature recognition method of any one of claims 1-9, and the processor is configured to execute the program stored in the memory.
11. A computer-readable storage medium having stored thereon a computer program, wherein The computer program is executed by the processor to execute the steps of the mirror glass feature recognition method of any one of claims 1-9.
Citation Information
Patent Citations
Method and device for extracting edges
CN104484871A
Small-size glass panel surface defect detection method and small-size glass panel surface defect detection system
CN105447854A