A glass quality detection method for instrument dials
Obtaining glass images through optical means, extracting straight segments and calculating defect indicators solves the problem of low glass detection accuracy in the existing technology and achieves high-accuracy quality inspection of instrument dial glass.
Patent Information
- Application Number
- CN202311080850.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-25
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2043-08-25
AI Technical Summary
Existing glass product quality inspection methods have inaccurate threshold selection, resulting in low accuracy of inspection results. Scratch defects on the surface of glass products cannot be accurately obtained, which affects the accuracy of product quality inspection.
Use optical means to obtain the visible light image of the instrument dial glass, extract the line segments to be analyzed through straight line detection, divide the image into block areas, calculate the number, distance and length of line segments in the block area, obtain the defect degree index, and combine it with eigenvalue analysis to generate quality inspection Indicators to determine the defect level of glass.
It improves the accuracy of quality inspection of glass products, can more accurately identify scratch defects on the glass surface of instrument dials, and provides higher detection accuracy and reliability.
Smart Images

Figure CN116777921B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of glass quality detection, and in particular to a glass quality detection method for an instrument dial. Background Art
[0002] At present, glass is circulated in the market as an important material in daily life, production and science and technology. However, due to its smooth surface and difficult transportation characteristics, in the process of glass processing and manufacturing, due to the obsolete production and processing machinery and equipment, improper operation of relevant technical operators, the processed glass products have scratch defects, which affects the overall appearance of the product and is not conducive to observing the measurement results of related precision instruments. Therefore, it is particularly important to conduct quality inspection on the processed instrument dial glass. In the prior art, the threshold segmentation method is often used to extract scratch defects on the surface of glass products. However, due to the inaccurate threshold selection, this method easily leads to low accuracy of the threshold segmentation result, and cannot accurately obtain the scratch defects on the surface of the glass product, resulting in low accuracy of the glass product quality inspection results. Summary of the invention
[0003] In order to solve the technical problem of low accuracy of glass product quality inspection results, the purpose of the present invention is to provide a glass quality inspection method for instrument dials. The technical solution adopted is as follows:
[0004] The visible light image of the instrument dial glass surface is recorded as the image to be analyzed, straight line detection is performed on the image to be analyzed to obtain the line segments to be analyzed, and the image to be analyzed is divided into block areas of fixed size;
[0005] A first coefficient is obtained according to the number of line segments to be analyzed contained in the block area, a second coefficient is obtained according to the distance between the line segments to be analyzed contained in the block area, a third coefficient is obtained according to the length of the line segments to be analyzed contained in the block area, and a defect degree index of the block area is obtained according to the first coefficient, the second coefficient and the third coefficient;
[0006] According to the defect degree index of the block area, the defect anomaly matrix of the image to be analyzed is obtained, and the defect anomaly matrix is decomposed to obtain the eigenvalue; according to the eigenvalue and the number of eigenvalues, the quality detection index of the image to be analyzed is obtained; according to the quality detection index, the glass quality detection result of the instrument dial is obtained.
[0007] Preferably, the quality detection index of the image to be analyzed obtained according to the eigenvalue and the number of eigenvalues is specifically:
[0008] The feature weight of the eigenvalue is obtained according to the number of any eigenvalue of the abnormal feature matrix and the number of all eigenvalues, and the quality detection index of the image to be analyzed is obtained according to the difference between the eigenvalue and the mean of all eigenvalues and the feature weight.
[0009] Preferably, the calculation formula of the quality detection index is specifically: in, represents the quality inspection index of the image to be analyzed, n represents the total number of eigenvalues of the defect anomaly matrix of the image to be analyzed, represents the value of the tth eigenvalue, The eigenvalue is The number of eigenvalues of represents the mean of all eigenvalues, is the feature weight.
[0010] Preferably, the method for obtaining the second coefficient is specifically:
[0011] For any block area, when the number of line segments to be analyzed in the block area is less than a preset number threshold, the value of the second coefficient of the block area is set to a preset first value; when the number of line segments to be analyzed in the block area is greater than or equal to the preset number threshold, the distance between the midpoints of any two line segments to be analyzed is calculated and recorded as the characteristic distance, and the average of the characteristic distances corresponding to all any two line segments to be analyzed in the block area is taken as the second coefficient.
[0012] Preferably, the method for obtaining the third coefficient is specifically as follows: for any block area, the average value of the lengths of all line segments to be analyzed is used as the third coefficient.
[0013] Preferably, the method for obtaining the defect degree index is specifically as follows:
[0014] For any block area, the product of the first coefficient and the third coefficient is calculated, and the ratio of the product to the second coefficient is used as the defect degree indicator.
[0015] Preferably, the method for obtaining the first coefficient is specifically:
[0016] For any block area, the ratio between the total number of pixels on all the line segments to be analyzed in the block area and the total number of all the pixels in the block area is used as the first coefficient.
[0017] Preferably, the defect anomaly matrix of the image to be analyzed obtained according to the defect degree index of the block area is specifically:
[0018] The pixel values of the pixels are assigned using the defect degree index of the block area in the image to be analyzed to obtain the defect feature image, the image matrix of the defect feature image and its transposed matrix are obtained, and the outer product of the image matrix and its transposed matrix is used as the defect anomaly matrix of the image to be analyzed.
[0019] Preferably, the glass quality test result of the instrument dial obtained according to the quality test index is specifically:
[0020] When the quality inspection index of the image to be analyzed is less than a preset first threshold, the glass quality inspection result of the instrument dial is a first defect level; when the quality inspection index of the image to be analyzed is greater than or equal to the first threshold and less than a preset second threshold, the glass quality inspection result of the instrument dial is a second defect level; when the quality inspection index of the image to be analyzed is greater than or equal to the second threshold, the glass quality inspection result of the instrument dial is a third defect level.
[0021] The embodiments of the present invention have at least the following beneficial effects:
[0022] The present invention uses optical means to obtain a visible light image of the instrument dial glass surface and records it as an image to be analyzed. Considering that the scratch defect on the instrument dial glass surface is characterized by an approximate straight line, the straight line segments in the image to be analyzed are extracted to obtain the line segments to be analyzed. Meanwhile, considering that the scratch defect has a small and dense distribution feature, the image to be analyzed is divided into smaller block areas for subsequent analysis. A first coefficient is obtained according to the number of line segments to be analyzed contained in the block area, which represents the proportion of the scratch straight line defect distribution in the block area. A second coefficient is obtained according to the distance between the line segments to be analyzed contained in the block area, which represents the density of the scratch straight line defect distribution in the block area. A third coefficient is obtained according to the length of the line segments to be analyzed contained in the block area. , characterizes the length of the distribution of the straight scratch defect in the block area, and combines the three aspects to obtain the defect degree index of the block area, characterizing the severity of the straight scratch defect in the block area; in order to improve the accuracy of the instrument dial glass defect recognition, the overall distribution of the scratch defects in the image to be analyzed is analyzed in combination with the scratch defect distribution of each block area, and the defect anomaly matrix of the image to be analyzed is obtained. The eigenvalue of the defect anomaly matrix is used to reflect the defect degree of the scratch defects in the image, and then the overall defect severity in the image to be analyzed can be obtained, and the scratch defect recognition result on the glass surface of the instrument dial is more accurate, and then the accuracy of the glass quality inspection result of the instrument dial obtained according to the defect severity is higher. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 The present invention is a method flow chart of a glass quality detection method for instrument dials. Implementation
[0025] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the glass quality detection method for instrument dials proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures, or characteristics in one or more embodiments may be combined in any suitable form.
[0026] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0027] A specific scheme of a glass quality detection method for an instrument dial provided by the present invention is described in detail below with reference to the accompanying drawings. Example
[0028] See also Figure 1 , which shows a method flow chart of a glass quality detection method for an instrument dial provided by an embodiment of the present invention, the method comprising the following steps:
[0029] Step 1: record the visible light image of the instrument dial glass surface as the image to be analyzed, perform straight line detection on the image to be analyzed to obtain line segments to be analyzed, and divide the image to be analyzed into block areas of fixed size.
[0030] First, it is necessary to use optical means to obtain an image of the glass surface of the instrument dial. Generally, the glass surface of the lossless instrument dial obtained through production is smooth and lossless, but scratch defects may appear on the surface of the instrument dial during the processing. The quality of the image of the glass surface of the instrument surface obtained greatly affects the accuracy of the subsequent quality inspection results of the glass surface of the instrument dial. In order to obtain a higher quality image, in this embodiment, a ring-shaped LED structured light source is used to illuminate the glass surface of the instrument dial, which can highlight the defect characteristics in the glass surface of the instrument dial. Since CCD cameras are different from CMOS cameras in that they have higher sensitivity and can capture the detailed information of the photographed object well, in this embodiment, a CCD camera is used to shoot the glass surface of the instrument dial to be inspected to obtain a visible light image of the glass surface of the instrument dial.
[0031] Since various objective factors in the image shooting environment may affect the image quality of the instrument dial glass surface collected, resulting in noise in the image, which may cause great interference to the identification of defects on the instrument dial glass surface, in order to reduce the error in the identification process and improve the accuracy of defect identification, the RGB image collected by the camera is converted into a grayscale image. In this embodiment, the image is grayed using the weighted average method, and the implementer can select a suitable algorithm according to the actual situation. At the same time, the obtained grayscale image needs to be filtered, that is, the grayscale image is filtered using a bilateral filtering algorithm.
[0032] It should be noted that after filtering the grayscale image using the bilateral filtering algorithm, the edge of the image can be kept clear. The scratch defect on the glass dial of the instrument surface is generally manifested as a straight line. Considering that the scratch defect on the glass surface of the instrument dial is manifested in the image, the straight line may appear as an irregular line with a jagged shape. The existence of this feature is not conducive to the extraction of the scratch defect feature on the glass surface of the instrument dial. In order to smooth the straight edge of the scratch defect, in this embodiment, the Gaussian filtering algorithm is used to perform secondary filtering on the grayscale image after bilateral filtering to eliminate or even reduce the influence of noise points in the image directly captured on the subsequent glass quality detection as much as possible, and obtain the processed instrument dial glass grayscale image, which is recorded as the image to be analyzed.
[0033] Since the scratch defect on the glass surface of the instrument is shown as a straight line in the image, it is possible to perform straight line detection on the image to be analyzed, obtain the scratch defect portion that may exist in the image, and record the line segment obtained by the straight line detection on the image to be analyzed as the line segment to be analyzed. At the same time, the scratch defect portion has a larger gray value change compared to the normal portion in the image. Therefore, in this embodiment, the LSD algorithm is used to process the image to be analyzed and extract the straight line in the image to be analyzed. Among them, the LSD algorithm is an algorithm for extracting straight lines, which is a well-known technology and will not be introduced in detail here. The implementer can also select other suitable algorithms to perform straight line detection on the image to be analyzed according to the specific implementation scenario.
[0034] Since the linear distribution of scratch defects on the surface of the instrument dial glass is characterized by small and uneven distribution, in order to obtain more accurate defect recognition results, the image to be analyzed can be divided into smaller image block areas for analysis. Specifically, the image to be analyzed is divided into block areas of fixed size. In this embodiment, the fixed size is 3*3, that is, the image to be analyzed is segmented to obtain block areas of the same size, and the size of the block area is 3*3. At the same time, the implementer can set the value of the fixed size according to the specific implementation scenario.
[0035] Step 2: Obtain a first coefficient based on the number of line segments to be analyzed contained in the block area, obtain a second coefficient based on the distance between the line segments to be analyzed contained in the block area, obtain a third coefficient based on the length of the line segments to be analyzed contained in the block area, and obtain a defect degree index of the block area based on the first coefficient, the second coefficient and the third coefficient.
[0036] First, since the linear distribution of scratch defects is characterized by small and uneven distribution, the distribution of the line segments to be analyzed in the block area of the image to be analyzed is analyzed. The more line segments to be analyzed there are in the block area, the more serious the scratch defects on the instrument dial glass surface are in the local area of the block area. Based on this, the first coefficient is obtained according to the number of line segments to be analyzed contained in the block area, that is, for any block area, the ratio between the total number of pixels on all the line segments to be analyzed in the block area and the total number of all pixels in the block area is used as the first coefficient.
[0037] The first coefficient represents the proportion of the scratch line defect distribution in the block area, and the total number of pixels on the line segment to be analyzed in the block area is used to represent the number of scratch lines in the block area. The more scratch lines there are in the block area, the greater the proportion of the scratch line defect distribution in the block area, and the larger the corresponding value of the first coefficient, indicating that the local scratch defect in the block area is more serious. The fewer scratch lines there are in the block area, the smaller the proportion of the scratch line defect distribution in the block area, and the smaller the corresponding value of the first coefficient, indicating that the local scratch defect in the block area is less serious.
[0038] Then, if the distances between the line segments to be analyzed in the block area of the image to be analyzed are relatively close, it means that the scratch defects on the glass surface of the instrument dial in the block area are denser, and further, it means that the local scratch defects in the block area are more serious. Based on this, the second coefficient is obtained according to the distance between the line segments to be analyzed contained in the block area, that is, for any block area, when the number of line segments to be analyzed in the block area is less than the preset number threshold, the value of the second coefficient of the block area is set to the preset first value.
[0039] Among them, in this embodiment, the value of the preset quantity threshold is 2, that is, when the number of line segments to be analyzed contained in the block area is less than 2, that is, the block area only contains one line segment to be analyzed, or there is no line segment to be analyzed in the block area, this indicates that the density of local scratch defects in the block area is low, and further indicates that the local scratch defects in the block area are less serious, so it is necessary to assign a lower value to the second coefficient. In this embodiment, the value of the first value is 1, and the implementer can set it according to the specific implementation scenario.
[0040] When the number of line segments to be analyzed in the block area is greater than or equal to a preset threshold value, that is, when the number of line segments to be analyzed in the block area is greater than or equal to 2, the distance between the midpoints of any two line segments to be analyzed is calculated and recorded as the characteristic distance, and the average of the characteristic distances corresponding to all any two line segments to be analyzed in the block area is taken as the second coefficient.
[0041] In this embodiment, the distance between the midpoints of any two line segments to be analyzed is calculated using the pixel coordinates of the midpoints of the two line segments to be analyzed, wherein the method for obtaining the pixel coordinates is a well-known technique and will not be described in detail here. The second coefficient is expressed by the formula: in, represents the second coefficient of the i-th block area, Indicates the total number of line segments to be analyzed contained in the i-th block area, and They represent the horizontal and vertical coordinates of the midpoint of the ath line segment to be analyzed in the i-th block area, respectively. and They respectively represent the horizontal and vertical coordinates of the midpoint of the bth line segment to be analyzed in the ith block area.
[0042] The second coefficient characterizes the density of the distribution of scratch line defects in the block area, and the distance between the centers of the two line segments to be analyzed is used to characterize the distance between the two line segments to be analyzed. At the same time, the distance between the line segments to be analyzed in the block area can reflect the density of the distribution of scratch line defects in the block area. The closer the distance between the line segments to be analyzed in the block area, the higher the density of the distribution of scratch line defects in the block area, and the larger the value of the corresponding second coefficient, the more serious the local scratch defects in the block area. The farther the distance between the line segments to be analyzed in the block area, the lower the density of the distribution of scratch line defects in the block area, and the smaller the value of the corresponding second coefficient, the less serious the local scratch defects in the block area.
[0043] Furthermore, the length of the line segment to be analyzed in the block area of the image to be analyzed is analyzed. The longer the length of the line segment to be analyzed is, the longer the scratch defect on the instrument dial glass surface in the block area is, and the more serious the local scratch defect in the block area is. Based on this, the third coefficient is obtained according to the length of the line segment to be analyzed contained in the block area. Specifically, for any block area, the average of the lengths of all the line segments to be analyzed is used as the third coefficient.
[0044] In this embodiment, the length of the line segment to be analyzed is obtained using the pixel coordinates of the two endpoints of the line segment to be analyzed, that is, the pixel coordinates of the two endpoints of the line segment to be analyzed are obtained, and the distance between the two endpoints is calculated using the pixel coordinates to obtain the length of the line segment to be analyzed. The third coefficient is expressed by the formula: in, represents the third coefficient of the i-th block area, Indicates the total number of line segments to be analyzed contained in the i-th block area, and They represent the horizontal and vertical coordinates of the first endpoint of the kth line segment to be analyzed, and They respectively represent the horizontal and vertical coordinates of the second endpoint of the kth line segment to be analyzed in the i-th block area.
[0045] The third coefficient characterizes the length of the scratch line defect distribution in the block area, and the distance between the two end points of the line segment to be analyzed is used to characterize the length of the scratch line defect. The longer the length of the line segment to be analyzed in the block area, the longer the length of the scratch line defect distribution in the block area, and the larger the value of the corresponding third coefficient, the more serious the local scratch defect in the block area. The longer the length of the line segment to be analyzed in the block area, the longer the length of the scratch line defect distribution in the block area, and the smaller the value of the corresponding second coefficient, the less serious the local scratch defect in the block area.
[0046] Finally, if a scratch defect appears at a certain position on the glass surface of the instrument dial, the more linear scratch defects appear at this position, the larger the first coefficient value of the corresponding block area, the higher the density of linear scratch defects at this position, the smaller the second coefficient value of the corresponding block area, the longer the length of the scratch defect at this position, the larger the third coefficient value of the corresponding block area, indicating that the severity of the scratch defect at this position is higher. Based on this, the defect degree index of the block area is obtained according to the first coefficient, the second coefficient and the third coefficient. The relationship between the first coefficient and the defect degree index is a positive correlation, the relationship between the second coefficient and the defect degree index is a negative correlation, and the relationship between the third coefficient and the defect degree index is a positive correlation.
[0047] Specifically, for any block area, the product of the first coefficient and the third coefficient is calculated, and the ratio of the product to the second coefficient is used as the defect degree index. The defect degree index of the block area characterizes the severity of the linear scratch defects in the block area. The larger the value of the defect degree index, the more linear scratch defects appear in the block area, the higher the density, and the longer the length, which further indicates that the severity of the scratch defects on the instrument dial glass surface at this position is higher. The smaller the value of the defect degree index, the fewer linear scratch defects appear in the block area, the lower the density, and the shorter the length, which further indicates that the severity of the scratch defects on the instrument dial glass surface at this position is lower.
[0048] Step three, according to the defect degree index of the block area, the defect anomaly matrix of the image to be analyzed is obtained, and the defect anomaly matrix is decomposed to obtain the eigenvalue; according to the eigenvalue and the number of eigenvalues, the quality detection index of the image to be analyzed is obtained; according to the quality detection index, the glass quality detection result of the instrument dial is obtained.
[0049] First, since the defect level index of the block area in the image to be analyzed is obtained in step 2, it can only characterize the defect distribution of the instrument dial glass surface at each local position. In order to improve the accuracy of instrument dial glass defect recognition, the overall distribution of scratch defects in the image to be analyzed is analyzed in combination with the scratch defect distribution of each block area. Obtain the defect level index of each block area in the image to be analyzed, assign the pixel value of the pixel point using the defect level index of the block area in the image to be analyzed, obtain the defect feature image, obtain the image matrix of the defect feature image and its transposed matrix, and use the outer product of the image matrix and its transposed matrix as the defect anomaly matrix of the image to be analyzed.
[0050] Specifically, the pixel value of a pixel point is assigned with a defect level index of a block area, and then a sub-feature image can be obtained. In order to avoid the image size inconsistency between the sub-feature image and the image to be analyzed, which affects the subsequent calculation results, in this embodiment, the sub-feature image is processed by bilinear interpolation to obtain a defect feature image, and the size of the defect feature image is consistent with that of the feature image to be analyzed. Among them, the bilinear interpolation method is a commonly used well-known technology in image processing, and the method for obtaining the image matrix is also a well-known technology, which will not be introduced in detail here.
[0051] At the same time, it should be noted that the values of the elements in the image matrix of the defect feature image reflect the severity of the scratch defect at the corresponding position on the instrument dial glass surface. In order to highlight the abnormal data characteristics caused by the scratch defect on the instrument dial glass surface, a defect anomaly matrix is constructed, which is expressed as , R is the defect anomaly matrix, M is the image matrix, It is the transposed matrix of the image matrix. The defect anomaly matrix can be used to make the more serious scratch defects on the surface of the instrument dial glass more obvious, so that the instrument dial glass products can be processed by workers in time.
[0052] Then, since the eigenvalues of the matrix can reflect the characteristics of the data distribution changes in the matrix to a certain extent, that is, it can reflect the distribution of the severity of local scratch defects in different block areas in the image to be analyzed, and then it can reflect the severity of the overall scratch defects on the instrument dial glass surface. Based on this, the defect anomaly matrix is decomposed to obtain the eigenvalues. In this embodiment, the defect anomaly matrix R is decomposed using the SVD singular value decomposition algorithm to obtain all the eigenvalues of the defect anomaly matrix R.
[0053] If a serious scratch defect appears at a certain position on the glass surface of the instrument dial, the value at the corresponding position of the defect anomaly matrix is larger, and thus a larger eigenvalue corresponding to the defect anomaly matrix can be obtained. If there are more serious scratch defects at more locations on the glass surface of the instrument dial, the number of eigenvalues corresponding to the defect anomaly matrix of the image to be analyzed is larger. Based on this, the quality detection index of the image to be analyzed is obtained according to the eigenvalue and the number of eigenvalues.
[0054] Specifically, the feature weight of the eigenvalue is obtained according to the number of any eigenvalue of the abnormal feature matrix and the number of all eigenvalues, and the quality detection index of the image to be analyzed is obtained according to the difference between the eigenvalue and the mean of all eigenvalues and the feature weight, which is expressed as follows: in, represents the quality inspection index of the image to be analyzed, n represents the total number of eigenvalues of the defect anomaly matrix of the image to be analyzed, represents the value of the tth eigenvalue, The eigenvalue is The number of eigenvalues of represents the mean of all eigenvalues, is the feature weight.
[0055] It represents the difference between the value of the t-th eigenvalue and the mean of all eigenvalues. The larger the difference, the greater the difference between the t-th eigenvalue and the whole. Then the defect degree at a certain position on the surface of the instrument dial glass represented by the t-th eigenvalue is greater. Then the difference between all eigenvalues and the mean of eigenvalues is obtained, and the feature weight is The characteristic value is represented by The probability of occurrence of the eigenvalue is that the larger the value is, the more common the scratch defect of a certain degree is on the surface of the instrument dial glass. The more attention is paid to the distribution degree of the scratch defect. By using the feature weight to correct the difference between the eigenvalues, a more accurate defect degree of the instrument dial glass surface can be obtained.
[0056] The quality inspection index of the image to be analyzed can characterize the degree of scratch defects on the glass surface of the instrument dial. The larger the value of the quality inspection index, the more serious the scratch defects on the glass surface of the instrument dial corresponding to the image to be analyzed are, which may seriously affect the use of the instrument dial. The smaller the value of the quality index, the lighter the scratch defects on the glass surface of the instrument dial corresponding to the image to be analyzed are, which may not affect the use of the instrument dial.
[0057] Finally, the glass quality inspection result of the instrument dial is obtained according to the quality inspection index. Specifically, when the quality inspection index of the image to be analyzed is less than a preset first threshold, the glass quality inspection result of the instrument dial is a first defect level; when the quality inspection index of the image to be analyzed is greater than or equal to the first threshold and less than a preset second threshold, the glass quality inspection result of the instrument dial is a second defect level; when the quality inspection index of the image to be analyzed is greater than or equal to the second threshold, the glass quality inspection result of the instrument dial is a third defect level.
[0058] In this embodiment, the value of the first threshold is 0.6, and the value of the second threshold is 0.8, which can be set by the implementer according to the specific implementation scenario.
[0059] When the quality inspection index of the image to be analyzed is less than 0.6, it means that there is a relatively slight scratch defect on the surface of the instrument dial glass corresponding to the image to be analyzed, or there is no scratch defect. The relevant staff can perform relevant repair work on the instrument dial glass of the first defect level so as not to affect the use of the instrument dial.
[0060] When the quality inspection index of the image to be analyzed is greater than or equal to 0.6 and less than 0.8, it means that a moderate scratch defect occurs on the instrument dial glass surface corresponding to the image to be analyzed. Relevant staff need to conduct targeted inspections on the instrument dial glass surfaces of the second defect level and repair the instrument dial glass surfaces that can be repaired.
[0061] When the quality inspection index of the image to be analyzed is greater than or equal to 0.8, it means that there is a serious scratch defect on the glass surface of the instrument dial corresponding to the image to be analyzed. The relevant staff needs to take relevant measures to deal with the instrument dial of the third defect level, such as discarding it.
[0062] 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 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 glass quality detection method for instrument dials, characterized in that: The method comprises the following steps: The visible light image of the instrument dial glass surface is recorded as the image to be analyzed, straight line detection is performed on the image to be analyzed to obtain the line segments to be analyzed, and the image to be analyzed is divided into block areas of fixed size; A first coefficient is obtained according to the number of line segments to be analyzed contained in the block area, a second coefficient is obtained according to the distance between the line segments to be analyzed contained in the block area, a third coefficient is obtained according to the length of the line segments to be analyzed contained in the block area, and a defect degree index of the block area is obtained according to the first coefficient, the second coefficient and the third coefficient; According to the defect degree index of the block area, the defect anomaly matrix of the image to be analyzed is obtained, and the defect anomaly matrix is decomposed to obtain the eigenvalue; according to the eigenvalue and the number of eigenvalues, the quality inspection index of the image to be analyzed is obtained; according to the quality inspection index, the glass quality inspection result of the instrument dial is obtained; The method for obtaining the first coefficient is specifically as follows: For any block area, the ratio between the total number of pixel points on all the line segments to be analyzed in the block area and the total number of all pixel points in the block area is used as the first coefficient; The method for obtaining the second coefficient is specifically as follows: For any block area, when the number of line segments to be analyzed in the block area is less than a preset number threshold, the value of the second coefficient of the block area is set to the preset first value; when the number of line segments to be analyzed in the block area is greater than or equal to the preset number threshold, the distance between the midpoints of any two line segments to be analyzed is calculated and recorded as the characteristic distance, and the average of the characteristic distances corresponding to all any two line segments to be analyzed in the block area is taken as the second coefficient; The method for obtaining the third coefficient is specifically as follows: For any block area, the average length of all line segments to be analyzed is taken as the third coefficient.
2. A glass quality inspection method for instrument dials according to claim 1, characterized in that: The quality detection index of the image to be analyzed obtained according to the eigenvalue and the number of eigenvalues is specifically: The feature weight of the eigenvalue is obtained according to the number of any eigenvalue of the abnormal feature matrix and the number of all eigenvalues, and the quality detection index of the image to be analyzed is obtained according to the difference between the eigenvalue and the mean of all eigenvalues and the feature weight.
3. A glass quality detection method for instrument dials according to claim 2, characterized in that: The calculation formula of the quality inspection index is specifically: in, represents the quality inspection index of the image to be analyzed, n represents the total number of eigenvalues of the defect anomaly matrix of the image to be analyzed, represents the value of the tth eigenvalue, The eigenvalue is The number of eigenvalues of represents the mean of all eigenvalues, is the feature weight.
4. The glass quality detection method for instrument dials according to claim 1 is characterized in that: The method for obtaining the defect degree index is specifically as follows: For any block area, the product of the first coefficient and the third coefficient is calculated, and the ratio of the product to the second coefficient is used as the defect degree indicator.
5. The glass quality inspection method for instrument dials according to claim 1, characterized in that: The defect anomaly matrix of the image to be analyzed obtained according to the defect degree index of the block area is specifically: The pixel values of the pixels are assigned using the defect degree index of the block area in the image to be analyzed to obtain the defect feature image, the image matrix of the defect feature image and its transposed matrix are obtained, and the outer product of the image matrix and its transposed matrix is used as the defect anomaly matrix of the image to be analyzed.
6. The glass quality inspection method for instrument dials according to claim 1, characterized in that: The glass quality test results of the instrument dial obtained according to the quality test indicators are specifically: When the quality inspection index of the image to be analyzed is less than a preset first threshold, the glass quality inspection result of the instrument dial is a first defect level; when the quality inspection index of the image to be analyzed is greater than or equal to the first threshold and less than a preset second threshold, the glass quality inspection result of the instrument dial is a second defect level; when the quality inspection index of the image to be analyzed is greater than or equal to the second threshold, the glass quality inspection result of the instrument dial is a third defect level.
Citation Information
Patent Citations
Intelligent factory production online monitoring and analysis system based on machine vision
CN114648521A
Defect identification method for on-line energy-taking movable intelligent damper
CN115984255A
Indoor mobile robot glass detection and map updating method based on depth image restoration
WO2023138163A1
