Anodized surface color difference detection system for aluminum alloy mobile phone outer frame
By constructing a curvature-weighted chromaticity sequence through path planning and spectral acquisition modules, and combining directional consistency analysis and threshold adaptive correction, the problem of color difference detection in the transition area of the small curved surface of the aluminum alloy mobile phone frame was solved, achieving high-precision and positionable color difference detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG MAITAO TECHNOLOGY CO LTD
- Filing Date
- 2026-03-27
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies struggle to reliably detect the extremely low contrast and sub-millimeter color difference in the transition area of small curved surfaces on aluminum alloy mobile phone frames, resulting in poor high-end appearance and a lack of quantitative criteria related to oxidation parameters.
The path planning module acquires three-dimensional topographic data, and the spectral acquisition module performs directional multi-source scanning to construct a curvature-weighted chromaticity sequence. The directional consistency analysis is then performed, and the local color difference index is output through threshold adaptive correction to achieve precise positioning of micro-area color differences.
It significantly improves the detection accuracy of small, low-contrast, and highly directional color differences, reduces the false negative rate, and has the ability to locate and quantify, making it suitable for fine appearance inspection of complex curved surface transition areas.
Smart Images

Figure CN122150152A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile phone frame inspection technology, specifically to a color difference detection system for the anodized surface of an aluminum alloy mobile phone frame. Background Technology
[0002] During the anodizing process of aluminum alloy mobile phone frames, due to differences in extrusion texture, grain orientation, and pretreatment micro-area activation, extremely low contrast, sub-millimeter-level color difference bands are easily generated in the small curved transition areas (such as the antenna breakpoint neighborhood and chamfered R-corners) of the same frame in the same batch. This type of color difference is masked in conventional whole-surface average colorimetric testing, but it will be amplified under strong side light or when spliced with glass / middle frame after assembly, resulting in poor high-end appearance. Existing methods mostly rely on global sampling or manual visual inspection, which makes it difficult to reliably capture this type of "small and hidden, highly directional" local color difference, and lacks quantitative criteria related to oxidation parameters. Summary of the Invention
[0003] The purpose of this invention is to provide a color difference detection system for the anodized surface of aluminum alloy mobile phone frames, in order to overcome the shortcomings of the prior art.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a color difference detection system for the anodized surface of an aluminum alloy mobile phone frame, comprising:
[0005] Path planning module: acquires the 3D topographic data of the outer frame to be measured and the design reference plane, extracts the curvature distribution parameter K including chamfers and antenna breaks, and establishes the corresponding local observation path set P;
[0006] Spectral acquisition module: Based on P, the outer frame is scanned by multiple light sources to obtain the multi-angle reflectance spectral sequence R on each path, and the spectral gradient feature G of the corresponding path is calculated from R;
[0007] Curvature-weighted chromaticity modeling module: Based on K and G, a curvature-weighted local chromaticity sequence C is constructed, where C is obtained by mapping R to the color space and spatially rearranging it according to the path to form a chromaticity field matrix M;
[0008] Directional Consistency Analysis Module: Performs directional consistency analysis on M to obtain the main direction vector D of each path and the first-order change in color difference ΔC along D, and generates a set of candidate abnormal segments E;
[0009] Threshold adaptive correction module: Combines K with E to perform threshold adaptive correction to obtain the corrected local color difference index L, where the threshold varies with curvature and reflectivity anisotropy;
[0010] Positioning output module: Matches L with preset process-related criteria and outputs the color difference judgment result of the outer frame on the corresponding path and its spatial position, which is used to indicate micro-area color difference defects.
[0011] Preferably, the extraction of curvature distribution parameters K, including chamfered areas and antenna breakpoints, specifically includes: performing full-size 3D reconstruction of the outer frame to be measured to obtain high-precision point cloud data, and performing coordinate registration based on the design model to determine a unified design reference surface; performing surface fitting and second-order differential calculation on the point cloud data to obtain continuous curvature distribution parameters including chamfered areas and antenna breakpoint areas; identifying curvature abrupt change areas and curvature transition areas based on the continuous curvature distribution parameters, and generating initial path lines consistent with the surface normal in the corresponding areas; performing curvature weighted sampling and smoothing processing on the initial path lines to form a set of local observation paths distributed along the main curvature direction.
[0012] Preferably, obtaining the multi-angle reflectance spectral sequence R on each path and calculating the spectral gradient feature G of the corresponding path from R specifically includes: based on the set of local observation paths, controlling the attitude adjustment of the outer frame to be measured relative to the multi-source array; sequentially triggering light sources with different incident directions and different wavelength combinations at each path position for illumination, and collecting the corresponding reflected light intensity data, constructing a multi-angle reflectance spectral sequence according to the path order; normalizing the multi-angle reflectance spectral sequence and arranging it according to the incident angle order to form a standard spectral curve; performing differential calculation on the standard spectral curve along the incident angle direction to obtain the spectral change rate between adjacent angles, and accumulating the spectral change rate in the path dimension to obtain the spectral gradient feature of the corresponding path.
[0013] Preferably, the construction of the curvature-weighted local chromaticity sequence C based on K and G specifically includes: converting the multi-angle reflectance spectral sequence into corresponding tristimulus values through a preset color space mapping function, wherein the color space mapping function is constructed based on the standard light source spectral distribution and color matching function to obtain the initial chromaticity values of each path sampling point; and weighting and fusing the initial chromaticity values with the curvature distribution parameters and spectral gradient features of the corresponding sampling points to construct the curvature-weighted local chromaticity sequence C.
[0014] Preferably, the spatial rearrangement of the path to form the chromaticity field matrix M specifically includes: indexing the local chromaticity sequence according to the path order in the local observation path set, and establishing a two-dimensional coordinate mapping relationship based on the spatial adjacency relationship between the paths; and spatially rearranging the local chromaticity sequence according to the two-dimensional coordinate mapping relationship to form a chromaticity field matrix M that reflects the continuity of the chromaticity distribution on the outer frame surface.
[0015] Preferably, performing directional consistency analysis on M to obtain the principal directional vector D of each path and the first-order chromatic difference change ΔC along D specifically includes: constructing a structural tensor with curvature distribution parameters and accumulating directional responses in the directional enhancement space to determine the principal directional vector D of each path in the chromaticity field matrix, and calculating the first-order chromatic difference change ΔC along the principal directional vector D.
[0016] Preferably, a local neighborhood is constructed in the chromaticity field matrix with the sampling point as the center. The gradient of the chromaticity value in the neighborhood is calculated along the spatial coordinate direction, and the curvature distribution parameter of the corresponding sampling point is introduced to weight the gradient, thus constructing a curvature-weighted structure tensor. The structure tensor is decomposed into eigenvalues, and the eigenvector corresponding to the largest eigenvalue is extracted as the initial principal direction vector. The principal direction vector is then mapped to a direction lifting space that includes the directional angle dimension. The responses of each direction are accumulated and calculated in the direction lifting space. The optimal direction of consistency is determined by comparing the response intensity of different directions, thereby obtaining the principal direction vector of each path. The directional derivative of the chromaticity field matrix is calculated along the principal direction vector to obtain the first-order change in color difference ΔC.
[0017] Preferably, the step of combining curvature distribution parameters to perform threshold adaptive correction on the candidate anomaly segment set to obtain the corrected local color difference index specifically includes: First, performing joint normalization processing on the curvature distribution parameters and reflection anisotropy features corresponding to each sampling point in the candidate anomaly segment set, wherein the reflection anisotropy features are calculated by the standard deviation of the reflected light intensity difference under different incident angles; Second, constructing an adaptive threshold function based on the normalized curvature distribution parameters and reflection anisotropy features, wherein the adaptive threshold function adopts a weighted nonlinear combination form, and its output threshold increases with the increase of curvature and the enhancement of anisotropy; Then, comparing the first-order change of color difference of each sampling point in the candidate anomaly segment set with the corresponding adaptive threshold, suppressing sampling points below the threshold, and retaining and enhancing sampling points above the threshold; Finally, reorganizing the processed sampling points according to path continuity, and calculating the local color difference index of the corresponding path based on the cumulative change.
[0018] Preferably, the step of combining K with E to perform threshold adaptive correction to obtain the corrected local color difference index L specifically includes: performing joint normalization processing on the curvature distribution parameters and reflection anisotropy features corresponding to each sampling point in the candidate anomaly segment set; constructing an adaptive threshold function based on the normalized curvature distribution parameters and reflection anisotropy features; the adaptive threshold function adopts a weighted nonlinear combination form, comparing the first-order change of color difference of each sampling point in the candidate anomaly segment set with the corresponding adaptive threshold, suppressing sampling points below the threshold, and retaining and enhancing sampling points above the threshold; reorganizing the processed sampling points according to path continuity, and calculating the local color difference index L of the corresponding path based on the cumulative change.
[0019] Preferably, L is matched with preset process-related criteria to output the color difference judgment result of the outer frame on the corresponding path and its spatial position. Specifically, this includes: performing statistical analysis on the local color difference index corresponding to each path, extracting its mean, maximum value and distribution range, and constructing a multi-dimensional feature vector by combining the curvature distribution parameters and reflection anisotropy characteristics of the corresponding path; establishing a process-related criterion model based on historical process sample data, inputting the multi-dimensional feature vector of the path to be tested into the process-related criterion model for matching, and obtaining the color difference judgment result of the corresponding path; mapping the path judged as abnormal to the corresponding position on the outer frame surface according to the spatial coordinate information of the path in the three-dimensional morphology data, and outputting the spatial distribution result of micro-area color difference defects.
[0020] The technical effects and advantages provided by the present invention in the above technical solution are as follows:
[0021] 1. This invention constructs a structural tensor by introducing curvature distribution parameters into the chromaticity field matrix and performs directional consistency analysis in conjunction with the directional enhancement space. This transforms color difference detection from a traditional method based on comprehensive chromaticity amplitude to a method based on directional change characteristics. Compared to existing methods that rely solely on overall chromaticity differences, this invention effectively enhances the sensitivity to sub-millimeter-level, low-contrast, and directional micro-area color differences in chamfered regions and antenna breakpoint regions, thereby significantly improving detection accuracy and reducing the false negative rate. It is particularly suitable for refined appearance inspection of complex curved surface transition areas.
[0022] 2. This invention calculates the first-order change in color difference along the principal direction vector and constructs an adaptive threshold by combining curvature distribution parameters and reflection anisotropy characteristics, thus achieving differentiated judgment of regions with different surface structural characteristics. This method can suppress misjudgments of non-defect areas while ensuring detection stability, improving the robustness and consistency of detection results. Simultaneously, by outputting defect locations through path-level spatial mapping, it enables the localization and quantification of micro-area color difference defects, possessing significant engineering application value and guidance for process optimization. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0024] Figure 1 This is a flowchart of a color difference detection system module for anodized surfaces of aluminum alloy mobile phone frames according to the present invention.
[0025] Figure 2 This is a flowchart of the method for calculating the first-order change in color difference according to the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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 embodiments of the present invention, not all embodiments. 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.
[0027] For examples, please refer to Figure 1 and Figure 2 As shown in this embodiment, a color difference detection system for the anodized surface of an aluminum alloy mobile phone frame includes:
[0028] Path planning module: acquires the 3D topographic data of the outer frame to be measured and the design reference plane, extracts the curvature distribution parameter K including chamfers and antenna breaks, and establishes the corresponding local observation path set P.
[0029] In this embodiment, a method is provided to acquire the three-dimensional topographic data and design reference plane of the outer frame to be measured, and to extract the curvature distribution parameters including the chamfered region and the antenna breakpoint region to establish a set of local observation paths, specifically including the following steps:
[0030] First, the three-dimensional topographic data of the aluminum alloy mobile phone frame under test is acquired and its coordinates are aligned. Specifically, a structured light scanning device is used to sequentially project multiple sinusoidal fringe images with preset spatial frequencies onto the surface of the frame under test, with equal-interval phase offsets between each fringe image. The corresponding fringe deformation images are acquired by an image acquisition device, and the gray value sequence of each pixel in the multiple images is extracted. The wrapping phase value is calculated based on the gray value sequence. Further, based on the continuity of phase changes between adjacent pixels, the wrapping phase value is unfolded point by point to obtain a continuous phase distribution. According to the pre-calibrated spatial positional relationship between the projection device and the image acquisition device, a mapping relationship between the phase value and spatial coordinates is established, and the three-dimensional coordinates corresponding to each pixel are calculated based on the triangulation principle, thereby forming the original point cloud data.
[0031] After obtaining the original point cloud data, coordinate unification processing is performed. Specifically, the boundary contour features and assembly datum features of the outer frame to be measured are selected as initial corresponding features, and the initial pose is obtained by minimizing the distance error between corresponding features. Based on the initial pose, for each sampling point in the original point cloud data, the corresponding point with the smallest distance is searched in the point cloud of the design model to construct a set of corresponding point pairs. Based on the set of corresponding point pairs, the rotation transformation parameters and translation transformation parameters that minimize the sum of squared Euclidean distances between each pair of corresponding points are solved using the least squares method. The rotation transformation parameters and translation transformation parameters are applied to the original point cloud data, and the process of constructing corresponding point pairs and solving transformation parameters is repeated until the root mean square error change between two adjacent iterations is less than a preset convergence threshold, thereby obtaining three-dimensional topographic data in the same coordinate system as the design model, and the assembly datum plane in the design model is used as the design datum plane.
[0032] Curvature distribution parameters are calculated for the three-dimensional topography data. Specifically, a local neighborhood is constructed centered on each sampling point in the three-dimensional topography data. The local neighborhood is determined by a fixed search radius, which is 2 to 3 times the average spacing of the point cloud. A quadratic surface function is constructed within the local neighborhood, and the surface parameters are obtained by fitting the quadratic surface function using the least squares method. The first and second partial derivatives of the quadratic surface function are calculated to obtain the principal curvature values and Gaussian curvature values of the corresponding sampling points. The curvature values of each sampling point are spatially stitched together to form continuous curvature distribution parameters covering the chamfered region and the antenna breakpoint region.
[0033] Feature region identification and path generation are performed based on the curvature distribution parameters. Specifically, for adjacent sampling points, the ratio of their curvature difference to their spatial distance is calculated to obtain the curvature change rate; the curvature change rate threshold is set to... to When the rate of change of curvature is greater than When the curvature change rate is within a certain range, the corresponding region is defined as the curvature abrupt change region; when the curvature change rate is within a certain range... to When the curvature change is within the specified range, the corresponding region is defined as the curvature transition region. Within the curvature change region and the curvature transition region, adjacent sampling points are connected along the principal curvature direction to generate the initial path line, constrained by the local surface normal direction and the principal curvature direction.
[0034] The initial path line is optimized to form a set of local observation paths. Specifically, the initial path line is divided into equal arc length segments to obtain a discrete path point sequence; weights are assigned according to the curvature of each path point so that regions with larger curvature correspond to higher sampling densities, and the positions of the path points are adjusted based on the weights; on this basis, a cubic spline interpolation method is used to smoothly fit the path points to obtain a continuous and smooth path curve, ultimately forming a set of local observation paths that matches the curvature distribution parameters.
[0035] In this embodiment, the above steps realize the entire process of acquiring three-dimensional topography data, extracting curvature distribution parameters, and constructing paths, providing a unified spatial benchmark and path basis for subsequent color difference detection.
[0036] Spectral acquisition module: Based on P, the outer frame is scanned by multiple light sources to obtain the multi-angle reflectance spectral sequence R on each path, and the spectral gradient feature G of the corresponding path is calculated from R.
[0037] In this embodiment, the outer frame to be measured is scanned by directional multi-source light sources based on the local observation path set to obtain the multi-angle reflectance spectrum sequence on each path, and the spectral gradient characteristics of the corresponding path are calculated. Specifically, the steps include the following:
[0038] First, based on the set of local observation paths, the attitude of the frame under test is adjusted to match the path with the incident light direction. Specifically, the frame under test is fixed on an adjustable-angle rotating platform. Based on the spatial orientation information of each path in the set of local observation paths, the angle between the tangential direction of the path and the incident direction of the light source is calculated. The incident angle range is set to 15° to 75°, and a discrete incident angle sequence is generated in 5° increments. The rotating platform is controlled to gradually adjust the spatial attitude of the frame under test, ensuring that each path is in a preset observation position at each incident angle, thereby guaranteeing a consistent angular reference for subsequent data acquisition. After attitude alignment is completed, multi-source illumination and reflection data are acquired for each path. Specifically, multiple narrowband light sources are set up, with the center wavelength of each light source covering the visible light range of 400 nm to 700 nm, and the wavelength interval between adjacent light sources is set to 10 nm. At each incident angle, the light sources of each wavelength are sequentially triggered to illuminate the corresponding area of the path, and the reflected light intensity data is collected by a spectral response sensor. For each path, the reflected light intensity at different incident angles and wavelengths is arranged in a two-dimensional order of "incident angle - wavelength" to construct a multi-angle reflectance spectrum sequence for the corresponding path. The multi-angle reflectance spectrum sequence is then standardized. Specifically, the reflected light intensity of a reference whiteboard under the same incident angle and wavelength conditions is selected as a baseline value, and the reflected light intensity corresponding to the path is compared with the baseline value to obtain the normalized reflectance. The normalized reflectance is then smoothed using a sliding window averaging method, with the window length set to 3 to 5 sampling points. The processed data is then rearranged in ascending order of incident angle to form a continuous standard spectral curve.
[0039] Finally, the spectral gradient characteristics are calculated based on the standard spectral curve. Specifically, under a fixed wavelength condition, the normalized reflectance of adjacent sampling points is differentially calculated along the incident angle to obtain the first-order change in reflectance as a function of the incident angle; the first-order changes corresponding to all wavelengths are weighted and summed, with the weights determined based on the signal-to-noise ratio at each wavelength, which is calculated by the ratio of reflected light intensity to background noise; the weighted result is integrated and accumulated along the path to obtain the spectral gradient characteristics of that path, thereby achieving a quantitative characterization of minute color differences on the surface.
[0040] Curvature-weighted chromaticity modeling module: Based on K and G, a curvature-weighted local chromaticity sequence C is constructed, where C is obtained by mapping R to the color space and spatially rearranging it according to the path to form the chromaticity field matrix M.
[0041] In this embodiment, firstly, the multi-angle reflectance spectral sequence is converted into chromaticity values. Specifically, for each sampling point, the reflected light intensity data obtained under various incident angles and wavelengths are combined with the spectral power distribution function and color matching function of a preset standard light source to calculate the corresponding tristimulus values. The tristimulus values are obtained by weighted integration of the reflectance spectrum and the color matching function, wherein the integration is achieved by discrete summation, and the integration step size corresponds to a wavelength interval of 10 nm. Subsequently, the tristimulus values are transformed into a comprehensive chromaticity space according to a preset nonlinear transformation relationship to obtain the initial chromaticity value of each sampling point, thereby forming an initial chromaticity sequence distributed along the local observation path set.
[0042] The initial chromaticity sequence is subjected to curvature-weighted fusion processing. Specifically, the curvature distribution parameters corresponding to each sampling point are normalized by subtracting the global minimum value from the curvature value and then dividing by the curvature value range to obtain curvature weight coefficients. Simultaneously, the amplitude of the spectral gradient features is normalized to obtain gradient weight coefficients. A weighting function is constructed based on the curvature weight coefficients and gradient weight coefficients. The weighting function adopts a linear combination form, which is expressed as the sum of the weight coefficients equals 1. The initial chromaticity values are adjusted using the weighting function to obtain a curvature-weighted local chromaticity sequence, giving higher weight to regions with significant curvature and spectral changes in chromaticity representation.
[0043] The curvature-weighted local chromaticity sequences are constructed using path indexing and spatial mapping. Specifically, the chromaticity sequences corresponding to each path are numbered and labeled according to the path numbering order in the local observation path set. Based on the spatial positional relationship of each path in the 3D topography data, an adjacency relationship matrix is established between paths. This adjacency relationship matrix is determined by calculating the minimum spatial distance between paths; paths are considered adjacent when the distance between them is less than a preset threshold of 0.5 mm. Furthermore, a mapping relationship is constructed between the path sequences and 2D grid coordinates, so that the path number corresponds to the row index in the 2D matrix, and the sampling point order within the path corresponds to the column index. The curvature-weighted local chromaticity sequences are spatially rearranged according to the mapping relationship to form a chromaticity field matrix. Specifically, the chromaticity sequence of each path is filled into the matrix according to its corresponding two-dimensional coordinate position. The uncovered areas are filled in by neighborhood interpolation, which is implemented by distance-weighted averaging, with the weight proportional to the reciprocal of the spatial distance. The resulting chromaticity field matrix is then smoothed by boundary processing using a two-dimensional sliding window averaging method with a window size of 3×3 sampling points, thereby obtaining a continuous and stable chromaticity field matrix to characterize the spatial chromaticity distribution characteristics of the outer frame surface under test.
[0044] Directional Consistency Analysis Module: Performs directional consistency analysis on M to obtain the main direction vector D of each path and the first-order color difference change ΔC along D, and generates a set of candidate abnormal segments E.
[0045] In this embodiment, firstly, a local neighborhood is constructed in the chromaticity field matrix with each sampling point as the center. Specifically, the neighborhood window is set to a fixed-size two-dimensional window, with the window size ranging from 5×5 to 9×9 sampling points. Within this local neighborhood, gradients of the chromaticity values are calculated along the row and column directions of the matrix, respectively. The gradients are calculated using the central difference method, i.e., the chromaticity difference between the current sampling point and its adjacent sampling points is divided by the corresponding spatial distance. After obtaining the gradient, the curvature distribution parameter of the corresponding sampling point is introduced as a weighting factor to modulate the gradient. The weighting method is to multiply the gradient value by the normalized curvature distribution parameter, and the normalization method is to subtract the global minimum value from the curvature distribution parameter and then divide it by the global value range. Based on the weighted gradient values, a structure tensor is constructed. The structure tensor consists of the square term and the product term of the gradient in two orthogonal directions, thereby characterizing the directional change characteristics within the local region. Secondly, eigenvalue decomposition is performed on the structure tensor to extract the initial principal direction vector. Specifically, for the structural tensor corresponding to each sampling point, its eigenvalue and corresponding eigenvector are calculated, and the eigenvector corresponding to the largest eigenvalue is selected as the initial principal direction vector of the sampling point; the initial principal direction vector is converted into a direction angle representation, and a mapping relationship between direction angle and spatial position is established, thereby mapping each sampling point to a three-dimensional representation space containing spatial coordinates and direction angle, forming an initial direction distribution in the direction lifting space.
[0046] Directional response accumulation calculation is performed within the directional enhancement space. Specifically, the directional angle range is divided into a discrete set of angles between 0° and 180°, with an angle resolution set to 5° to 10°. For each discrete angle, the projection value of the chromaticity gradient in that direction is calculated, and the projection value is accumulated within a local neighborhood to form the response intensity in that direction. Furthermore, a directional consistency constraint is introduced. By comparing the response differences of each sampling point in the same neighborhood in the same direction, the response intensity is weighted and adjusted, giving higher weight to regions with continuous directional changes. Finally, the direction with the largest response intensity is selected as the principal directional vector corresponding to that path. Finally, the directional derivative of the chromaticity field matrix is calculated along the principal directional vector, and a set of candidate anomaly segments is generated. After determining the principal directional vector, the chromaticity gradient is projected along that direction to obtain the directional derivative value along the principal direction. Specifically, for any sampling point i in the chromaticity field matrix, its chromaticity gradient in the spatial coordinate system... Represented as: In the formula, The chromaticity value represents the rate of change in the horizontal direction, calculated using the central difference method. The rate of change of chromaticity values in the vertical direction is represented by the central difference, calculated using the central difference method. Let the principal direction vector corresponding to this sampling point be: In the formula, This represents the horizontal component of the principal direction vector. Let represent the component of the principal direction vector in the vertical direction, then the value of the directional derivative along the principal direction is... Obtained through the following projection operation: Wherein, the principal direction vector is a unit vector, obtained by normalizing the feature vectors, i.e., satisfying: After obtaining the directional guide values of each sampling point, the directional guide values of consecutive sampling points along the path are differentially calculated to obtain the first-order change in color difference. Specifically, for the i-th sampling point and the (i+1)-th sampling point along the path, the first-order change in color difference is defined as: ;in: This represents the first-order change in color difference for the i-th path interval; , These represent the directional derivative values of adjacent sampling points along the main direction; , This represents the position parameter of the corresponding sampling point along the path arc length, which is obtained by accumulating the Euclidean distances between discrete points along the path. A change threshold is set, which is set to 1.5 to 2.5 times the global standard deviation based on the overall chromaticity change range. When the first-order change in chromaticity exceeds this threshold, the corresponding sampling point is marked as an anomaly. Adjacent anomaly points are connected to form a continuous set of candidate anomaly segments for subsequent location and determination of chromaticity defects.
[0047] To verify the effectiveness of the method described in this application in micro-area color difference detection, a total of 30 aluminum alloy mobile phone frame samples after anodizing were selected from the same batch, including 12 samples with slight color difference that were manually selected and 18 normal samples. The color difference was mainly distributed in the chamfered area and the neighborhood of the antenna breakpoint, and was difficult to be stably identified by the naked eye under normal lighting conditions.
[0048] First, the method of this application is used to detect all samples, construct a chromaticity field matrix, and calculate the principal direction vector and the first-order change in color difference ΔC of each path based on the curvature-weighted structure tensor and the direction lifting space, and further generate a set of candidate abnormal segments; at the same time, a comparison method is selected, namely the traditional comprehensive color difference detection method, which calculates the comprehensive color difference based on the average chromaticity value of the whole surface, without considering the curvature distribution and direction consistency.
[0049] Secondly, statistical analysis was performed on the detection results of the two methods, using the results of manual re-inspection as a reference standard to calculate the detection accuracy, false negative rate, and false positive rate. Among these:
[0050] A correct detection is recorded when the color difference area is correctly identified.
[0051] Areas with known color differences that were not detected were recorded as missed detections.
[0052] Misidentifying normal areas as abnormal is recorded as a false detection.
[0053] The experimental results are as follows:
[0054]
[0055] Further analysis of the micro-area color difference detection capability was conducted, focusing on the detection of color difference bands with a chamfered area width of less than 0.8 mm:
[0056] The recognition rate of traditional methods was 58.3%;
[0057] The method described in this application achieves a recognition rate of 91.7%.
[0058] Furthermore, by statistically analyzing the distribution of the first-order color difference change ΔC in the abnormal and normal regions, we found that:
[0059] The mean value of ΔC in the outlier region was 0.42, and the standard deviation was 0.08.
[0060] The mean value of ΔC in the normal region is 0.15, and the standard deviation is 0.05.
[0061] The two are clearly separable, which verifies the effectiveness of the directional derivative calculation.
[0062] As can be seen from the above embodiments, this application constructs a structural tensor by introducing curvature distribution parameters and performs directional consistency analysis in conjunction with directional enhancement space, thereby transforming color difference detection from the traditional "amplitude judgment" to "direction change sensitive judgment," significantly improving the ability to identify small, low-contrast, and highly directional color difference defects. In particular, in sub-millimeter-level color difference detection in chamfered areas and the vicinity of antenna breakpoints, the detection accuracy is significantly improved, while effectively reducing the false negative rate, demonstrating good engineering application value.
[0063] Threshold adaptive correction module: Combines K with E to perform threshold adaptive correction to obtain the corrected local color difference index L, where the threshold varies with curvature and reflectivity anisotropy.
[0064] In this embodiment, firstly, the curvature distribution parameters and reflection anisotropy features corresponding to each sampling point in the candidate anomaly segment set are jointly normalized. Specifically, for each sampling point, its corresponding curvature distribution parameters are extracted, and the maximum and minimum curvature values of all sampling points in the candidate anomaly segment set are calculated. The current curvature value is subtracted from the minimum value and then divided by the difference between the maximum and minimum values to obtain the normalized curvature parameter. Simultaneously, for the reflection anisotropy feature, based on the reflected light intensity data of the sampling point under different incident angle conditions, the mean value of the reflected light intensity corresponding to each incident angle is calculated, and the deviation of the reflected light intensity at each incident angle from the mean value is further calculated. The standard deviation formula is used to calculate the reflection anisotropy feature value. Then, this feature value is normalized according to the maximum and minimum values of all sampling points to obtain the normalized reflection anisotropy parameter. An adaptive threshold function is constructed based on the normalized curvature distribution parameters and reflection anisotropy parameters. Specifically, the basic threshold is set as the mean of the first-order change in color difference of all sampling points plus 1.5 to 2.0 times its standard deviation. Based on this, a nonlinear modulation function is constructed. The function is in the form that the threshold is equal to the sum of the basic threshold multiplied by one and the curvature distribution parameter multiplied by the first weighting coefficient, and then multiplied by one and the reflection anisotropy parameter multiplied by the second weighting coefficient. The first and second weighting coefficients are obtained by fitting historical sample data, so that the threshold increases monotonically with the increase of curvature and the enhancement of reflection anisotropy, thereby forming an adaptive threshold for different surface characteristics.
[0065] The first-order change in color difference at each sampling point in the candidate anomaly segment set is compared with the corresponding adaptive threshold. Specifically, for each sampling point, if its first-order change in color difference is less than the corresponding adaptive threshold, the sampling point is marked as a suppression point, and its first-order change in color difference is reduced proportionally by a reduction factor of 0.3 to 0.6. If its first-order change in color difference is greater than or equal to the corresponding adaptive threshold, the sampling point is marked as a retention point, and its first-order change in color difference is enhanced by multiplying it by an amplification factor of 1.1 to 1.5 to improve the distinguishability of significant anomalies. The processed sampling points are then reorganized according to path continuity, and a local color difference index is calculated. Specifically, adjacent and continuous retention points are connected along the local observation path set to form corrected anomaly segments. The first-order change in color difference within each anomaly segment is accumulated and divided by the length of the anomaly segment to obtain the average change intensity. Simultaneously, the length of the anomaly segment is introduced as a weight to weight the average change intensity, ultimately obtaining the local color difference index for the corresponding path, which characterizes the overall color difference degree on that path.
[0066] Positioning output module: Matches L with preset process-related criteria and outputs the color difference judgment result of the outer frame on the corresponding path and its spatial position, which is used to indicate micro-area color difference defects.
[0067] In this embodiment, firstly, statistical analysis is performed on the local color difference indices corresponding to each path, and a multidimensional feature vector is constructed. Specifically, for each local observation path, its corresponding local color difference indices are extracted, and the mean, maximum, and standard deviation of the local color difference indices at all sampling points along the path are calculated. Simultaneously, the average value of the curvature distribution parameter and the average value of the reflectance anisotropy feature corresponding to the path are extracted. The local color difference indices, curvature distribution parameters, and reflectance anisotropy features are combined in a unified order to form a multidimensional feature vector, wherein each feature component is scaled using a minimum and maximum value normalization method before combination. A process-related criterion model is then constructed. Specifically, the process involves selecting historical frame samples under different anodizing process conditions, calculating the multidimensional feature vector of the corresponding path for each historical sample using the method described above, and labeling it as either qualified or unqualified. The multidimensional feature vector is then trained using a support vector machine (SVM) classification method. The SVM maps the feature vector to a high-dimensional space using a kernel function to construct the optimal classification hyperplane. The kernel function is a radial basis function, and its parameters are determined using cross-validation. After training, a process-related criterion model for distinguishing between qualified and unqualified states is obtained.
[0068] The multidimensional feature vector of the outer frame to be tested is input into the process-related criterion model for matching calculation. Specifically, the multidimensional feature vector corresponding to each path is input into the trained support vector machine classification model to calculate its positional relationship on the classification hyperplane and output the corresponding classification result. When the classification result is located in the unqualified area, the path is marked as having color difference anomaly; otherwise, it is marked as a normal path. Finally, the judgment result is mapped to the actual spatial position of the outer frame to output the distribution of micro-area color difference defects. Specifically, based on the spatial coordinate information of the local observation path set in the three-dimensional topography data, the coordinates of the sampling points corresponding to the paths marked as having color difference anomalies are extracted and labeled in the three-dimensional coordinate system. At the same time, the coordinate information is transformed into the surface unfolded coordinate system of the outer frame to form a two-dimensional distribution map, so as to intuitively show the specific location of micro-area color difference defects on the surface of the outer frame, thereby realizing the accurate positioning and visualization of small color difference defects.
[0069] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A color difference detection system for anodized surfaces of aluminum alloy mobile phone frames, characterized in that: include: Path planning module: acquires the 3D topographic data of the outer frame to be measured and the design reference plane, extracts the curvature distribution parameter K including chamfers and antenna breaks, and establishes the corresponding local observation path set P; Spectral acquisition module: Based on P, the outer frame is scanned by multiple light sources to obtain the multi-angle reflectance spectral sequence R on each path, and the spectral gradient feature G of the corresponding path is calculated from R; Curvature-weighted chromaticity modeling module: Based on K and G, a curvature-weighted local chromaticity sequence C is constructed, where C is obtained by mapping R to the color space and spatially rearranging it according to the path to form a chromaticity field matrix M; Directional Consistency Analysis Module: Performs directional consistency analysis on M to obtain the main direction vector D of each path and the first-order change in color difference ΔC along D, and generates a set of candidate abnormal segments E; Threshold adaptive correction module: Combines K with E to perform threshold adaptive correction to obtain the corrected local color difference index L, where the threshold varies with curvature and reflectivity anisotropy; Positioning output module: Matches L with preset process-related criteria and outputs the color difference judgment result of the outer frame on the corresponding path and its spatial position, which is used to indicate micro-area color difference defects.
2. The color difference detection system for the anodized surface of an aluminum alloy mobile phone frame according to claim 1, characterized in that: The extraction of curvature distribution parameters K, including chamfered areas and antenna breakpoints, specifically includes: performing full-size 3D reconstruction of the outer frame to be measured to obtain high-precision point cloud data, and performing coordinate registration based on the design model to determine a unified design reference surface; performing surface fitting and second-order differential calculation on the point cloud data to obtain continuous curvature distribution parameters including chamfered areas and antenna breakpoint areas; identifying curvature abrupt change areas and curvature transition areas based on the continuous curvature distribution parameters, and generating initial path lines consistent with the surface normal in the corresponding areas; performing curvature weighted sampling and smoothing on the initial path lines to form a set of local observation paths distributed along the main curvature direction.
3. The color difference detection system for the anodized surface of an aluminum alloy mobile phone frame according to claim 1, characterized in that: The process of obtaining the multi-angle reflectance spectral sequence R on each path and calculating the spectral gradient feature G of the corresponding path from R specifically includes: adjusting the attitude of the outer frame to be measured relative to the multi-source array based on the set of local observation paths; sequentially triggering light sources with different incident directions and different wavelength combinations at each path position to illuminate the frame and collecting the corresponding reflected light intensity data, constructing a multi-angle reflectance spectral sequence according to the path order; normalizing the multi-angle reflectance spectral sequence and arranging it according to the incident angle order to form a standard spectral curve; performing differential calculation on the standard spectral curve along the incident angle direction to obtain the spectral change rate between adjacent angles, and accumulating the spectral change rate in the path dimension to obtain the spectral gradient feature of the corresponding path.
4. The color difference detection system for the anodized surface of an aluminum alloy mobile phone frame according to claim 1, characterized in that: The construction of the curvature-weighted local chromaticity sequence C based on K and G specifically includes: converting the multi-angle reflectance spectral sequence into corresponding tristimulus values through a preset color space mapping function, wherein the color space mapping function is constructed based on the standard light source spectral distribution and color matching function to obtain the initial chromaticity values of each path sampling point; and weighting and fusing the initial chromaticity values with the curvature distribution parameters and spectral gradient features of the corresponding sampling points to construct the curvature-weighted local chromaticity sequence C.
5. The color difference detection system for the anodized surface of an aluminum alloy mobile phone frame according to claim 4, characterized in that: The process of spatially rearranging the local chromaticity sequence according to the path order in the local observation path set to form a chromaticity field matrix M specifically includes: indexing and arranging the local chromaticity sequence according to the path order in the local observation path set, and establishing a two-dimensional coordinate mapping relationship based on the spatial adjacency relationship between the paths; and spatially rearranging the local chromaticity sequence according to the two-dimensional coordinate mapping relationship to form a chromaticity field matrix M that reflects the continuity of the chromaticity distribution on the outer frame surface.
6. The color difference detection system for the anodized surface of an aluminum alloy mobile phone frame according to claim 1, characterized in that: Perform directional consistency analysis on M to obtain the principal directional vector D of each path and the first-order chromatic difference change ΔC along D. Specifically, this includes: constructing a structural tensor with curvature distribution parameters, accumulating directional responses in the directional lifting space, determining the principal directional vector D of each path in the chromaticity field matrix, and calculating the first-order chromatic difference change ΔC along the principal directional vector D.
7. The color difference detection system for the anodized surface of an aluminum alloy mobile phone frame according to claim 6, characterized in that: In the chromaticity field matrix, a local neighborhood is constructed with the sampling point as the center. The gradient of the chromaticity value in the neighborhood is calculated along the spatial coordinate direction. The curvature distribution parameter of the corresponding sampling point is introduced to weight the gradient, and a curvature-weighted structure tensor is constructed. The structure tensor is decomposed into eigenvalues, and the eigenvector corresponding to the largest eigenvalue is extracted as the initial principal direction vector. The principal direction vector is then mapped to the direction lifting space that includes the direction angle dimension. The responses in each direction are cumulatively calculated within the directional enhancement space. The optimal direction for consistency is determined by comparing the response intensities in different directions, thereby obtaining the principal direction vector of each path. The directional derivative of the chromaticity field matrix is calculated along the principal direction vector to obtain the first-order change in color difference ΔC.
8. The color difference detection system for the anodized surface of an aluminum alloy mobile phone frame according to claim 1, characterized in that: The method of combining curvature distribution parameters to perform threshold adaptive correction on the candidate anomaly segment set to obtain the corrected local color difference index specifically includes: First, performing joint normalization processing on the curvature distribution parameters and reflection anisotropy characteristics corresponding to each sampling point in the candidate anomaly segment set, wherein the reflection anisotropy characteristics are calculated by the standard deviation of the reflected light intensity difference under different incident angles; Second, constructing an adaptive threshold function based on the normalized curvature distribution parameters and reflection anisotropy characteristics, wherein the adaptive threshold function adopts a weighted nonlinear combination form, and its output threshold increases with the increase of curvature and the enhancement of anisotropy; Then, comparing the first-order change of color difference of each sampling point in the candidate anomaly segment set with the corresponding adaptive threshold, suppressing sampling points below the threshold, and retaining and enhancing sampling points above the threshold; Finally, reorganizing the processed sampling points according to path continuity, and calculating the local color difference index of the corresponding path based on the cumulative change.
9. The color difference detection system for the anodized surface of an aluminum alloy mobile phone frame according to claim 1, characterized in that: The step of combining K with E to perform threshold adaptive correction to obtain the corrected local color difference index L specifically includes: performing joint normalization processing on the curvature distribution parameters and reflection anisotropy features corresponding to each sampling point in the candidate anomaly segment set; constructing an adaptive threshold function based on the normalized curvature distribution parameters and reflection anisotropy features; the adaptive threshold function adopts a weighted nonlinear combination form, comparing the first-order change of color difference of each sampling point in the candidate anomaly segment set with the corresponding adaptive threshold, suppressing sampling points below the threshold, and retaining and enhancing sampling points above the threshold; reorganizing the processed sampling points according to path continuity, and calculating the local color difference index L of the corresponding path based on the cumulative change.
10. A color difference detection system for anodized surfaces of aluminum alloy mobile phone frames according to claim 9, characterized in that: The process involves matching L with preset process-related criteria to output the color difference judgment result of the outer frame on the corresponding path and its spatial position. Specifically, this includes: statistically analyzing the local color difference index corresponding to each path, extracting its mean, maximum value and distribution range, and constructing a multi-dimensional feature vector by combining the curvature distribution parameters and reflection anisotropy characteristics of the corresponding path; establishing a process-related criterion model based on historical process sample data, inputting the multi-dimensional feature vector of the path to be tested into the process-related criterion model for matching, and obtaining the color difference judgment result of the corresponding path; mapping the path judged as abnormal to the corresponding position on the outer frame surface according to the spatial coordinate information of the path in the three-dimensional morphology data, and outputting the spatial distribution result of micro-area color difference defects.