A color difference identification method applied to a router shell product

By acquiring RGB images and depth maps of router casing products, and calculating depth restoration factors and reflectivity compensation factors for adaptive color difference correction, the problem of low color difference recognition accuracy of router casing products is solved, and higher accuracy color difference recognition is achieved.

CN121582537BActive Publication Date: 2026-07-21DONGGUAN CITY JIANG LIN HARDWARE IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DONGGUAN CITY JIANG LIN HARDWARE IND CO LTD
Filing Date
2025-12-02
Publication Date
2026-07-21

Smart Images

  • Figure CN121582537B_ABST
    Figure CN121582537B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image recognition, in particular to a color difference identification method applied to a router shell product. The method comprises the following steps: collecting a router shell product image, obtaining an RGB image and a depth map of the router shell product, and segmenting and obtaining a local area; the local area is divided into multiple analysis areas through color feature clustering; a depth repair factor is obtained based on the radial angle of the analysis area and a camera and the depth variation degree of the analysis area; after conversion into an HSV space, a light reflection area is screened, and a light reflection compensation factor of the analysis area is obtained based on saturation and brightness; a color difference correction factor of a pixel point is obtained based on the depth repair factor and the light reflection area factor; the offset amount of different channel pixel points is determined based on the color difference correction factor, the offset coefficient of a channel and the distance of the pixel point from a light center; color difference correction is completed based on the offset amount; and color difference identification is completed after network training based on the corrected image. The application improves the color difference identification precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image recognition technology, specifically to a color difference recognition method applied to router casing products. Background Technology

[0002] The manufacturing process for plastic router casings typically involves injection molding, where molten plastic is poured into a mold, and after cooling, a molded plastic router casing is obtained. During quality inspection, surface quality defects in router casings mainly include color differences, scratches, and damage. Subtle color difference defects can significantly impact the quality inspection of router casings; therefore, color difference identification for router casings is crucial.

[0003] Router casings have an uneven structure with protrusions and depressions. These features have distinct edges in images, and areas with high contrast at these edges exhibit lateral color differences. Existing algorithms use a scaling-offset model to correct these lateral color differences. However, when acquiring router casing image data, the uneven structure affects lighting, causing reflections on the surface. These reflections are also non-uniformly distributed. Furthermore, the scaling-offset model does not consider edge depth and radial angle; directly correcting color differences is affected by non-uniform reflections and the interference of edge depth and radial angle, impacting the recognition of color differences in router casing images. Summary of the Invention

[0004] To address the technical problem of low color difference recognition accuracy caused by reflection, this application provides a color difference recognition method for router casing products, and the specific technical solution adopted is as follows: This application proposes a color difference recognition method for router casing products, the method comprising the following steps: The router casing product image is captured by a camera, its RGB image and depth map are obtained, the casing part is marked, and local regions are obtained through semantic segmentation; Pixels are classified based on the distance of color features between pixels in a local region, and the connected components extracted from each cluster are recorded as the analysis region. The radial angle is determined based on the distance between the camera's optical center parameters and the center coordinates of the analysis region, as well as the camera's focal length. The depth restoration factor of the analysis region is obtained by combining the depth change degree of the analysis region calculated by the Laplacian operator. The analysis area is converted to the HSV color space, and reflective areas are screened based on the decreasing trend of row and column brightness within the analysis area. The reflectivity of the reflective area is obtained based on the saturation and brightness of the pixels within the reflective area, and the average of all reflectivity in the analysis area is used as the reflectivity compensation factor for the analysis area. The color difference correction factor of edge pixels and pixels in the reflective area within the analysis area is obtained by weighting the depth restoration factor and the reflection compensation factor; the edge pixels and pixels in the reflective area are recorded as correction pixels; the offset of each correction pixel in different channels is obtained based on the distance between the correction pixel and the camera optical center coordinates, the offset coefficient of the color channel, and the depth restoration factor; the color difference correction of the router shell product image is completed based on the offset of different channels. The product image of the router casing with or without color difference after color difference correction is trained by a neural network. The product image of the router casing to be detected is input into the neural network model to complete the color difference recognition.

[0005] In the above scheme, when using the scaling-offset model to correct color difference in router shell product images, this application considers the depth change and radial angle of the router shell product edge and calculates the depth repair factor. It also considers the influence of the reflective area on the surface of the router shell product on the image color difference and calculates the reflection compensation factor. Combining the depth repair factor and the reflection compensation factor, the color difference correction factor is calculated. Its beneficial effect is that by introducing the color difference correction factor into the scaling-offset model, adaptive color difference correction is performed on each local area in the router shell product image, thereby improving the color difference recognition accuracy.

[0006] In one embodiment, the color feature is a normalized value of four values ​​corresponding to a pixel: R value, G value, B value, and depth value; the depth value is the value of the pixel in the depth map.

[0007] In one embodiment, the method for determining the radial angle based on the distance between the camera's optical center parameters, the center coordinates of the analysis area, and the camera's focal length is as follows: , This represents the x-coordinate of the center point of the i-th analysis region. The x-coordinate of the camera's optical center. This represents the ordinate of the center point of the i-th analysis region. The ordinate of the camera's optical center. This indicates the camera's focal length, which is determined by the average of the camera's focal lengths in the horizontal and vertical directions. Represents the arctangent function. This represents the radial angle between the i-th analysis region and the camera's optical center.

[0008] In one embodiment, the degree of depth variation is the mean of the absolute values ​​of the depth gradients of all pixels within the analysis region; the depth gradient is obtained by processing the pixels using the Laplace algorithm.

[0009] In one embodiment, the depth restoration factor is positively correlated with both the degree of depth change and its radial angle with respect to the camera's optical center.

[0010] In one embodiment, the method for screening reflective areas based on the decreasing trend of row and column brightness within the analysis area is as follows: For each analysis region, the brightness value of each column of pixels is taken as the column brightness component; the pixel value whose ordinate is greater than the ordinate of the maximum brightness value point is recorded as the first target pixel, and the brightness value of the first target pixel in each column constitutes the sub-column brightness component; the sub-column brightness component is linearly fitted to obtain the slope, and the slope is compared with the preset value to obtain the trend of the sub-column brightness component; a descending sequence is constructed based on the trend continuity; the minimum and maximum values ​​of the ordinate in the descending sequence are extracted to form the column boundary; The brightness value of each row of pixels constitutes the row brightness component. The sub-row brightness component and its descending sequence are obtained in the same way as the column brightness component. The minimum and maximum values ​​of the horizontal coordinates in the descending sequence are extracted to form the row boundary. The area enclosed by the column and row boundaries within the analysis area is designated as the reflective area.

[0011] In one embodiment, the reflectivity is positively correlated with brightness and negatively correlated with saturation.

[0012] In one embodiment, the method for obtaining the color difference correction factor of edge pixels within the analysis area and pixels within the reflective area based on the weighted average of the depth restoration factor and the reflection compensation factor is as follows: When there are no reflective areas within the analysis area, the color difference correction factor for the edge pixels within the analysis area is the depth restoration factor; When a reflective area exists in the analysis area, the color difference correction factor of the reflective pixel in the analysis area is obtained by weighting the reflective compensation factor and the depth repair factor.

[0013] In one embodiment, the offset is positively correlated with distance, offset coefficient, and color difference correction factor, respectively.

[0014] In one embodiment, the expression for the offset is: , , This represents the offset coefficient of the R channel in the horizontal direction. This represents the offset coefficient of the R channel in the vertical direction. This represents the distance between the corrected pixel and the camera's optical center coordinates. This represents the depth repair factor for the i-th analysis region. This indicates the offset of the corrected pixel in the horizontal direction of the R channel. This indicates the offset of the corrected pixel in the vertical direction of the R channel.

[0015] The beneficial effects of this application are as follows: When using the scaling-offset model to correct color difference in router casing product images, this application considers the depth variation and radial angle of the router casing product edge and calculates a depth repair factor. It also considers the influence of reflective areas on the surface of the router casing product on the image color difference and calculates a reflection compensation factor. Combining the depth repair factor and the reflection compensation factor, a color difference correction factor is calculated. Its beneficial effect is that by introducing a color difference correction factor into the scaling-offset model, adaptive color difference correction is performed on each local area in the router casing product image, thereby improving the accuracy of color difference recognition. Attached Figure Description

[0016] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating a color difference recognition method for router casing products, provided as an embodiment of this application. Detailed Implementation

[0018] To further illustrate the technical means and effects adopted by this application to achieve the intended purpose of the invention, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a color difference identification method for router casing products proposed according to this application. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0020] An embodiment of a color difference recognition method applied to router casing products: The following description, in conjunction with the accompanying drawings, details a specific scheme for a color difference recognition method applied to router casing products provided in this application.

[0021] Please see Figure 1 The diagram illustrates a flowchart of a color difference recognition method for router casing products according to an embodiment of this application. The method includes the following steps: Step S001: Acquire an image of the router casing, obtain its RGB image and depth map, and segment to obtain the local area.

[0022] RGB images and depth maps of the router casing product, with and without color difference, are acquired using an RGB-D camera. Since the pixel positions of the RGB images and depth maps are the same, they are collectively referred to as the router casing product image. During the acquisition process, the positions of the router casing product and the RGB-D camera need to be fixed. For example, in this embodiment, the RGB-D camera is positioned above and perpendicular to the router casing product. Image noise is introduced during acquisition due to sensor interference. Therefore, all images are used as input, and a Gaussian kernel parameter is set. In this embodiment, the Gaussian kernel parameter is 3. Gaussian filtering is used to denoise the images and eliminate the noise. Gaussian filtering is a well-known technique, and the specific calculation process will not be detailed here.

[0023] The Labelme annotation tool was used to label all pre-processed router shell product images. The labels included the router shell product image name, width, and height, the product name within the image, and the coordinates of the pixels. Using the router shell product images and labels as input, the U-net model was used to perform semantic segmentation on the router shell product images, training a semantic segmentation model. The semantic segmentation model was then used to perform semantic segmentation on the router shell product images, obtaining a probability map of pixels belonging to router shell products. A probability threshold of 0.5 was set, and the probability map was binarized. Pixels with a probability greater than the threshold belonging to router shell products were marked as 1; otherwise, they were marked as 0. Pixels marked as 1 were recorded as shell pixels, and the region formed by all shell pixels was considered a local region. The Labelme annotation tool and the U-net model are well-known technologies; the specific calculation process will not be elaborated further.

[0024] At this point, the local area has been obtained.

[0025] Step S002: Obtain the depth repair factor based on the radial angle between the analysis area and the camera, as well as the degree of depth change in the analysis area.

[0026] Router casings have multiple edges at varying heights on their surface. These edges possess different depth values ​​within the casing area. By using clustering algorithms to group regions based on the RGB values ​​and depth values ​​of each pixel in the casing area, multiple regions containing different depth values ​​can be identified. Color difference refers to the visual color misalignment of object edges in an image. If the edges in a local area are not tangential edges, the difference between the true lateral color difference and the actual color is the Euclidean distance from the image center pixel to the region center pixel. This means that the greater the pixel depth value of the region, the greater the lateral color difference of the edge pixels in the local area; similarly, the greater the radial angle between the image center pixel and the local region center pixel, the greater the lateral color difference of the edge pixels in the region.

[0027] Based on the above analysis, the local region is divided into regions. For each pixel in the local region, the normalized values ​​of the pixel's R, G, B, and depth values ​​are used as the color feature of each pixel.

[0028] Clustering is performed on all pixels within a local region based on color differences between pixels; the clustering distance is the Euclidean distance of color features between pixels. In other words, all pixels are classified based on color features. For each clustered region, connected component analysis is performed to obtain several connected components, each of which is denoted as an analysis region. For each analysis region, an edge detection algorithm is used to obtain all edge pixels within that region. In this embodiment, the DBSCAN clustering algorithm is used, and the Sobel algorithm is used for edge detection.

[0029] Furthermore, using the optical center parameters of the RGB-D camera and the center coordinates of each analysis area, the radial angle of the analysis area relative to the camera's optical center is calculated. The degree of depth change within the analysis area is calculated using the Laplacian operator. Combining the radial angle and the degree of depth change, the depth restoration factor of the analysis area is calculated.

[0030] For each pixel within the analysis region, the Laplacian operator is used to calculate the depth gradient of the pixel based on the depth values ​​of its four neighboring pixels and the depth value of the pixel itself. The mean of the absolute values ​​of the depth gradients of all pixels within the analysis region is taken as the degree of depth change within the analysis region.

[0031] The optical center parameter refers to the optical center coordinates of the camera, which are inherent parameters of the camera. The radial angle between the analysis area and the camera's optical center coordinates is obtained based on the difference between the center point coordinates of each analysis area and the camera's optical center coordinates, as well as the camera's focal length.

[0032] Preferably, in this embodiment, the expression for the radial angle is: , This represents the x-coordinate of the center point of the i-th analysis region. The x-coordinate of the camera's optical center. This represents the ordinate of the center point of the i-th analysis region. The ordinate of the camera's optical center. This indicates the camera's focal length, which is determined by the average of the camera's focal lengths in the horizontal and vertical directions. Represents the arctangent function. This represents the radial angle between the i-th analysis region and the camera's optical center.

[0033] The depth restoration factor for each analysis region is obtained based on the degree of depth variation of each analysis region and its radial angle with respect to the camera optical center.

[0034] The depth restoration factor is positively correlated with the degree of depth change and its radial angle with respect to the camera's optical center.

[0035] It should be noted that positive correlation means that when one variable increases, the other variable also increases, and the two variables change in the same direction. When one variable changes from large to small or from small to large, the other variable also changes from large to small or from small to large. The specific relationship is determined by the actual application, and this application does not impose any special restrictions.

[0036] Preferably, in this embodiment, the expression for the depth repair factor is: , This indicates the degree of depth change in the i-th analysis region. This represents the radial angle between the i-th analysis region and the camera's optical center. Represents the normalization function. This represents the depth repair factor for the i-th analysis region.

[0037] The larger the depth variation area, the greater the depth difference within the analyzed area, and consequently, the greater the lateral color difference. Similarly, a larger radial angle indicates a greater lateral color difference among the edge pixels of the analyzed area. Greater color difference necessitates greater restoration efforts and requires a larger depth restoration factor.

[0038] At this point, the depth repair factor for each analysis region has been obtained.

[0039] Step S003: After converting to HSV space, reflective areas are screened, and the reflective compensation factor of the analysis area is obtained based on saturation and brightness.

[0040] If a reflective area exists in a localized region, the RGB components of the pixels within that reflective area will all be amplified, resulting in false color differences. Pixels in the reflective area have low saturation components and high luminance components, and the luminance components of pixels in the reflective area gradually decrease from the center to the edges.

[0041] For each analysis region, its RGB image is converted to the HSV color space to obtain the hue (H), saturation (S), and brightness (V) of each pixel.

[0042] The specific steps for filtering reflective areas based on the brightness value of each pixel are as follows: For each analysis region, the brightness value of each column of pixels is taken as the column brightness component; the maximum value of the brightness value in each column brightness component is extracted, and the corresponding pixel is recorded as the maximum brightness point. The pixel value whose ordinate is greater than the ordinate of the maximum brightness point is recorded as the first target pixel. The brightness value of the first target pixel in each column constitutes the sub-column brightness component.

[0043] If there is a reflective area within the analysis area, the brightness components of the sub-column will show a trend from high to low. The least squares method is used to perform linear fitting on each brightness component of the sub-column to obtain the slope of each brightness component of the sub-column. If the slope of the brightness component of the sub-column is less than a preset value, the brightness component of the sub-column is considered to be in a downward trend. In this embodiment, the preset value is -tan10.

[0044] If the slope of the sub-column brightness components continuously decreases, then the consecutive sub-column brightness components form a sequence, denoted as a decreasing sequence. The minimum and maximum values ​​of the ordinates in the decreasing sequence are extracted and designated as column boundaries. For example, given sub-column brightness components K = {k1, k2, k3, k4, k5, k6, k7, k8}, if the slopes from k1 to k3 and from k5 to k8 continuously decrease, then k1 to k3 form a decreasing sequence, and k5 to k8 form another decreasing sequence. k1 and k3 are column boundaries, and k5 and k8 are also column boundaries.

[0045] Similarly, the brightness value of each row of pixels is taken as the row brightness component. The maximum brightness value is extracted, and the pixel value whose horizontal coordinate is greater than the horizontal coordinate of the maximum brightness point is recorded as the second target pixel. The brightness value of the second target pixel in each row constitutes the sub-row brightness component. When the slope of the sub-row brightness component is less than a preset value, the sub-row brightness component has a downward trend. The sub-row brightness components that continuously show a downward trend are formed into a sequence, and the row boundaries of the sequence are obtained.

[0046] The area enclosed by the column and row boundaries within the analysis area is designated as the reflective area, and the pixels within it are recorded as reflective pixels.

[0047] Since the saturation component of pixels in the reflective area is small and the luminance component is large, the average value of the saturation and luminance components of each pixel in the reflective area can reflect the reflectivity of the entire reflective area. The smaller the average value of the saturation component and the larger the average value of the luminance component, the greater the reflectivity of the reflective area, and the greater the degree of reflection compensation required for the image.

[0048] Therefore, the reflectivity of the reflective area is obtained based on the saturation and brightness of the pixels within the reflective area, and the average of all reflectivity within the analysis area is used as the reflectivity compensation factor for the analysis area.

[0049] The degree of reflectivity is positively correlated with brightness and negatively correlated with saturation.

[0050] It should be noted that negative correlation means that when one variable increases, the other variable decreases accordingly, and the two variables change in opposite directions. When one variable changes from large to small or from small to large, the other variable also changes from small to large or from large to small. The specific relationship is determined by practical application, and this application does not impose any special restrictions.

[0051] Preferably, in this embodiment, the expression for the reflectivity compensation factor is: , This represents the average brightness of the r-th reflective region in the i-th analysis region. This represents the mean saturation value of the r-th reflective region in the i-th analysis region. This represents the number of reflective areas in the i-th analysis region. This represents the reflection compensation factor for the i-th analysis region.

[0052] At this point, the reflectivity compensation factor for each analysis area has been obtained.

[0053] Step S004: Obtain the color difference correction factor of the pixel based on the depth repair factor and the reflective area factor; determine the offset of the pixel in different channels based on the color difference correction factor, the offset coefficient of the channel and the distance of the pixel from the optical center; and complete the color difference correction based on the offset.

[0054] The color difference correction factor for each analysis area is obtained based on the reflection compensation factor and depth repair factor for each analysis area.

[0055] If there are no reflective areas within the analysis area, the color difference correction factor of the edge pixels within the analysis area is the depth restoration factor. If a reflective area exists within the analysis area, the color difference correction factor of the reflective pixels within the analysis area is obtained by weighting the reflectivity compensation factor and the depth restoration factor. In this embodiment, the weight of the depth restoration factor is 0.4, and the weight of the reflectivity compensation factor is 0.6.

[0056] In the scaling-offset model, the color difference correction factor in the i-th analysis region is used to correct the color difference between the reflective pixels and edge pixels in the i-th analysis region.

[0057] Edge pixels and reflective pixels that require color difference correction are collectively referred to as correction pixels.

[0058] Using channel G as a reference, the offset coefficients of pixels in the R and B channels are obtained through LCALUT generation. The offset of each corrected pixel is then calculated based on the distance between the corrected pixel and the camera's optical center coordinates, the channel offset coefficients, and the depth restoration factor. The distance between the corrected pixel and the camera's optical center coordinates is the Euclidean distance between the two coordinates.

[0059] The offset is positively correlated with distance, offset coefficient, and color difference correction factor, respectively.

[0060] Preferably, in this embodiment, the expression for the offset is: , , This represents the offset coefficient of the R channel in the horizontal direction. This represents the offset coefficient of the R channel in the vertical direction. This represents the distance between the corrected pixel and the camera's optical center coordinates. This represents the color difference correction factor for the i-th analysis region. This indicates the offset of the corrected pixel in the horizontal direction of the R channel. This indicates the offset of the corrected pixel in the vertical direction of the R channel.

[0061] The method for obtaining the offset of channel B is the same as the method for obtaining the offset of channel R.

[0062] The offset of the corrected pixel in the R and B channels is used to perform R and B channel correction on the corrected pixel. After the corrected pixel is corrected in the R and B channels, the pixel value in the G channel is combined to obtain the pixel value after color difference correction.

[0063] Based on the above method, color difference correction is performed on all edge pixels and reflective pixels in the outer shell area to complete the color difference correction of the router outer shell product image.

[0064] This completes the color difference correction for the router casing product image.

[0065] Step S005: After training the network based on the corrected image, color difference recognition is completed.

[0066] After correcting the color difference of router shell product images with and without color difference through the above steps, the images are treated as two categories, with the category labels set as "with color difference" and "without color difference," respectively. The loss function and optimizer are set as cross-entropy loss function and SGD (SGD momentum parameter is 0.9, learning rate is 0.01, decay is 0.0001), and the data is input into a ResNet network for training, outputting a trained classification model.

[0067] After color difference correction is performed on the image of the router casing to be inspected, it is input into the classification model. The classification model outputs the color difference recognition result of the image of the router casing to be inspected. The color difference recognition result includes two categories: with color difference and without color difference. When the output is "without color difference", the image of the router casing to be inspected is considered to have no color difference; when the output is "with color difference", the image of the router casing to be inspected is considered to have color difference. ResNet network is a well-known technology, and the specific process will not be described in detail.

[0068] This completes the method for color difference identification of router casing products.

[0069] It should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

[0070] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

Claims

1. A method for color difference recognition applied to router casing products, characterized in that, The method includes the following steps: The router casing product image is captured by a camera, its RGB image and depth map are obtained, the casing part is marked, and local regions are obtained through semantic segmentation; Pixels are classified based on the distance of color features between pixels in a local region, and the connected components extracted from each cluster are recorded as the analysis region. The radial angle is determined based on the distance between the camera's optical center parameters and the center coordinates of the analysis region, as well as the camera's focal length. The depth restoration factor of the analysis region is obtained by combining the depth change degree of the analysis region calculated by the Laplacian operator. The analysis area is converted to the HSV color space, and reflective areas are screened based on the decreasing trend of row and column brightness within the analysis area. The reflectivity of the reflective area is obtained based on the saturation and brightness of the pixels within the reflective area, and the average of all reflectivity in the analysis area is used as the reflectivity compensation factor for the analysis area. The color difference correction factor of edge pixels and pixels in the reflective area within the analysis area is obtained by weighting the depth restoration factor and the reflection compensation factor; the edge pixels and pixels in the reflective area are recorded as correction pixels; the offset of each correction pixel in different channels is obtained based on the distance between the correction pixel and the camera optical center coordinates, the offset coefficient of the color channel, and the depth restoration factor; the color difference correction of the router shell product image is completed based on the offset of different channels. The product image of the router casing with or without color difference after color difference correction is trained by a neural network. The product image of the router casing to be detected is input into the neural network model to complete the color difference recognition.

2. The color difference recognition method for router casing products as described in claim 1, characterized in that, The color feature is a normalized value of four values ​​corresponding to a pixel: R value, G value, B value, and depth value; the depth value is the value of the pixel in the depth map.

3. The color difference recognition method for router casing products as described in claim 1, characterized in that, The method for determining the radial angle based on the distance between the camera's optical center parameters, the center coordinates of the analysis area, and the camera's focal length is as follows: , This represents the x-coordinate of the center point of the i-th analysis region. The x-coordinate of the camera's optical center. This represents the ordinate of the center point of the i-th analysis region. The ordinate of the camera's optical center. This indicates the camera's focal length, which is determined by the average of the camera's focal lengths in the horizontal and vertical directions. Represents the arctangent function. This represents the radial angle between the i-th analysis region and the camera's optical center.

4. The color difference recognition method for router casing products as described in claim 1, characterized in that, The degree of depth change is the mean of the absolute values ​​of the depth gradients of all pixels within the analysis area; the depth gradient is obtained by processing the pixels using the Laplace algorithm.

5. The color difference recognition method for router casing products as described in claim 1, characterized in that, The depth restoration factor is positively correlated with the degree of depth change and its radial angle with respect to the camera's optical center.

6. The color difference recognition method for router casing products as described in claim 1, characterized in that, The method for screening reflective areas based on the decreasing trend of row and column brightness within the analysis area is as follows: For each analysis region, the brightness value of each column of pixels is taken as the column brightness component; The pixel value whose ordinate is greater than the ordinate of the maximum brightness value is recorded as the first target pixel. The brightness value of the first target pixel in each column is used to form the sub-column brightness component. The slope is obtained by linearly fitting the brightness components of the sub-column, and the trend of the brightness components of the sub-column is obtained by comparing the slope with the preset value. Constructing a declining sequence based on trend continuity; Extract the minimum and maximum values ​​of the y-coordinates in the descending sequence to form column boundaries; The brightness value of each row of pixels constitutes the row brightness component. The sub-row brightness component and its descending sequence are obtained in the same way as the column brightness component. The minimum and maximum values ​​of the horizontal coordinates in the descending sequence are extracted to form the row boundary. The area enclosed by the column and row boundaries within the analysis area is designated as the reflective area.

7. The color difference recognition method for router casing products as described in claim 1, characterized in that, The degree of reflectivity is positively correlated with brightness and negatively correlated with saturation.

8. The color difference recognition method for router casing products as described in claim 1, characterized in that, The method for obtaining the color difference correction factor of edge pixels and pixels in the reflective region by weighting the depth restoration factor and the reflection compensation factor is as follows: When there are no reflective areas within the analysis area, the color difference correction factor for the edge pixels within the analysis area is the depth restoration factor; When a reflective area exists in the analysis area, the color difference correction factor of the reflective pixel in the analysis area is obtained by weighting the reflective compensation factor and the depth repair factor.

9. The color difference recognition method for router casing products as described in claim 1, characterized in that, The offset is positively correlated with distance, offset coefficient, and color difference correction factor, respectively.

10. The color difference recognition method for router casing products as described in claim 9, characterized in that, The expression for the offset is: , , This represents the offset coefficient of the R channel in the horizontal direction. This represents the offset coefficient of the R channel in the vertical direction. This represents the distance between the corrected pixel and the camera's optical center coordinates. This represents the depth repair factor for the i-th analysis region. This indicates the offset of the corrected pixel in the horizontal direction of the R channel. This indicates the offset of the corrected pixel in the vertical direction of the R channel.