Mobile phone back plate processing quality detection method and system based on machine vision
By employing a machine vision-based multi-polarization component detection method, combined with multi-scale filtering and manifold projection, the problem of misjudging minute scratches on the back panel of mobile phones in traditional visual inspection methods has been solved, achieving high-precision quality inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DONGGUAN ZHENGWEI PRECISION PLASTIC CO LTD
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-19
Smart Images

Figure CN122243884A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual inspection technology. More specifically, this invention relates to a method and system for inspecting the processing quality of mobile phone back panels based on machine vision. Background Technology
[0002] In the field of precision electronics manufacturing, the processing quality of mobile phone back panels is a core element determining the product's appearance and protective performance. Producing high-quality mobile phone back panels typically involves multiple high-precision processes, such as injection molding, CNC precision engraving of holes, physical grinding, and surface PVD vacuum coating. During these complex processes, due to factors such as tool wear, machining stress, and fixture handling, minor scratches, chipping, or dents inevitably occur on the back panel surface. Faced with such a high-intensity precision machining production line, it is necessary to inspect the processing quality to effectively ensure the product's yield rate.
[0003] With the development of industrial automation, production lines have begun to introduce industrial cameras in conjunction with standard vision operators for automated inspection. Traditional vision inspection algorithms are mainly based on the gray-scale distribution of image pixels. The core of these algorithms is to capture the location of drastic changes in gray-scale values by relying on the significant contrast difference between defects and the surrounding normal background, thereby extracting and locating suspected defect areas.
[0004] However, since the back panel often uses high-gloss mirror or composite material processes, its surface has strong non-uniform reflective characteristics, and there are micron-level processing tolerances in the precision-carved holes and edges. This causes complex convergence of light under light source illumination, producing bright and dark diffraction light stripes that are extremely similar to real tiny scratches. This interference from geometric pseudo-defects makes it impossible for traditional visual inspection to accurately distinguish between normal process physical diffraction and abnormal processing scratch defects from single-dimensional grayscale features. This leads to over-inspection in areas such as precision-carved holes and button slots, reducing the accuracy of quality inspection on precision machining production lines. Summary of the Invention
[0005] To address the technical problem in the precision machining of mobile phone back panels where the complex engraving structure leads to a high degree of coupling between physical diffraction interference and minute scratch features, making it difficult for traditional visual inspection to remove geometric noise and resulting in low inspection accuracy, this invention provides solutions in the following aspects.
[0006] In a first aspect, the present invention provides a machine vision-based method for inspecting the processing quality of a mobile phone back panel, comprising: acquiring four grayscale images of polarization components of the current mobile phone back panel in four polarization directions; for each pixel: calculating the degree of linear polarization based on the grayscale values of the pixel in the four polarization directions, and constructing a global polarization map based on the mean of the grayscale values; calculating the polarization abrupt change intensity of the pixel according to the first-order rate of change of the degree of linear polarization in the horizontal and vertical directions; performing multi-scale filtering on the global polarization map to obtain the average phase angle of the pixel, and the amplitude and phase angle at each scale; and using the amplitude to measure the phase angle at the same scale. The structural stability of a pixel is obtained by weighting the difference with the average phase angle; a feature vector of the pixel is constructed based on the polarization abrupt change intensity and structural stability; a feature matrix is constructed using the feature vectors of all neighboring pixels within the pixel's neighborhood to obtain the projection reconstruction component; the defect response value of the pixel is calculated based on the distance of the pixel's feature vector from the projection reconstruction component, the polarization abrupt change intensity, and the structural stability; all pixels with defect response values greater than a set judgment threshold are clustered to obtain all clusters; if the coverage area of any cluster is greater than the preset process tolerance area, the current mobile phone back panel quality is determined to be substandard.
[0007] This invention captures the depolarization effect caused by micro-processing damage by collecting multiple polarization components and calculating the intensity of polarization abrupt changes. At the same time, it combines multi-scale filtering to extract phase information to evaluate the structural stability of normal geometric edges. Based on this, the polarization abrupt change intensity and structural stability are fused to construct a manifold feature space. The defect response value is calculated by tangent space projection. This method not only captures the polarization distortion at the defect, but also effectively suppresses the structural interference caused by the normal process contour, thereby removing geometric pseudo-defects and achieving highly sensitive capture of weak physical scratches, improving detection accuracy and production line yield.
[0008] Preferably, the calculation of linear polarization degree includes: calculating the sum of squares of the grayscale differences of a pixel in two pairs of mutually orthogonal directions among the four polarization directions, taking the square root of the sum of squares as the linear polarization energy component of the pixel, where the linear polarization degree is equal to the ratio of the energy component to the total reflected energy of the pixel, and the total reflected energy is equal to the ratio of the grayscale differences of the pixel in two pairs of mutually orthogonal directions among the four polarization directions. and The sum of gray values in the two polarization directions.
[0009] Preferably, the polarization abrupt change intensity of the pixel satisfies the expression: In the formula, For the first The intensity of polarization abrupt change at each pixel; For the first The degree of linear polarization of each pixel; , For the first The first-order rate of change of the linear polarization degree of each pixel in the horizontal and vertical directions; This is the standard normalization function.
[0010] This invention measures the degree of depolarization abrupt change of reflected light under spatial anisotropy by calculating the first-order spatial derivatives of linear polarization in the horizontal and vertical directions and the gradient magnitude. This breaks through the masking of physical microscopic damage by traditional high-intensity reflection and provides core physical characteristics for subsequent stripping of geometric reflections.
[0011] Preferably, obtaining the average phase angle of the pixel, and the amplitude and phase angle at each scale, includes: performing a Fourier transform on the global polarization map; convolving the frequency domain signal with a set of Log-Gabor filters at different scales in the frequency domain; returning to the spatial domain through an inverse Fourier transform; obtaining the complex response value of the pixel at each scale; using the magnitude of the complex response value as the amplitude; and using the argument of the complex response value as the phase angle; and performing vector summation on the complex response values of the pixel at all scales, calculating the argument of the resultant vector as the average phase angle.
[0012] This invention, by performing convolution processing on the global polarization map, can adaptively cover a wide range of features, from micron-level filamentary scratches to millimeter-level precision-carved hole edges, and resolve the frequency domain structure information of the mobile phone back panel surface in a multi-scale space.
[0013] Preferably, the structural stability of the pixel satisfies the expression: In the formula, For the first Structural stability of each pixel; For the first The pixel at the th point Amplitude and phase angle at various scales; For the first The average phase angle of each pixel; The minimum positive number is preset. To take the absolute value; It is a non-negative truncation operator; It is a cosine function; It is a sine function; The index value and total number of the scale; This is the standard normalization function.
[0014] This invention utilizes cosine gain and sine penalty term to evaluate the degree of synchronization between the phase angle at each scale and the average phase angle, so that the geometric edges such as normal fine-carved holes exhibit a high stability response, and realizes the extraction of pure structural features of the physical order of the backplate.
[0015] Preferably, constructing the feature vector of a pixel includes: the feature vector of the pixel. , , For the first The intensity of polarization abrupt changes and structural stability of each pixel This is the transpose of the matrix.
[0016] Preferably, obtaining the projection reconstruction components includes: performing singular value decomposition on the feature matrix and extracting the left singular vectors corresponding to the singular values of a preset dimension to form the basis matrix of the tangent space of the local manifold. Calculate the projection reconstruction components , , For the first Feature vector of each pixel This is the transpose of the matrix.
[0017] Preferably, the defect response value of the pixel satisfies the expression: In the formula, For the first Defect response value of each pixel; For the first Feature vector of each pixel; For the first Projection reconstruction components of each pixel; For the first The intensity of polarization abrupt changes and structural stability of each pixel; It is the Euclidean norm; It is a natural exponential function.
[0018] This invention constructs a defect response value calculation model based on manifold projection and exponential amplification. It uses the tangent space projection residual to remove the normal low-dimensional manifold background and introduces a dynamic enhancement factor to exponentially couple and amplify the drastic polarization abrupt change and the low structural stability. This nonlinear collaborative operation of physical and geometric dimensions strongly suppresses the structural interference at the edge of the normal fine carving process.
[0019] Preferably, the coverage area of any cluster is equal to the total number of pixels within the cluster, and the clustering algorithm is the DBSCAN algorithm.
[0020] Secondly, the present invention provides a machine vision-based mobile phone back panel processing quality inspection system, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned machine vision-based mobile phone back panel processing quality inspection method is implemented.
[0021] By adopting the above technical solution, the above-mentioned machine vision-based mobile phone back panel processing quality inspection method is generated into a computer program and stored in a memory so that it can be loaded and executed by the processor. In this way, a terminal device can be made based on the memory and the processor, which is convenient to use.
[0022] The beneficial effects of this invention are as follows: This invention is based on polarization multidimensional imaging. It captures the physical depolarization abrupt change of micro-damage through linear polarization gradient, evaluates the structural stability of geometric contours using multi-scale phase angles, and further extracts residuals by combining local manifold projection. It forms a complete closed loop from feature decoupling to anomalous response amplification, and eliminates the geometric optical interference interference caused by complex fine-carved structures. It solves the defect of traditional gray-scale extremum method that easily misjudges physical diffraction light stripes as scratches, and significantly improves the accuracy of detection of highly reflective complex curved surfaces and the stability of automated production lines. Attached Figure Description
[0023] Figure 1 This is a flowchart illustrating the machine vision-based mobile phone back panel processing quality inspection method of the present invention; Figure 2 This is an illustration of the detection results after processing by traditional vision algorithms; Figure 3 This is a schematic illustration of the detection effect after processing by the algorithm of the present invention. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0026] This invention discloses a machine vision-based method for inspecting the processing quality of mobile phone back panels, referring to... Figure 1 This includes steps S1-S5: S1. Collect four grayscale images of polarization components on the back panel of the current mobile phone in four polarization directions.
[0027] It should be noted that after precision machining, the physical flatness of the mobile phone back panel directly affects the polarization state of light. Traditional single-exposure grayscale images cannot distinguish between highlights caused by geometric transitions and abnormal scattering caused by surface roughness. Therefore, it is necessary to obtain the vector information of the surface from the physical scale of polarization phase. By combining time-division modulated illumination with amplitude-division polarization imaging, it is possible to decouple light intensity, polarization degree, and polarization angle, thereby providing a multi-dimensional data source for subsequent detection of sub-pixel-level processing damage.
[0028] Specifically, an integrated polarization imaging module is vertically installed above the mobile phone back panel inspection production line. This module includes a ring-shaped LED array light source with linear polarization characteristics and an amplitude-splitting polarization industrial camera. The axis of the linear polarizer of the light source is adjusted so that the incident light illuminates the back panel surface with a specific initial polarization state. Using the micro-polarization array built into the camera, four nano-polarization gratings with polarization directions are covered in front of the sensor's photosensitive unit. When the camera captures the current mobile phone back panel, the sensor automatically separates the reflected light at the same spatial position into the corresponding four polarization pixel units, extracts the sub-pixels with the corresponding polarization state, and reconstructs four polarization component grayscale images using bilinear interpolation.
[0029] The four polarization directions refer to The resulting grayscale image of the polarization components is In this embodiment of the invention, the camera exposure time is set to 10ms and the acquisition frequency is 20fps. The implementer can adjust these settings according to the urgency of production.
[0030] At this point, the multi-phase polarization data of the current mobile phone back panel has been obtained.
[0031] S2. Calculate the degree of linear polarization based on the gray values of the pixel in the four polarization directions, and calculate the polarization abrupt change intensity of the pixel according to the first-order change rate of the degree of linear polarization in the horizontal and vertical directions.
[0032] It should be noted that normal physical surfaces treated with polishing or PVD coating have a relatively stable modulation effect on polarized light. However, tiny scratches, chipping, or indentations generated during processing can cause sub-pixel-level distortions in the local surface morphology. This microscopic geometric abrupt change can destroy the coherence of light reflection and cause a significant depolarization effect, resulting in drastic fluctuations in the polarization state of the reflected light at the defect edge. Therefore, by calculating the spatial gradient magnitude of the linear polarization degree of each pixel to reflect the intensity of the polarization state abrupt change, we can capture the microscopic processing damage that is masked by high reflectivity, providing a core feature basis for distinguishing geometric reflections from physical defects.
[0033] Specifically, based on the four polarization component grayscale images of the current mobile phone back panel, the grayscale values of any pixel in the four polarization directions are extracted. Based on the Stokes vector theory in polarization optics, the sum of squares of the grayscale differences in two pairs of mutually orthogonal directions in the four polarization directions is calculated. The square root of this sum is taken as the linear polarization energy component of the pixel. The ratio of this energy component to the total reflected energy of the pixel is then calculated to obtain the degree of linear polarization of the pixel. The total reflected energy is equal to the grayscale values of the pixel in the four polarization directions. and The sum of the corresponding gray values in the two polarization directions; considering that there may be cases where the pixel is in an absolutely pure black area or an invalid edge, the total reflected energy is 0, which makes it impossible to calculate the degree of linear polarization. Therefore, if the total reflected energy is 0, the degree of linear polarization is set to 0.
[0034] The polarization abrupt change intensity of any pixel is calculated based on the first-order rate of change of its linear polarization degree in the horizontal and vertical directions. This polarization abrupt change intensity satisfies the following expression:
[0035] In the formula, For the first The intensity of polarization abrupt change at each pixel; For the first The degree of linear polarization of each pixel; , For the first The first-order rate of change of the linear polarization degree of each pixel in the horizontal and vertical directions; This is the standard normalization function.
[0036] in, Reflects the first The proportion of the linearly polarized component of the reflected light from the nth pixel to the total reflected intensity; the larger this value, the stronger the linear polarization component of the reflected light from the nth pixel. The smoother the physical structure of the surface at each pixel location, the stronger the consistency of reflection; conversely, if this value decreases significantly, it means that the reflected light has undergone significant scattering or depolarization at that point. Reflects the first The rate of change of the linear polarization degree of each pixel in the horizontal spatial dimension can capture the phase fluctuation when crossing the defect boundary laterally. Reflects the first The rate of change of the linear polarization degree of each pixel in the vertical spatial dimension can capture the longitudinal polarization state evolution characteristics. This value combines changes in two dimensions, reflecting the total abrupt change intensity of the polarization state under spatial anisotropy. A larger value indicates a stronger abrupt change in the polarization state. The microscopic physical morphology at the nth pixel undergoes a more drastic change relative to the surrounding area, meaning that the nth pixel... The possibility of physical processing damage such as scratches and chipping on individual pixels is extremely high.
[0037] At this point, the polarization abrupt change intensity of each pixel has been obtained.
[0038] S3. Perform multi-scale filtering on the constructed polarization global map to obtain the average phase angle of the pixel, as well as the amplitude and phase angle at each scale, and calculate the structural stability of the pixel.
[0039] It should be noted that geometric features such as precision-carved holes, screw and button slots, and brand logos appear as extremely strong edge signals in visual imaging, which are easily misjudged as chipped edges or cracks. However, these geometric structures have an essential characteristic in the frequency domain: the local phases of their different frequency components tend to be consistent at the edge positions, exhibiting high structural stability. In contrast, randomly generated processing scratches or injection molding flow marks have a chaotic and discontinuous phase distribution on a spatial scale. Therefore, by extracting the structural stability characteristics of the phase, false detections caused by diffraction streaks can be effectively suppressed.
[0040] Specifically, the amplitude and phase angle of any pixel at each scale are obtained. The specific acquisition method is as follows: calculate the mean of the gray values corresponding to each pixel in the four polarization directions, reconstruct the polarization global map of the current mobile phone back panel, perform Fourier transform on the global map, construct a set of Log-Gabor filter banks at different scales in the frequency domain, convolve the frequency domain signal of the global map with the filter banks, and return to the spatial domain through inverse Fourier transform to obtain the complex response value of each pixel at each scale; use the magnitude of the complex response value as the amplitude, and the argument of the complex response value as the phase angle. At the same time, the complex response values of the pixel at all scales are vector summed, and the argument of the resultant vector is calculated as the average phase angle.
[0041] The structural stability of any pixel is calculated based on its average phase angle, amplitude, and phase angle at various scales; the structural stability satisfies the expression:
[0042] In the formula, For the first Structural stability of each pixel; For the first The pixel at the th point Amplitude at various scales; For the first Pixels in Phase angle at various scales; For the first The average phase angle of each pixel; To pre-determine a very small positive number, and to prevent the denominator from being zero, take... ; To take the absolute value; It is a non-negative truncation operator; It is a cosine function; It is a sine function; The index value and total number of the scale; This is the standard normalization function.
[0043] in, Reflects the first The pixel at the th point The phase angle at the first scale and the first The alignment degree of the average phase angle of each pixel is determined by the phase synchronization of each scale. When the phase is highly synchronized, the cosine term tends to 1 and the sine penalty term tends to 0, making the alignment degree close to 1. However, when the phase angle deviation exceeds... When the penalty force of the sine term exceeds the gain of the cosine term, the calculation result of the phase alignment and penalty term will rapidly decay to a negative value. By using the amplitude at the corresponding scale to weight the degree of phase alignment and introducing a non-negative truncation operator, it is ensured that only the energy of positive alignment can contribute to the structural stability, while the negative response of phase disorder is directly reduced to zero, thereby suppressing background interference and ensuring that the significant geometric edges of high energy dominate the structural stability judgment. The total amplitude is introduced as the denominator to eliminate the contrast fluctuation of the mobile phone back panel caused by different coatings or illumination, and realize the pure structural feature extraction of the physical order of the back panel. The larger the value, the more significant the effect. The greater the probability that a pixel belongs to a geometric edge or finely sculpted outline on the back of the phone; The smaller the value, the greater the probability that it belongs to an unstructured region.
[0044] It should be added that the selection of the number of scales determines the feature frequency bandwidth covered by the algorithm. If the value is too large, it is easy to introduce too much high-frequency noise to interfere with the structural judgment. If the value is too small, it is difficult to cover the full-scale features from fine scratches to coarse fine-carved edges, resulting in insufficient robustness of structural stability judgment. Therefore, the value range of the number of scales is [3,6]. In this embodiment of the invention, it is set to 5 to ensure that at a 12-megapixel imaging resolution, it can completely cover the structural features of the mobile phone back panel from micron-level filamentary scratches to millimeter-level fine-carved hole edges. Implementers can adjust it based on the imaging performance of the equipment.
[0045] At this point, the structural stability of each pixel has been obtained.
[0046] S4. Construct the feature vector of the pixel and obtain the projection reconstruction component; calculate the defect response value of the pixel based on the distance of the feature vector of the pixel from the projection reconstruction component, the intensity of polarization change and structural stability.
[0047] It should be noted that normal geometric features, such as regular finely carved holes and smooth curved edges, follow a continuous and smooth law in their physical polarization response and phase structure in local space, and are mapped to a low-dimensional manifold in feature space. However, randomly generated processing defects such as scratches and indentations break this inherent physical and geometric relationship, and their feature points are forced to deviate from the normal manifold. Therefore, by using local tangent space projection to extract evolutionary residuals, it is possible to peel off the strongly structured background from the nonlinear feature coupling, thereby improving the accuracy of subsequent defect feature identification.
[0048] Specifically, the projection reconstruction component of any pixel is obtained, and the methods include: constructing a feature vector based on the polarization abrupt change intensity and structural stability of any pixel. , ,in For the first The intensity of polarization abrupt changes and structural stability of each pixel The matrix is transposed; the feature vectors of all pixels in the eight neighborhood of the given pixel are obtained to construct a feature matrix, and singular value decomposition is performed on the feature matrix to extract the left singular vectors corresponding to the singular values of a preset dimension, forming the basis matrix of the tangent space of the local manifold. The feature vector of the pixel is projected onto the tangent space using the basis matrix, and the projection reconstruction component is calculated. ,in For the first The basis matrix of the local manifold tangent space of n pixels and the transpose of the basis matrix of the local manifold tangent space.
[0049] It should be added that the preset dimension is used to control the depth of the model's extraction of background features. The empirical value is 1 or 2. In the current scenario, if the value is large, the manifold will contain too many feature variations, causing small scratches to be mistaken for the background. Therefore, in this embodiment of the invention, the value is 1 to ensure that the algorithm can determine the linearly distributed geometric features as the manifold background and maximize the highlighting of nonlinear defects.
[0050] The defect response value of any pixel is calculated based on the distance of its feature vector from the projected reconstruction component, the intensity of the polarization abrupt change, and the structural stability; the defect response value satisfies the expression:
[0051] In the formula, For the first Defect response value of each pixel; For the first Feature vector of each pixel; For the first Projection reconstruction components of each pixel; For the first The intensity of polarization abrupt changes and structural stability of each pixel; It is the Euclidean norm; It is a natural exponential function.
[0052] in, Reflects the first If the feature vector of the i-th pixel deviates from the geometric distance of the local normal physical manifold, then... The first pixel belongs to the normal processed surface. Even if the feature value fluctuates at the finely carved edge, its vector will still fit the local tangent space constructed by the neighborhood data, and the projection residual magnitude will approach zero; while if the first pixel belongs to the normal processed surface, even if the feature value fluctuates at the finely carved edge, its vector will still fit the local tangent space constructed by the neighborhood data, and the projection residual magnitude will approach zero; Each pixel is a processing defect, and the coupling relationship between its polarization and phase angle will undergo nonlinear distortion, causing it to deviate significantly from the manifold surface. As a dynamic enhancement factor, it utilizes the opposition between defects and background in physical and geometric dimensions: for real micro scratches, the polarization abrupt change is drastic and lacks geometric structural stability, so the factor is exponentially amplified, significantly enhancing the response to weak defects; while for normal fine-carved edges, both polarization abrupt change and structural stability remain high, and the two cancel each other out, so the factor approaches a constant, thus mathematically achieving the suppression of normal geometric edges and the nonlinear amplification of real defects; in summary, the effective suppression of structure through manifold stripping means that the final defect response value can represent the true degree of anomaly on the backplate surface with high purity.
[0053] At this point, the defect response value for each pixel has been obtained.
[0054] S5. Cluster all pixels whose defect response value is greater than the set judgment threshold to obtain all clusters; if the coverage area of any cluster is greater than the preset process tolerance area, the quality of the current mobile phone back panel is determined to be substandard.
[0055] It should be noted that real processing defects will inevitably exhibit a certain degree of connectivity and area clustering in space. Therefore, clustering is used to filter out isolated interfering pixels, thereby ensuring that the detection results are accurate and reliable.
[0056] Specifically, a judgment threshold is set, and all pixels with defect response values greater than the judgment threshold are filtered out. All filtered pixels are clustered using the DBSCAN algorithm to obtain all clusters. The coverage area of each cluster is calculated, and the coverage area is equal to the total number of pixels in the cluster. Clusters with coverage areas greater than the preset process tolerance area are marked as substandard areas. If the current mobile phone back panel has substandard areas, a signal is immediately sent to the production line controller to drive the rejection mechanism to move the current mobile phone back panel into the scrap bin. If the current mobile phone back panel does not have substandard areas, the judgment result is qualified and it is released to the subsequent packaging process.
[0057] It should be added that the judgment threshold is used to strip away the underlying background noise and extract possible defect points. When the value is large, it will filter out weak scratch features, leading to an increased risk of missed detection. When the value is small, it will introduce a large number of background artifacts, thereby significantly increasing the burden of subsequent clustering calculations and the false detection rate. Therefore, the value range is [0.65, 0.85]. In this embodiment of the invention, it is set to 0.75 to ensure that the complete defect contour signal is preserved while effectively intercepting environmental noise. In this embodiment of the invention, the empirical value range of the two parameters of the DBSCAN algorithm is: the value range of the neighborhood radius is [2, 5], and the value range of the minimum number of points is [3, 8]. The DBSCAN algorithm clustering process is a well-known technology and will not be described in detail here. In addition, the process tolerance area is obtained according to the production requirements or the appearance inspection standards provided by the customer. Combined with the spatial resolution calibration coefficient of the vision inspection system, the millimeter-level tolerance limit at the physical level is proportionally converted into the corresponding pixel area parameter in the image space.
[0058] For example, Figure 2 The detection effect after processing by traditional visual algorithms is that, due to the complex geometric structure of the back panel of the mobile phone, such as the camera hole and edge seam, the traditional algorithm is filled with a large number of strong interference signals caused by geometric edges in addition to some real scratch signals. While amplifying the scratches, it also mistakenly amplifies all normal process contours, causing minor defects to be completely masked by structural noise, resulting in serious false alarms. Figure 3 The image shows the detection effect after processing by the algorithm of this invention. The response values of the background and normal geometric structure areas are greatly suppressed, indicating that normal geometric contours such as holes and seams have been completely stripped and suppressed by the algorithm. At the same time, the image clearly shows the residual response connected regions with high brightness features. These highly significant regions accurately correspond to the extremely weak processing scratches in the original image. Compared with traditional methods, this invention has stronger structural noise suppression capabilities and accurate capture capabilities of weak defects, significantly improving the accuracy of detection of highly reflective complex curved surfaces.
[0059] This invention also discloses a machine vision-based mobile phone back panel processing quality inspection system, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the machine vision-based mobile phone back panel processing quality inspection method according to this invention is implemented.
[0060] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
Claims
1. A machine vision-based method for inspecting the processing quality of mobile phone back panels, characterized in that, include: Collect four grayscale images of polarization components on the back panel of the current mobile phone in four polarization directions; For each pixel: calculate the degree of linear polarization based on the gray values of the pixel in the four polarization directions, and construct a global polarization map based on the mean of the gray values; calculate the polarization abrupt change intensity of the pixel based on the first-order change rate of the degree of linear polarization in the horizontal and vertical directions; Multi-scale filtering is performed on the polarization global image to obtain the average phase angle of the pixel, as well as the amplitude and phase angle at each scale; the difference between the phase angle and the average phase angle at the same scale is weighted using the amplitude to obtain the structural stability of the pixel. The feature vector of the pixel is constructed based on the polarization abrupt change intensity and structural stability; a feature matrix is constructed using the feature vectors of all neighboring pixels within the neighborhood of the pixel to obtain the projection reconstruction component; the defect response value of the pixel is calculated based on the distance of the pixel's feature vector from the projection reconstruction component, the polarization abrupt change intensity, and the structural stability. All pixels with defect response values greater than a set judgment threshold are clustered to obtain all clusters; if the coverage area of any cluster is greater than the preset process tolerance area, the current mobile phone back panel is judged to be substandard.
2. The method for inspecting the processing quality of mobile phone back panels based on machine vision according to claim 1, characterized in that, The calculation of the degree of linear polarization includes: Calculate the sum of squares of the grayscale differences of a pixel in two pairs of mutually orthogonal directions among the four polarization directions. Take the square root of this sum as the linear polarization energy component of the pixel. The degree of linear polarization is equal to the ratio of this energy component to the total reflected energy of the pixel. The total reflected energy is equal to the grayscale difference of the pixel in... and The sum of gray values in the two polarization directions.
3. The method for inspecting the processing quality of mobile phone back panels based on machine vision according to claim 1, characterized in that, The polarization abruptness intensity of the pixel satisfies the expression: ; In the formula, For the first The intensity of polarization abrupt change at each pixel; For the first The degree of linear polarization of each pixel; , For the first The first-order rate of change of the linear polarization degree of each pixel in the horizontal and vertical directions; This is the standard normalization function.
4. The method for inspecting the processing quality of mobile phone back panels based on machine vision according to claim 1, characterized in that, The acquisition of the average phase angle of the pixel, and the amplitude and phase angle at each scale, includes: A Fourier transform is performed on the global polarization map. In the frequency domain, a set of Log-Gabor filters at different scales are convolved with the frequency domain signal. The result is then returned to the spatial domain via an inverse Fourier transform to obtain the complex response value of each pixel at each scale. The magnitude of the complex response value is used as the amplitude, and the argument of the complex response value is used as the phase angle. Finally, the complex response values of each pixel at all scales are vector-summed, and the argument of the resultant vector is used as the average phase angle.
5. The method for inspecting the processing quality of mobile phone back panels based on machine vision according to claim 1, characterized in that, The structural stability of the pixel satisfies the expression: ; In the formula, For the first Structural stability of each pixel; For the first The pixel at the th point Amplitude and phase angle at various scales; For the first The average phase angle of each pixel; The minimum positive number is preset. To take the absolute value; It is a non-negative truncation operator; It is a cosine function; It is a sine function; The index value and total number of the scale; This is the standard normalization function.
6. The method for inspecting the processing quality of mobile phone back panels based on machine vision according to claim 1, characterized in that, The construction of the feature vector of the pixel includes: Feature vector of a pixel , , For the first The intensity of polarization abrupt changes and structural stability of each pixel This is the transpose of the matrix.
7. The method for inspecting the processing quality of mobile phone back panels based on machine vision according to claim 1, characterized in that, The acquisition of the projection reconstruction components includes: Perform singular value decomposition on the feature matrix and extract the left singular vectors corresponding to the singular values of a preset dimension to form the basis matrix of the tangent space of the local manifold. Calculate the projection reconstruction components , , For the first Feature vector of each pixel This is the transpose of the matrix.
8. The method for inspecting the processing quality of mobile phone back panels based on machine vision according to claim 1, characterized in that, The defect response value of the pixel satisfies the expression: ; In the formula, For the first Defect response value of each pixel; For the first Feature vector of each pixel; For the first Projection reconstruction components of each pixel; For the first The intensity of polarization abrupt changes and structural stability of each pixel; It is the Euclidean norm; It is a natural exponential function.
9. The method for inspecting the processing quality of mobile phone back panels based on machine vision according to claim 1, characterized in that, The coverage area of any cluster is equal to the total number of pixels within the cluster, and the clustering algorithm is the DBSCAN algorithm.
10. A machine vision-based mobile phone back panel processing quality inspection system, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement the machine vision-based mobile phone back panel processing quality inspection method according to any one of claims 1-9.