High-resolution machine vision detection method and system for precise chromatic aberration detection and medium

By calibrating the camera and light source parameters, acquiring and processing the workpiece image in real time, mapping it to the standard color space, and extracting and analyzing the color difference characteristics, the problems of insufficient accuracy and range of traditional color difference detection are solved, and high-precision precision color difference detection is achieved.

CN120707653AInactive Publication Date: 2025-09-26HANGZHOU HUICUI INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202511202711.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2025-09-26
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional color difference detection methods have shortcomings in precision and large-area detection. Manual visual inspection has poor consistency and low accuracy. The detection range of handheld spectrophotometers is limited. Traditional machine vision detection has low accuracy and cannot effectively distinguish subtle color differences.

Method used

By calibrating the camera and light source parameters, the workpiece image is acquired in real time, pre-processed and mapped to the standard color space, color features are extracted, color difference indicators are calculated and thresholds are set, and color abnormality areas are analyzed.

Benefits of technology

It improves the precision and accuracy of precision color difference detection, can effectively detect subtle color differences in large areas and complex backgrounds, and is suitable for use in high-speed production lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707653A_ABST
    Figure CN120707653A_ABST
Patent Text Reader

Abstract

The invention provides a high-resolution machine vision detection method and system for precise chromatic aberration detection and a medium, and the method comprises the steps: carrying out the calibration of a camera based on a camera calibration tool, and synchronously calibrating a light source parameter and a color parameter; setting shooting parameters based on the calibrated camera, obtaining a workpiece image in real time, preprocessing the workpiece image, mapping the preprocessed image to a standard color space from an original RGB space, and extracting color features of the preprocessed image; comparing the color feature with the color feature of the standard sample, calculating a color difference index, and comparing with the color difference index based on a set color difference threshold to obtain a detection result; by calibrating various parameters of the camera, the visual detection precision is ensured, and by performing color space mapping on the workpiece image and analyzing the difference between the color difference index of the color feature and the color difference threshold value, the color abnormal area is accurately analyzed, and the detection precision of the abnormal color is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of visual inspection technology, and in particular to a high-resolution machine vision inspection method, system, and medium for precise color difference detection. Background Art

[0002] As a fundamental element of visual perception, color not only plays an aesthetic role but also serves as a crucial indicator for product quality control in industrial manufacturing. In particular, in industries such as automotive, consumer electronics, aerospace, high-end textiles, and building materials, the requirements for color consistency are becoming increasingly stringent. Even the slightest color difference, imperceptible to the human eye, can be considered a quality flaw, impacting product grade assessment and even market acceptance.

[0003] Traditional color difference detection mainly relies on the following methods: Manual visual inspection: Experienced inspectors perform visual judgments on color palettes or standard samples. This method is affected by factors such as subjective perception, changes in ambient lighting, and inspector fatigue. It suffers from poor consistency and low accuracy, and cannot be used for large-scale, continuous testing.

[0004] Handheld spectrophotometers or colorimeters: These instruments directly measure the tristimulus values ​​of the target object's surface and convert them into ΔE color difference values. While more objective than visual inspection, this method has a limited inspection range (usually a small dot), making it incapable of covering large areas, complex patterns, or gradient backgrounds. Furthermore, their slow inspection speed makes them unsuitable for high-speed production lines.

[0005] Traditional machine vision inspection: Some high-end production lines use ordinary RGB cameras for color monitoring. However, due to the camera's small color linear range, insufficient color gamut coverage, and significant environmental interference, the detection accuracy is far below actual requirements, especially when distinguishing subtle color differences (such as ΔE < 0.5). Summary of the Invention

[0006] The purpose of the embodiments of the present application is to provide a high-resolution machine vision inspection method, system and medium for precise color difference detection, which ensures the accuracy of visual inspection by calibrating various parameters of the camera. In addition, by mapping the workpiece image into color space and analyzing the difference between the color difference index of the color feature and the color difference threshold, the area of ​​color abnormality is accurately analyzed to improve the detection accuracy of abnormal color.

[0007] The present application also provides a high-resolution machine vision detection method for precise color difference detection, including: Calibrate the camera's internal and external parameters based on the camera calibration tool, and simultaneously calibrate the light source parameters and color parameters to obtain a calibrated camera; Setting shooting parameters based on the calibrated camera, acquiring workpiece images in real time, and preprocessing the workpiece images to obtain preprocessed images; Map the preprocessed image from the original RGB space to the standard color space and extract the color features of the preprocessed image; Compare the color features with those of the standard sample, calculate the color difference index, compare the color difference index with the set color difference threshold, analyze whether the color of the preprocessed image is qualified, and obtain the detection result; Based on the detection results, the abnormal color distribution trends and abnormal conditions of the preprocessed images are analyzed.

[0008] Optionally, in the high-resolution machine vision inspection method for precise color difference detection described in an embodiment of the present application, calibrating the internal and external parameters of the camera based on a camera calibration tool, and simultaneously calibrating the light source parameters and color parameters to obtain a calibrated camera specifically includes: Based on a calibration pattern of known size and shape, the camera takes images of the standard pattern at multiple angles; Calibrate the camera's internal and external parameters based on the relationship between the feature points of the pattern in the image and the corresponding points in the real object; Based on measuring the light intensity and color distribution of the light source at different positions and angles, the light intensity and color distribution measurement values ​​are obtained; Compare the measured value with the standard value to obtain a comparison result, and dynamically adjust the light source parameters based on the comparison result; Photograph a standard color card of known color, compare the color values ​​captured by the camera with the standard color values ​​of the color card, establish a color mapping relationship, and adjust the color parameters based on the color mapping relationship.

[0009] Optionally, in the high-resolution machine vision inspection method for precise color difference detection described in an embodiment of the present application, setting shooting parameters based on a calibrated camera, acquiring a workpiece image in real time, and preprocessing the workpiece image to obtain a preprocessed image specifically include: Setting shooting parameters, including exposure time, aperture size and gain value; Turn on the camera and light source, and shoot the workpiece in real time based on the set shooting parameters to obtain the workpiece image; Based on the filtering algorithm, the noise in the workpiece image is removed to obtain a de-noised image; The denoised image is linearized and white balanced to obtain a preprocessed image.

[0010] Optionally, in the high-resolution machine vision detection method for precise color difference detection described in an embodiment of the present application, mapping the preprocessed image from the original RGB space to the standard color space and extracting the color features of the preprocessed image specifically includes: Select a standard color space and convert the original RGB values ​​into linear RGB based on the preprocessed image through inverse camera response correction; The standard color space includes CIE XYZ color space and CIE Lab* color space; Map linear RGB to CIE XYZ color space; Nonlinear transformation based on mapping CIE XYZ color space to CIE Lab*; Features are extracted from the preprocessed image after nonlinear transformation to obtain color features, which include global color features and local color features.

[0011] Optionally, in the high-resolution machine vision inspection method for precise color difference detection described in the embodiment of the present application, analyzing whether the color of the preprocessed image is qualified to obtain the inspection result specifically includes: For the preprocessed image and the standard sample image, feature extraction is performed on the preprocessed image and the standard sample image respectively to obtain color features of the preprocessed image and color features of the standard sample image; Compare the color features of the preprocessed image with those of the standard sample image and calculate the color difference index; According to different application scenarios and quality requirements, set the color difference threshold, and compare the calculated color difference index with the set color difference threshold; If the color difference index is less than or equal to the threshold, it is determined that the color difference between the preprocessed image and the standard sample is normal and the color is qualified; If the color difference index is greater than the threshold, it means that the color difference exceeds the allowable range and the color is unqualified; According to the color difference comparison analysis results, the test results are obtained and a test report is generated.

[0012] Optionally, in the high-resolution machine vision detection method for precise color difference detection described in the embodiment of the present application, analyzing abnormal color distribution trends and abnormal conditions of the preprocessed image based on the detection results specifically includes: Obtain color features, perform statistical analysis on the color features of the preprocessed image, and obtain color feature values ​​of different color channels; Calculate the mean and standard deviation of the color feature values ​​of different color channels and analyze the overall distribution of colors; The pre-processed image is divided into regions based on image segmentation technology to obtain multiple sub-regions; Analyze the color characteristics of different sub-regions and observe the spatial distribution trend of colors; Based on the spatial distribution trend of the color, determine whether there is color gradient and patchiness, and obtain the judgment result; Based on the judgment results, the color difference distribution is analyzed, the abnormal color area in the image is located, and the type of abnormal color is determined according to the color characteristics and color difference indicators.

[0013] In a second aspect, an embodiment of the present application provides a high-resolution machine vision inspection system for precision color difference detection, the system comprising: a memory and a processor, the memory comprising a program for a high-resolution machine vision inspection method for precision color difference detection, the program for a high-resolution machine vision inspection method for precision color difference detection, when executed by the processor, implementing the following steps: Calibrate the camera's internal and external parameters based on the camera calibration tool, and simultaneously calibrate the light source parameters and color parameters to obtain a calibrated camera; Setting shooting parameters based on the calibrated camera, acquiring workpiece images in real time, and preprocessing the workpiece images to obtain preprocessed images; Map the preprocessed image from the original RGB space to the standard color space and extract the color features of the preprocessed image; Compare the color features with those of the standard sample, calculate the color difference index, compare the color difference index with the set color difference threshold, analyze whether the color of the preprocessed image is qualified, and obtain the detection result; Based on the detection results, the abnormal color distribution trends and abnormal conditions of the preprocessed images are analyzed.

[0014] Optionally, in the high-resolution machine vision inspection system for precise color difference detection described in an embodiment of the present application, calibrating the internal and external parameters of the camera based on a camera calibration tool, and simultaneously calibrating the light source parameters and color parameters to obtain a calibrated camera specifically includes: Based on a calibration pattern of known size and shape, the camera takes images of the standard pattern at multiple angles; Calibrate the camera's internal and external parameters based on the relationship between the feature points of the pattern in the image and the corresponding points in the real object; Based on measuring the light intensity and color distribution of the light source at different positions and angles, the light intensity and color distribution measurement values ​​are obtained; Compare the measured value with the standard value to obtain a comparison result, and dynamically adjust the light source parameters based on the comparison result; Photograph a standard color card of known color, compare the color values ​​captured by the camera with the standard color values ​​of the color card, establish a color mapping relationship, and adjust the color parameters based on the color mapping relationship.

[0015] Optionally, in the high-resolution machine vision inspection system for precise color difference detection described in the embodiment of the present application, setting shooting parameters based on a calibrated camera, acquiring a workpiece image in real time, and preprocessing the workpiece image to obtain a preprocessed image specifically include: Setting shooting parameters, including exposure time, aperture size and gain value; Turn on the camera and light source, and shoot the workpiece in real time based on the set shooting parameters to obtain the workpiece image; Based on the filtering algorithm, the noise in the workpiece image is removed to obtain a de-noised image; The denoised image is linearized and white balanced to obtain a preprocessed image.

[0016] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, which includes a high-resolution machine vision detection method program for precise color difference detection. When the high-resolution machine vision detection method program for precise color difference detection is executed by a processor, the steps of the high-resolution machine vision detection method for precise color difference detection as described in any one of the above items are implemented.

[0017] As can be seen from the above, the embodiments of the present application provide a high-resolution machine vision detection method, system and medium for precise color difference detection, which calibrates the internal and external parameters of the camera based on a camera calibration tool, and synchronously calibrates the light source parameters and color parameters to obtain a calibrated camera; sets shooting parameters based on the calibrated camera, acquires the workpiece image in real time, and preprocesses the workpiece image to obtain a preprocessed image; maps the preprocessed image from the original RGB space to the standard color space, and extracts the color features of the preprocessed image; compares the color features with the color features of the standard sample, calculates the color difference index, and analyzes whether the color of the preprocessed image is qualified based on the set color difference threshold and the color difference index to obtain the detection result; analyzes the abnormal color distribution trend and abnormal situation of the preprocessed image based on the detection result; ensures the accuracy of visual detection by calibrating various parameters of the camera, and in addition, accurately analyzes the color abnormality area by mapping the workpiece image to the color space and analyzing the difference between the color difference index of the color feature and the color difference threshold, thereby improving the detection accuracy of abnormal colors. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 A flowchart of a high-resolution machine vision inspection method for precise color difference detection provided in an embodiment of the present application; Figure 2A flow chart of a camera parameter calibration method for a high-resolution machine vision inspection method for precise color difference detection provided in an embodiment of the present application; Figure 3 A flow chart of a workpiece image preprocessing method for a high-resolution machine vision inspection method for precise color difference detection provided in an embodiment of the present application; Figure 4 This is a block diagram of a workpiece image preprocessing system for a high-resolution machine vision inspection method for precise color difference detection provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work fall within the scope of protection of the present application.

[0021] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.

[0022] Please refer to Figure 1 , Figure 1 This is a flow chart of a high-resolution machine vision detection method for precise color difference detection in some embodiments of the present application. The high-resolution machine vision detection method for precise color difference detection is used in a terminal device and includes the following steps: S101, calibrating internal and external parameters of a camera based on a camera calibration tool, and simultaneously calibrating light source parameters and color parameters to obtain a calibrated camera; S102, setting shooting parameters based on the calibrated camera, acquiring a workpiece image in real time, and preprocessing the workpiece image to obtain a preprocessed image; S103, mapping the preprocessed image from the original RGB space to a standard color space, and extracting color features of the preprocessed image; S104, comparing the color features with the color features of the standard sample, calculating the color difference index, comparing the color difference index with the set color difference threshold, analyzing whether the color of the preprocessed image is qualified, and obtaining the detection result; S105 , analyzing abnormal color distribution trends and abnormal conditions of the pre-processed image based on the detection results.

[0023] Please refer to Figure 2 , Figure 2 This is a flow chart of a camera parameter calibration method for a high-resolution machine vision inspection method for precise color difference detection in some embodiments of the present application. According to an embodiment of the present invention, calibrating the camera's internal and external parameters using a camera calibration tool, and simultaneously calibrating the light source parameters and color parameters to obtain a calibrated camera, specifically includes: S201, based on a calibration pattern of known size and shape, capturing images of the standard pattern at multiple angles using a camera; S202, calibrating camera internal and external parameters based on the relationship between feature points of the pattern in the image and corresponding points in the actual object; S203, obtaining light intensity and color distribution measurement values ​​based on measuring the light intensity and color distribution of the light source at different positions and angles; S204, comparing the measured value with the standard value to obtain a comparison result, and dynamically adjusting the light source parameters based on the comparison result; S205 , photographing a standard color card of known color, comparing the color value captured by the camera with the standard color value of the color card, establishing a color mapping relationship, and adjusting color parameters according to the color mapping relationship.

[0024] It's important to note the principle behind camera intrinsic parameter calibration: Camera intrinsic parameters primarily include focal length, principal point coordinates, and pixel size. These parameters determine the geometric relationships and optical properties of camera imaging. By capturing a calibration pattern of known size and shape (such as a checkerboard), a mathematical model is established using the relationship between the pattern's characteristic points in the image and corresponding points in the physical world to determine the camera's intrinsic parameters.

[0025] The steps for calibrating the camera's internal parameters are as follows: Take multiple images of the calibration pattern at different angles and positions. Place the checkerboard in different positions and postures to ensure the camera can capture the complete and clear pattern. Generally, you need to take at least 8-10 images at different postures.

[0026] Extract feature points from the image. Use image processing algorithms, such as the Harris corner detection algorithm, to find corner points in the checkerboard image. The coordinates of these corner points in the image will serve as the basis for subsequent calculations.

[0027] Parameter calculation is performed based on feature points. Using optimization algorithms such as the least squares method, the camera's internal parameter equations are solved to obtain the camera's focal length, principal point coordinates, and other parameter values.

[0028] Camera extrinsic parameter calibration principle: Camera extrinsic parameters describe the camera's position and attitude in the world coordinate system. They include a translation vector (representing the camera's position in the world coordinate system) and a rotation matrix (representing the camera's attitude). Given the known camera intrinsic parameters and a captured calibration pattern image, the extrinsic parameters can be determined by calculating the projective relationship between the 3D coordinates of spatial points and the image plane coordinates.

[0029] The steps for camera external parameter calibration are as follows: The correspondence between image points and world points is established using the extracted feature points in the calibration pattern image and the known three-dimensional model of the calibration pattern.

[0030] According to the camera imaging model and projection principle, a set of equations including external parameters is constructed.

[0031] Through nonlinear optimization algorithms, such as the Levenberg-Marquardt algorithm, the equations are iteratively solved to obtain the camera's translation vector and rotation matrix, thereby determining the camera's position and posture in the world coordinate system.

[0032] Light source parameter calibration principle: Light source parameters such as intensity, color temperature, and uniformity affect image quality and color accuracy. By measuring the light source's intensity and color distribution at different positions and angles and comparing them with standard values, relevant light source parameters are adjusted to ensure stable and uniform illumination.

[0033] The steps for light source parameter calibration are as follows: Use a professional light meter and spectrometer to measure the intensity and color spectrum of the light source at multiple locations within the camera's field of view.

[0034] Compare the measured values ​​with pre-set standard values ​​to analyze the unevenness and deviation of light source intensity and color.

[0035] According to the analysis results, adjust the brightness and color temperature adjustment knobs of the light source or adjust related parameters through the software control interface to make the intensity and color of the light source uniform and meet the requirements throughout the entire shooting area.

[0036] Color Calibration Principle: Color calibration ensures that the camera accurately captures and reproduces real-world colors. By photographing a standard color chart of known color, the color values ​​captured by the camera are compared with the standard color values ​​on the chart to establish a color mapping relationship, thereby adjusting and optimizing the camera's color parameters.

[0037] The steps for color parameter calibration are as follows: Place the standard color card within the camera's shooting range, making sure the surface of the card is flat and the lighting is even.

[0038] Capture a color card image and obtain the color value of each color block in the image, usually expressed in a color space such as RGB or CIE Lab*.

[0039] Compare the collected color values ​​with the standard color values ​​of the color card and calculate the color error.

[0040] Based on the color error, the color parameters are adjusted through the camera's color correction algorithm or lookup table (LUT) to make the colors captured by the camera closer to the real colors.

[0041] Please refer to Figure 3 , Figure 3 This is a flowchart of a workpiece image preprocessing method for a high-resolution machine vision inspection method for precision color difference detection in some embodiments of the present application. According to an embodiment of the present invention, based on a calibrated camera, shooting parameters are set, a workpiece image is acquired in real time, and the workpiece image is preprocessed to obtain a preprocessed image, specifically including: S301, setting shooting parameters, which include exposure time, aperture size and gain value; S302, turning on the camera and the light source, and photographing the workpiece in real time based on the set shooting parameters to obtain an image of the workpiece; S303, removing noise from the workpiece image based on a filtering algorithm to obtain a de-noised image; S304: Perform linearization and white balance processing on the noise reduction image to obtain a pre-processed image.

[0042] It should be noted that filtering algorithms are used to remove noise from images. Common filtering methods include mean filtering, median filtering, and Gaussian filtering. Mean filtering calculates the average value of a pixel's neighborhood and replaces the current pixel value. This effectively reduces random noise, but can blur image details. Median filtering replaces the current pixel value with the median value of the neighborhood, effectively suppressing salt-and-pepper noise while effectively preserving image edges. Gaussian filtering performs a weighted average of pixels within a neighborhood using a Gaussian function, effectively removing noise while maintaining image smoothness. The appropriate filtering method should be selected based on the noise characteristics of the image. The principle of image linearization processing involves the fact that there is often a nonlinear relationship between the output signal of an image sensor and the incident light intensity, which can affect subsequent color analysis and processing. The goal of linearization processing is to establish a linear mapping between image pixel values ​​and actual light intensity, eliminating the sensor's nonlinear response and ensuring that the image data accurately reflects the scene's light intensity and color information.

[0043] White balance processing works because different light sources (such as sunlight, incandescent lamps, and fluorescent lamps) have different spectral characteristics, which can cause color casts in images. The goal of white balance processing is to eliminate this color shift caused by light source differences, making white objects appear truly white in the image while maintaining the natural reproduction of other colors.

[0044] Specifically, the image linearization processing formula is as follows: Assume that the original acquisition channel signal is: , Represents the original signal of the red channel (Signal of Red channel); Represents the original signal of the green channel (Signal of Green channel); The original signal of the blue channel (Signal of Blue channel).

[0045] After linearization, we get: , Represents the original acquisition channel signal (raw pixel value) at the image coordinate position (x, y). It is an unprocessed image signal that comes directly from the camera sensor; Represents the pixel value after linearization; represents the channel gain coefficient, ; Indicates channel offset.

[0046] According to an embodiment of the present invention, mapping the preprocessed image from the original RGB space to the standard color space and extracting the color features of the preprocessed image specifically includes: Select a standard color space and convert the original RGB values ​​into linear RGB based on the preprocessed image through inverse camera response correction; Standard color spaces include CIE XYZ color space and CIE Lab* color space; Map linear RGB to CIE XYZ color space; Based on the CIE XYZ color space mapping to CIE Lab*, nonlinear transformation is performed; Features are extracted from the preprocessed image after nonlinear transformation to obtain color features, which include global color features and local color features.

[0047] It should be noted that the linear RGB is mapped to the CIE XYZ color space, and the calculation formula is as follows: , Represents the red channel signal after linearization at point (x, y), which is obtained by Normalized red channel value after linear transformation (such as gain and offset correction); Represents the green channel signal after linearization processing; Represents the blue channel signal after linearization processing, which is the original blue signal The output after calibration.

[0048] Among them, the transformation matrix from linear RGB to CIE XYZ Depends on standard light source and camera calibration parameters.

[0049] The formula for converting CIE XYZ to CIE Lab* is as follows: Assume the reference white point is ,but: , , , function Defined as: ; Represents the nonlinear transformation from XYZ to Lab*, which is used to simulate the nonlinear perception of brightness by the human eye. t is the intermediate variable used in the nonlinear transformation. CIE XYZ is a standard color space defined by the International Commission on Illumination (CIE). , , Represents the tristimulus values ​​of a pixel in CIE XYZ space; that is, for each pixel in the image, its corresponding X, Y, ZX, Y, ZX, Y, ZZ values ​​can be calculated. These values ​​are then used for subsequent conversion to CIE Lab*, which is closer to human perception, or for calculating color differences (such as ΔE).

[0050] Where: X represents the stimulus value related to the red component; Y represents the luminance; Z represents the stimulus value related to the blue component; Represents the brightness component of a pixel in Lab* space.

[0051] According to an embodiment of the present invention, analyzing whether the color of the pre-processed image is qualified and obtaining a detection result specifically includes: For the preprocessed image and the standard sample image, feature extraction is performed on the preprocessed image and the standard sample image respectively to obtain color features of the preprocessed image and color features of the standard sample image; Compare the color features of the preprocessed image with those of the standard sample image and calculate the color difference index; According to different application scenarios and quality requirements, set the color difference threshold, and compare the calculated color difference index with the set color difference threshold; If the color difference index is less than or equal to the threshold, it is determined that the color difference between the preprocessed image and the standard sample is normal and the color is qualified; If the color difference index is greater than the threshold, it means that the color difference exceeds the allowable range and the color is unqualified; According to the color difference comparison analysis results, the test results are obtained and a test report is generated.

[0052] It should be noted that color features are extracted separately for the preprocessed image and the standard sample image. Common color spaces, such as CIE Lab*, describe color features by calculating information such as the image's brightness (L*), red-green difference (a*), and yellow-blue difference (b*) within that color space. For example, for an image, the L*, a*, and b* values ​​of each pixel can be calculated to obtain color features for the entire image, such as the mean and variance of each channel.

[0053] Based on the results of the comparative analysis, a test report is generated. This report should include basic information about the preprocessed image (such as its ID and capture time), information about the standard sample, the calculated color difference index, the set color difference threshold, and the final test conclusion (pass or fail). Furthermore, further analysis can be performed on failed cases, such as identifying the channels where color differences primarily manifest, providing a reference for subsequent production improvements.

[0054] Specifically, color difference calculation ( The formula is as follows: Standard color( ) and detection color( ) color difference: , In the formula Indicates color index, reflecting the degree of color proximity. Indicates the brightness of the measured color, Indicates standard color brightness, Indicates the red and green channels of the measured color. Standard color red and green channels, Indicates the yellow and blue channels of the measured color. Represents the standard color yellow and blue channels.

[0055] According to an embodiment of the present invention, analyzing abnormal color distribution trends and abnormal conditions of the preprocessed image based on the detection results specifically includes: Obtain color features, perform statistical analysis on the color features of the preprocessed image, and obtain color feature values ​​of different color channels; Calculate the mean and standard deviation of the color feature values ​​of different color channels and analyze the overall distribution of colors; The pre-processed image is divided into regions based on image segmentation technology to obtain multiple sub-regions; Analyze the color characteristics of different sub-regions and observe the spatial distribution trend of colors; Based on the spatial distribution trend of the color, determine whether there is color gradient and patchiness, and obtain the judgment result; Based on the judgment results, the color difference distribution is analyzed, the abnormal color area in the image is located, and the type of abnormal color is determined according to the color characteristics and color difference indicators.

[0056] It's important to note that the color features of the preprocessed image are compared with those of the standard sample, and color difference metrics (such as ΔEab and ΔE00) are calculated. If the color difference exceeds a set threshold, a color anomaly is considered present. For example, when inspecting the color of an electronic product casing, a significant color difference between the sample image and the standard sample could indicate a problem with the casing's coating, such as an improper paint formulation or unstable coating process.

[0057] By analyzing the distribution of color differences, we can locate abnormal color regions in the image. Image morphological operations (such as dilation and erosion) can be used to enhance the boundaries of abnormal regions, making them easier to identify. For example, when detecting the color of textiles, if certain areas have large color differences, locating these abnormal areas can further analyze the cause of the anomaly, such as uneven dyeing process or differences in dye quality.

[0058] The type of abnormal color is determined based on color characteristics and color difference indicators. For example, if the color difference is mainly reflected in the brightness (L*) channel, it may be caused by changes in lighting conditions, different surface roughness of the workpiece, etc.; if the color difference is mainly reflected in the color (a*, b*) channels, it may be due to color differences in raw materials such as dyes and coatings, or improper color adjustment during the processing process.

[0059] In addition to color characteristics, a comprehensive analysis is conducted based on other workpiece information, such as material, production process, and environmental conditions. For example, when testing the color of a metal workpiece, the influence of factors such as the metal material and heat treatment process on the color is considered. If a metal workpiece exhibits abnormal color after heat treatment, it may be due to improper settings of heat treatment parameters such as temperature and time, or the color change may be caused by varying degrees of oxidation on the metal surface.

[0060] Specifically, the image is divided into For small areas, the mean and standard deviation of ΔE are calculated independently for each area. If it exceeds the set threshold, , marked as the color difference abnormal area, the calculation formula is as follows: , Represents the average color difference value of the pixel in the i-th row and j-th column of the image; Represents the color difference residual or error value of the pixel in the i-th row and j-th column in the image, which can be used to further analyze the degree of difference between the error of the point and the expected color difference, or represent the reconstruction error in some algorithms; Indicates the number of pixels in the sub-region where the pixel in the i-th row and j-th column is located; Indicates the color difference value at the image coordinate (x, y) in the CIE Lab* color space.

[0061] Please refer to 4, Figure 4 This is a block diagram of a high-resolution machine vision inspection system for precise color difference detection in some embodiments of the present application. In a second aspect, embodiments of the present application provide a high-resolution machine vision inspection system for precise color difference detection, comprising: a memory and a processor, wherein the memory includes a program for a high-resolution machine vision inspection method for precise color difference detection, and when the program for a high-resolution machine vision inspection method for precise color difference detection is executed by the processor, the following steps are implemented: Calibrate the camera's internal and external parameters based on the camera calibration tool, and simultaneously calibrate the light source parameters and color parameters to obtain a calibrated camera; Setting shooting parameters based on the calibrated camera, acquiring workpiece images in real time, and preprocessing the workpiece images to obtain preprocessed images; Map the preprocessed image from the original RGB space to the standard color space and extract the color features of the preprocessed image; Compare the color features with those of the standard sample, calculate the color difference index, compare the color difference index with the set color difference threshold, analyze whether the color of the preprocessed image is qualified, and obtain the detection result; Based on the detection results, the abnormal color distribution trends and abnormal conditions of the preprocessed images are analyzed.

[0062] According to an embodiment of the present invention, calibrating the internal and external parameters of a camera based on a camera calibration tool, and simultaneously calibrating the light source parameters and color parameters to obtain a calibrated camera specifically includes: Based on a calibration pattern of known size and shape, the camera takes images of the standard pattern at multiple angles; Calibrate the camera's internal and external parameters based on the relationship between the feature points of the pattern in the image and the corresponding points in the real object; Based on measuring the light intensity and color distribution of the light source at different positions and angles, the light intensity and color distribution measurement values ​​are obtained; Compare the measured value with the standard value to obtain a comparison result, and dynamically adjust the light source parameters based on the comparison result; Photograph a standard color card of known color, compare the color values ​​captured by the camera with the standard color values ​​of the color card, establish a color mapping relationship, and adjust the color parameters based on the color mapping relationship.

[0063] It's important to note the principle behind camera intrinsic parameter calibration: Camera intrinsic parameters primarily include focal length, principal point coordinates, and pixel size. These parameters determine the geometric relationships and optical properties of camera imaging. By capturing a calibration pattern of known size and shape (such as a checkerboard), a mathematical model is established using the relationship between the pattern's characteristic points in the image and corresponding points in the physical world to determine the camera's intrinsic parameters.

[0064] The steps for calibrating the camera's internal parameters are as follows: Take multiple images of the calibration pattern at different angles and positions. Place the checkerboard in different positions and postures to ensure the camera can capture the complete and clear pattern. Generally, you need to take at least 8-10 images in different postures. Extract feature points from the image. Use image processing algorithms, such as the Harris corner detection algorithm, to find corner points in the checkerboard image. The coordinates of these corner points in the image will serve as the basis for subsequent calculations. Parameter calculation based on feature points. Solve the equations of the camera's internal parameters through optimization algorithms such as the least squares method to obtain the camera's focal length, principal point coordinates and other parameter values; Camera extrinsic parameter calibration principle: Camera extrinsic parameters describe the camera's position and attitude in the world coordinate system. They include a translation vector (representing the camera's position in the world coordinate system) and a rotation matrix (representing the camera's attitude). Given the known camera intrinsic parameters and a captured calibration pattern image, the extrinsic parameters can be determined by calculating the projective relationship between the 3D coordinates of spatial points and the image plane coordinates.

[0065] The steps for camera external parameter calibration are as follows: Using the extracted feature points in the calibration pattern image and the known 3D model of the calibration pattern, a correspondence between the image points and the world points is established; According to the camera imaging model and projection principle, a set of equations including external parameters is constructed; Through nonlinear optimization algorithms, such as the Levenberg-Marquardt algorithm, the equations are iteratively solved to obtain the camera's translation vector and rotation matrix, thereby determining the camera's position and posture in the world coordinate system; Light source parameter calibration principle: Light source parameters such as intensity, color temperature, and uniformity affect image quality and color accuracy. By measuring the light source's intensity and color distribution at different positions and angles and comparing them with standard values, relevant light source parameters are adjusted to ensure stable and uniform illumination.

[0066] The steps for light source parameter calibration are as follows: Use a professional light meter and spectrometer to measure the intensity and color spectrum of the light source at multiple locations within the camera's capture area; Compare the measured values ​​with the preset standard values ​​to analyze the unevenness and deviation of the light source intensity and color; Based on the analysis results, adjust the brightness and color temperature knobs of the light source or adjust related parameters through the software control interface to make the intensity and color of the light source uniform and meet the requirements throughout the entire shooting area; Color Calibration Principle: Color calibration ensures that the camera accurately captures and reproduces real-world colors. By photographing a standard color chart of known color, the color values ​​captured by the camera are compared with the standard color values ​​on the chart to establish a color mapping relationship, thereby adjusting and optimizing the camera's color parameters.

[0067] The steps for color parameter calibration are as follows: Place the standard color card within the camera's shooting range, ensuring that the surface of the card is flat and the lighting is even; Capture a color chart image and obtain the color value of each color block in the image, usually expressed in a color space such as RGB or CIE Lab*; Compare the collected color values ​​with the standard color values ​​of the color card and calculate the color error; Based on the color error, the color parameters are adjusted through the camera's color correction algorithm or lookup table (LUT) to make the colors captured by the camera closer to the real colors.

[0068] According to an embodiment of the present invention, setting shooting parameters based on a calibrated camera, acquiring a workpiece image in real time, and preprocessing the workpiece image to obtain a preprocessed image specifically include: Set the shooting parameters, including exposure time, aperture size and gain value; Turn on the camera and light source, and shoot the workpiece in real time based on the set shooting parameters to obtain the workpiece image; Based on the filtering algorithm, the noise in the workpiece image is removed to obtain a de-noised image; The denoised image is linearized and white balanced to obtain a preprocessed image.

[0069] It should be noted that filtering algorithms are used to remove noise from images. Common filtering methods include mean filtering, median filtering, and Gaussian filtering. Mean filtering calculates the average value of a pixel's neighborhood and replaces the current pixel value. This effectively reduces random noise, but can blur image details. Median filtering replaces the current pixel value with the median value of the neighborhood, effectively suppressing salt-and-pepper noise while effectively preserving image edges. Gaussian filtering performs a weighted average of pixels within a neighborhood using a Gaussian function, effectively removing noise while maintaining image smoothness. The appropriate filtering method should be selected based on the noise characteristics of the image. The principle of image linearization processing involves the fact that there is often a nonlinear relationship between the output signal of an image sensor and the incident light intensity, which can affect subsequent color analysis and processing. The goal of linearization processing is to establish a linear mapping between image pixel values ​​and actual light intensity, eliminating the sensor's nonlinear response and ensuring that the image data accurately reflects the scene's light intensity and color information.

[0070] White balance processing works because different light sources (such as sunlight, incandescent lamps, and fluorescent lamps) have different spectral characteristics, which can cause color casts in images. The goal of white balance processing is to eliminate this color shift caused by light source differences, making white objects appear truly white in the image while maintaining the natural reproduction of other colors.

[0071] Specifically, the image linearization processing formula is as follows: Assume that the original acquisition channel signal is: , After linearization, we get: , : channel gain coefficient; : channel bias; .

[0072] According to an embodiment of the present invention, mapping the preprocessed image from the original RGB space to the standard color space and extracting the color features of the preprocessed image specifically includes: Select a standard color space and convert the original RGB values ​​into linear RGB based on the preprocessed image through inverse camera response correction; Standard color spaces include CIE XYZ color space and CIE Lab* color space; Map linear RGB to CIE XYZ color space; Nonlinear transformation based on mapping CIE XYZ color space to CIE Lab*; Features are extracted from the preprocessed image after nonlinear transformation to obtain color features, which include global color features and local color features.

[0073] It should be noted that the linear RGB is mapped to the CIE XYZ color space, and the calculation formula is as follows: , where the transformation matrix Depends on standard light source and camera calibration parameters.

[0074] The formula for converting CIE XYZ to CIE Lab* is as follows: Assume the reference white point is ,but: , , , function Defined as: .

[0075] According to an embodiment of the present invention, analyzing whether the color of the pre-processed image is qualified and obtaining a detection result specifically includes: For the preprocessed image and the standard sample image, feature extraction is performed on the preprocessed image and the standard sample image respectively to obtain color features of the preprocessed image and color features of the standard sample image; Compare the color features of the preprocessed image with those of the standard sample image and calculate the color difference index; According to different application scenarios and quality requirements, set the color difference threshold, and compare the calculated color difference index with the set color difference threshold; If the color difference index is less than or equal to the threshold, it is determined that the color difference between the preprocessed image and the standard sample is normal and the color is qualified; If the color difference index is greater than the threshold, it means that the color difference exceeds the allowable range and the color is unqualified; According to the color difference comparison analysis results, the test results are obtained and a test report is generated.

[0076] It should be noted that color features are extracted separately for the preprocessed image and the standard sample image. Common color spaces, such as CIE Lab*, describe color features by calculating information such as the image's brightness (L*), red-green difference (a*), and yellow-blue difference (b*) within that color space. For example, for an image, the L*, a*, and b* values ​​of each pixel can be calculated to obtain color features for the entire image, such as the mean and variance of each channel.

[0077] Based on the results of the comparative analysis, a test report is generated. This report should include basic information about the preprocessed image (such as its ID and capture time), information about the standard sample, the calculated color difference index, the set color difference threshold, and the final test conclusion (pass or fail). Furthermore, further analysis can be performed on failed cases, such as identifying the channels where color differences primarily manifest, providing a reference for subsequent production improvements.

[0078] Specifically, color difference calculation ( The formula is as follows: Standard color( ) and detection color( ) color difference: .

[0079] According to an embodiment of the present invention, analyzing abnormal color distribution trends and abnormal conditions of the preprocessed image based on the detection results specifically includes: Obtain color features, perform statistical analysis on the color features of the preprocessed image, and obtain color feature values ​​of different color channels; Calculate the mean and standard deviation of the color feature values ​​of different color channels and analyze the overall distribution of colors; The pre-processed image is divided into regions based on image segmentation technology to obtain multiple sub-regions; Analyze the color characteristics of different sub-regions and observe the spatial distribution trend of colors; Based on the spatial distribution trend of the color, determine whether there is color gradient and patchiness, and obtain the judgment result; Based on the judgment results, the color difference distribution is analyzed, the abnormal color area in the image is located, and the type of abnormal color is determined according to the color characteristics and color difference indicators.

[0080] It's important to note that the color features of the preprocessed image are compared with those of the standard sample, and color difference metrics (such as ΔEab and ΔE00) are calculated. If the color difference exceeds a set threshold, a color anomaly is considered present. For example, when inspecting the color of an electronic product casing, a significant color difference between the sample image and the standard sample could indicate a problem with the casing's coating, such as an improper paint formulation or unstable coating process.

[0081] By analyzing the distribution of color differences, we can locate abnormal color regions in the image. Image morphological operations (such as dilation and erosion) can be used to enhance the boundaries of abnormal regions, making them easier to identify. For example, when detecting the color of textiles, if certain areas have large color differences, locating these abnormal areas can further analyze the cause of the anomaly, such as uneven dyeing process or differences in dye quality.

[0082] The type of abnormal color is determined based on color characteristics and color difference indicators. For example, if the color difference is mainly reflected in the brightness (L*) channel, it may be caused by changes in lighting conditions, different surface roughness of the workpiece, etc.; if the color difference is mainly reflected in the color (a*, b*) channels, it may be due to color differences in raw materials such as dyes and coatings, or improper color adjustment during the processing process.

[0083] In addition to color characteristics, a comprehensive analysis is conducted based on other workpiece information, such as material, production process, and environmental conditions. For example, when testing the color of a metal workpiece, the influence of factors such as the metal material and heat treatment process on the color is considered. If a metal workpiece exhibits abnormal color after heat treatment, it may be due to improper settings of heat treatment parameters such as temperature and time, or the color change may be caused by varying degrees of oxidation on the metal surface.

[0084] Specifically, the image is divided into For small areas, the mean and standard deviation of ΔE are calculated independently for each area. If it exceeds the set threshold, , marked as the color difference abnormal area, the calculation formula is as follows: .

[0085] The third aspect of the present invention provides a computer-readable storage medium, which includes a high-resolution machine vision detection method program for precise color difference detection. When the high-resolution machine vision detection method program for precise color difference detection is executed by a processor, the steps of the high-resolution machine vision detection method for precise color difference detection as described in any one of the above items are implemented.

[0086] The present invention discloses a high-resolution machine vision detection method, system and medium for precise color difference detection. The method comprises the following steps: calibrating the internal and external parameters of a camera based on a camera calibration tool, and synchronously calibrating the light source parameters and color parameters to obtain a calibrated camera; setting shooting parameters based on the calibrated camera, acquiring a workpiece image in real time, and preprocessing the workpiece image to obtain a preprocessed image; mapping the preprocessed image from the original RGB space to the standard color space, and extracting the color features of the preprocessed image; comparing the color features with the color features of a standard sample, calculating a color difference index, and comparing the color difference index with a set color difference threshold to analyze whether the color of the preprocessed image is qualified to obtain a detection result; analyzing the abnormal color distribution trend and abnormal conditions of the preprocessed image based on the detection result; ensuring the accuracy of visual detection by calibrating various parameters of the camera, and accurately analyzing the color abnormality area by mapping the workpiece image to the color space and analyzing the difference between the color difference index of the color feature and the color difference threshold, thereby improving the detection accuracy of abnormal colors.

[0087] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0088] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0089] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0090] Those skilled in the art will appreciate that all or part of the steps of the above-mentioned method embodiments may be implemented by hardware associated with program instructions, and the aforementioned program may be stored in a readable storage medium. When the program is executed, the program executes the steps of the above-mentioned method embodiments. The aforementioned storage medium includes various media that can store program codes, such as mobile storage devices, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.

[0091] Alternatively, if the integrated units described above are implemented as software modules and sold or used as standalone products, they can also be stored on a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This software product, stored on a storage medium, includes instructions for enabling a computer device (such as a personal computer, server, or network device) to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage media include various media capable of storing program code, such as removable storage devices, ROM, RAM, magnetic disks, or optical disks.

Claims

1. A high-resolution machine vision detection method for precise color difference detection, characterized in that: include: Calibrate the camera's internal and external parameters based on the camera calibration tool, and simultaneously calibrate the light source parameters and color parameters to obtain a calibrated camera; Setting shooting parameters based on the calibrated camera, acquiring workpiece images in real time, and preprocessing the workpiece images to obtain preprocessed images; Map the preprocessed image from the original RGB space to the standard color space and extract the color features of the preprocessed image; Compare the color features with those of the standard sample, calculate the color difference index, compare the color difference index with the set color difference threshold, analyze whether the color of the preprocessed image is qualified, and obtain the detection result; Based on the detection results, the abnormal color distribution trends and abnormal conditions of the preprocessed images are analyzed.

2. The high-resolution machine vision detection method for precise color difference detection according to claim 1, characterized in that: Calibrate the camera's internal and external parameters using the camera calibration tool, and simultaneously calibrate the light source and color parameters to obtain a calibrated camera. This includes: Based on a calibration pattern of known size and shape, the camera takes images of the standard pattern at multiple angles; Calibrate the camera's internal and external parameters based on the relationship between the feature points of the pattern in the image and the corresponding points in the real object; Based on measuring the light intensity and color distribution of the light source at different positions and angles, the light intensity and color distribution measurement values ​​are obtained; Compare the measured value with the standard value to obtain a comparison result, and dynamically adjust the light source parameters based on the comparison result; Photograph a standard color card of known color, compare the color values ​​captured by the camera with the standard color values ​​of the color card, establish a color mapping relationship, and adjust the color parameters based on the color mapping relationship.

3. The high-resolution machine vision detection method for precise color difference detection according to claim 2, characterized in that: Based on the calibrated camera, shooting parameters are set to obtain the workpiece image in real time, and the workpiece image is preprocessed to obtain a preprocessed image, which specifically includes: Setting shooting parameters, including exposure time, aperture size and gain value; Turn on the camera and light source, and shoot the workpiece in real time based on the set shooting parameters to obtain the workpiece image; Based on the filtering algorithm, the noise in the workpiece image is removed to obtain a de-noised image; The denoised image is linearized and white balanced to obtain a preprocessed image.

4. The high-resolution machine vision detection method for precise color difference detection according to claim 3, characterized in that: Map the preprocessed image from the original RGB space to the standard color space and extract the color features of the preprocessed image, including: Select a standard color space and convert the original RGB values ​​into linear RGB based on the preprocessed image through inverse camera response correction; The standard color space includes CIE XYZ color space and CIE Lab* color space; Map linear RGB to CIE XYZ color space; Nonlinear transformation based on mapping CIE XYZ color space to CIE Lab*; Features are extracted from the preprocessed image after nonlinear transformation to obtain color features, which include global color features and local color features.

5. The high-resolution machine vision detection method for precise color difference detection according to claim 4, characterized in that: Analyze whether the color of the pre-processed image is qualified and obtain the test results, including: For the preprocessed image and the standard sample image, feature extraction is performed on the preprocessed image and the standard sample image respectively to obtain color features of the preprocessed image and color features of the standard sample image; Compare the color features of the preprocessed image with those of the standard sample image and calculate the color difference index; According to different application scenarios and quality requirements, set the color difference threshold, and compare the calculated color difference index with the set color difference threshold; If the color difference index is less than or equal to the threshold, it is determined that the color difference between the preprocessed image and the standard sample is normal and the color is qualified; If the color difference index is greater than the threshold, it means that the color difference exceeds the allowable range and the color is unqualified; According to the color difference comparison analysis results, the test results are obtained and a test report is generated.

6. The high-resolution machine vision detection method for precise color difference detection according to claim 5, characterized in that: Analyze the abnormal color distribution trend and abnormal conditions of the preprocessed image based on the detection results, including: Obtain color features, perform statistical analysis on the color features of the preprocessed image, and obtain color feature values ​​of different color channels; Calculate the mean and standard deviation of the color feature values ​​of different color channels and analyze the overall distribution of colors; The pre-processed image is divided into regions based on image segmentation technology to obtain multiple sub-regions; Analyze the color characteristics of different sub-regions and observe the spatial distribution trend of colors; Based on the spatial distribution trend of the color, determine whether there is color gradient and patchiness, and obtain the judgment result; Based on the judgment results, the color difference distribution is analyzed, the abnormal color area in the image is located, and the type of abnormal color is determined according to the color characteristics and color difference indicators.

7. A high-resolution machine vision inspection system for precise color difference detection, characterized in that: The system includes: a memory and a processor, wherein the memory includes a program of a high-resolution machine vision detection method for precise color difference detection, and when the program of the high-resolution machine vision detection method for precise color difference detection is executed by the processor, the following steps are implemented: Calibrate the camera's internal and external parameters based on the camera calibration tool, and simultaneously calibrate the light source parameters and color parameters to obtain a calibrated camera; Setting shooting parameters based on the calibrated camera, acquiring workpiece images in real time, and preprocessing the workpiece images to obtain preprocessed images; Map the preprocessed image from the original RGB space to the standard color space and extract the color features of the preprocessed image; Compare the color features with those of the standard sample, calculate the color difference index, compare the color difference index with the set color difference threshold, analyze whether the color of the preprocessed image is qualified, and obtain the detection result; Based on the detection results, the abnormal color distribution trends and abnormal conditions of the preprocessed images are analyzed.

8. The high-resolution machine vision inspection system for precise color difference detection according to claim 7, characterized in that: Calibrate the camera's internal and external parameters using the camera calibration tool, and simultaneously calibrate the light source and color parameters to obtain a calibrated camera. This includes: Based on a calibration pattern of known size and shape, the camera takes images of the standard pattern at multiple angles; Calibrate the camera's internal and external parameters based on the relationship between the feature points of the pattern in the image and the corresponding points in the real object; Based on measuring the light intensity and color distribution of the light source at different positions and angles, the light intensity and color distribution measurement values ​​are obtained; Compare the measured value with the standard value to obtain a comparison result, and dynamically adjust the light source parameters based on the comparison result; Photograph a standard color card of known color, compare the color values ​​captured by the camera with the standard color values ​​of the color card, establish a color mapping relationship, and adjust the color parameters based on the color mapping relationship.

9. The high-resolution machine vision inspection system for precise color difference detection according to claim 8, characterized in that: Based on the calibrated camera, shooting parameters are set to obtain the workpiece image in real time, and the workpiece image is preprocessed to obtain a preprocessed image, which specifically includes: Setting shooting parameters, including exposure time, aperture size and gain value; Turn on the camera and light source, and shoot the workpiece in real time based on the set shooting parameters to obtain the workpiece image; Based on the filtering algorithm, the noise in the workpiece image is removed to obtain a de-noised image; The denoised image is linearized and white balanced to obtain a preprocessed image.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a high-resolution machine vision detection method program for precise color difference detection. When the high-resolution machine vision detection method program for precise color difference detection is executed by a processor, the steps of the high-resolution machine vision detection method for precise color difference detection as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Image color correcting method and device

    CN103905803A

  • Method, system and device for detecting color difference based on machine vision and storage medium

    CN109141640A

  • Color difference adaptive online detection method and device based on SLIC super pixel segmentation

    CN110108362A

  • Cloth color difference intelligent detection method based on improved vision algorithm

    CN119648814A

  • Method and device for image color correction applicable in endoscope, and storage medium

    WO2021031458A1

Cited By

  • Medicinal material quality surface image detection processing method and system

    CN121883912A

  • Digital printing image color detection method and system

    CN122049074A

  • A method and system for digital print image color detection

    CN122049074B

  • White cloth color deviation detection method and system based on virtual target color calibration

    CN122361292A