Camera quality detection method and device based on image detection and medium
By acquiring multiple frames of image data and performing geometric alignment and intensity normalization, combined with joint inversion and metamerism separation index correction, the problem of distinguishing optical characteristics from noise factors and color consistency in existing camera quality inspection is solved, improving the accuracy and stability of the inspection, and achieving standardization and traceability of the results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-15
- Publication Date
- 2026-03-20
AI Technical Summary
Existing image detection-based camera quality inspection methods cannot accurately distinguish between optical characteristics and noise factors, and traditional methods cannot effectively reduce color consistency problems, resulting in insufficient stability and limited accuracy of the inspection results.
By acquiring multiple frames of image data and image data of metamerism color patch regions, geometric alignment and intensity normalization are performed to obtain standardized image data. Joint inversion is used to obtain potential reference maps and mechanism parameter vectors, metamerism separation index is calculated and color parameter correction is performed. Finally, the results are compared with preset index thresholds to obtain detection results.
It enables precise quantification of camera optical performance, noise characteristics, and response consistency, improves the accuracy and interpretability of detection data, ensures the stability and reliability of detection judgment, and achieves standardization and traceability of detection results.
Smart Images

Figure CN121707959A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent optical inspection technology, and in particular to a camera quality inspection method, device and medium based on image detection. Background Technology
[0002] With the increasing demands for image quality in fields such as smart terminals, autonomous driving, and security monitoring, camera inspection technology is gradually evolving from traditional manual inspection to automation and digitalization. Image inspection methods are widely used because they can directly reflect the imaging performance of cameras. Their inspection content covers aspects such as sharpness, color reproduction, noise level, and consistency assessment, and they are gradually becoming the core means of quality control in camera production lines.
[0003] However, existing image detection-based camera quality inspection methods generally suffer from two shortcomings: First, the inspection process relies heavily on single-frame image statistics or empirical formulas, making it difficult to separate optical defects, noise, and response inhomogeneity, resulting in insufficient stability of the inspection results; Second, for the color consistency problem, traditional methods rely solely on color difference judgment and cannot combine color parameters for adaptive correction, thus failing to effectively reduce metamerism error and limiting the accuracy of inspection and the traceability of results. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a camera quality detection method based on image detection to solve the problems of not being able to accurately distinguish between optical characteristics and noise factors, and color consistency detection relying solely on static color difference determination.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a camera quality detection method based on image detection, which includes acquiring multiple frames of image data and image data of metamerism regions to obtain an image sequence to be processed;
[0008] By using the reference region of the image sequence to be processed, geometric alignment and intensity normalization are performed on the image sequence to be processed to obtain standardized image data;
[0009] Based on standardized image data, potential reference maps and mechanism parameter vectors are obtained through joint inversion, and quality parameters are extracted.
[0010] Based on the metamerism blobs in the standardized image data, the metamerism separation index is calculated. The quality parameters are then corrected using the metamerism separation index to obtain the color parameters and the corrected metamerism separation index.
[0011] The detection results are obtained by comparing the color parameters and the corrected metamerism separation index with the preset index threshold.
[0012] As a preferred embodiment of the image detection-based camera quality detection method of the present invention, the specific steps for acquiring multi-frame image data and image data of metamerism smear regions to obtain the image sequence to be processed are as follows.
[0013] Acquire multiple frames of image data and capture images of the target surface containing metamerism regions, acquiring image data of the metamerism regions.
[0014] The image data from multiple frames and the image data from metamerism regions are combined to obtain the image sequence to be processed.
[0015] As a preferred embodiment of the image detection-based camera quality detection method of the present invention, the step of geometrically aligning and intensity normalizing the image sequence to be processed through a reference region to obtain standardized image data includes the following specific steps.
[0016] Locate a reference region in the image sequence to be processed, extract feature points from the image sequence to be processed based on the reference region, and obtain the image sequence to be processed with feature point locations;
[0017] The image sequence to be processed with feature point locations is geometrically aligned, and the gray-level mean of the reference region is calculated. The gray-level mean of the geometrically aligned image sequence to be processed and the reference region are intensity normalized to obtain standardized image data.
[0018] As a preferred embodiment of the image detection-based camera quality detection method of the present invention, the step of obtaining a potential reference map and mechanism parameter vector based on standardized image data through joint inversion is as follows:
[0019] Joint inversion initialization is performed using standardized image data to obtain an initial potential reference map and an initial mechanism parameter vector. Error calculation is then performed on the initial potential reference map and the initial mechanism parameter vector to obtain a potential reference map and mechanism parameter vector containing error information.
[0020] The potential reference map and mechanism parameter vector containing error information are iteratively optimized and convergence is determined to obtain the potential reference map and mechanism parameter vector.
[0021] As a preferred embodiment of the image detection-based camera quality detection method of the present invention, the specific steps for extracting quality parameters are as follows:
[0022] The sharpness index, fixed pattern noise index, and pixel response non-uniformity index are extracted from the mechanism parameter vector as quality parameters for quality detection.
[0023] As a preferred embodiment of the image detection-based camera quality detection method of the present invention, the specific steps for calculating the metamerism separation index based on metameritic color patch regions in standardized image data are as follows:
[0024] Locate metamerism color patch regions from standardized image data, extract pixel values from metamerism color patch regions, and calculate color information of metamerism color patch regions under the first and second light sources based on pixel values of metamerism color patch regions.
[0025] The difference between the color information under the first light source and the color information under the second light source is calculated to obtain the metamerism separation index.
[0026] As a preferred embodiment of the image detection-based camera quality detection method of the present invention, the specific steps for correcting the quality parameters using a metamerism criterion to obtain color parameters and the corrected metamerism criterion are as follows:
[0027] The obtained quality parameters are matched with metamerism separation indexes, and the color matrix and gamma parameters are obtained by parsing the quality parameters.
[0028] The adjusted color matrix is obtained by gradually fine-tuning the coefficients of each channel in the matrix;
[0029] The adjusted gamma parameter was obtained by fine-tuning the gamma parameter and further reducing the metachromatic separation index.
[0030] The corrected metamerism separation index is calculated using the adjusted color matrix, adjusted gamma parameters, and metamerism separation index, thus obtaining the color parameters and the corrected metamerism separation index.
[0031] As a preferred embodiment of the image detection-based camera quality detection method of the present invention, the step of comparing the color parameters and the corrected metamerism separation index with a preset index threshold to obtain the detection result is as follows:
[0032] When the corrected metamerism separation index is less than or equal to the preset index threshold, the color consistency of the camera is considered to meet the requirements, and the output test result is qualified.
[0033] When the corrected metamerism separation index is greater than the preset index threshold, the color consistency of the camera is considered to have a problem, and the output test result is unqualified.
[0034] In a second aspect, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements any step of the camera quality detection method based on image detection as described in the first aspect of the present invention.
[0035] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the camera quality detection method based on image detection as described in the first aspect of the present invention.
[0036] The beneficial effects of this invention are as follows: By introducing joint inversion to obtain potential reference maps and mechanism parameter vectors, accurate quantification of camera optical performance, noise characteristics, and response consistency is achieved, thereby improving the accuracy and interpretability of detection data; by calculating metamerism separation index based on metameritic color patch regions and linking it with color parameters for correction, dynamic correction of camera color consistency is achieved, ensuring the stability and reliability of detection judgment; by combining color parameter correction results with metamerism separation index for threshold judgment in the detection process, standardization and traceability of detection results are achieved, facilitating production line quality control and subsequent analysis. Attached Figure Description
[0037] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart of a camera quality detection method based on image detection.
[0039] Figure 2 A flowchart for data collection and standardization.
[0040] Figure 3 This is a flowchart for joint inversion and quality parameter extraction.
[0041] Figure 4 The flowchart for calibration and threshold determination. Detailed Implementation
[0042] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0043] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0044] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0045] Reference Figures 1-4 This is one embodiment of the present invention, which provides a camera quality detection method based on image detection, including the following steps:
[0046] S1. Acquire multiple frames of image data and image data of metamerism regions to obtain the image sequence to be processed.
[0047] The camera under test is photographed under standard light source conditions using a fixed fixture, and multiple frames of image data are collected. The target surface containing metamerism saturation areas is also photographed, and image data of the metamerism saturation areas are collected. The multiple frames of image data and the image data of the metamerism saturation areas are summarized to obtain the image sequence to be processed.
[0048] Furthermore, the camera under test is fixed on a fixture, with the fixture maintaining a fixed distance (e.g., 30cm) from the target surface, and the optical axis of the camera under test is perpendicular to the target surface.
[0049] Regarding lighting conditions, a standard light source D65 (e.g., color temperature 6500K, illuminance 1000lx±50lx) is used, and the standard light source is irradiated onto the target surface at a 45° angle to ensure uniform illuminance on the target surface. Multiple test areas are preset on the target surface, one of which is a metamerism color block area. The metamerism color block area contains two color blocks that are approximately the same color under the D65 light source but can produce color difference under the A light source.
[0050] The camera under test is controlled to sequentially capture images of a target surface displaying different coded patterns. Each coded pattern is displayed for 120ms, and 10 frames of images are acquired sequentially to obtain multi-frame image data. Before acquisition, a gray reference image is first acquired. The gray values of all pixels within a pre-defined gray reference region are read. The gray values of each pixel within the gray reference region are accumulated one by one to obtain the sum of the gray values of the gray reference region. The ratio of the sum of the gray values of the gray reference region to the total number of pixels in the gray reference region is taken as the pixel mean of the gray reference region. The target gray value is set to 0.5. The target gray value is compared with the pixel mean of the gray reference region. When the pixel mean of the gray reference region is... When the value is less than the target gray value, it indicates that the overall brightness of the image is too low. In this case, the brightness is increased by increasing the initial exposure time and the ratio difference between the two. When the pixel mean of the gray reference area is greater than the target gray value, it indicates that the overall brightness of the image is too high. In this case, the brightness is reduced by decreasing the initial exposure time and the ratio difference between the two. The exposure time is obtained, and multiple frames of image data are collected sequentially. Then, the light source is switched to light source A (e.g., color temperature 2850K, illuminance 800lx±40lx), and the camera under test is controlled to collect image data containing metameris regions. The multiple frames of image data and the image data of metameris regions are stored and summarized in a unified manner to obtain the image sequence to be processed.
[0051] It should be noted that the pre-defined gray reference area is a standard grayscale area fixed in advance on the display target surface. This area is covered with uniform neutral gray blocks and corresponds to the center position or geometrically stable position of the camera's imaging field of view in space. The size of the gray reference area is set according to the imaging resolution (for example, a rectangular area of 100×100 pixels) to ensure that the pixel distribution within the area is representative and stable. The target gray value is set to 0.5 because when the pixel gray value ranges from 0 to 1, 0.5 is located in the middle of the linear response curve. At this position, the image sensor response is most stable, which avoids overexposure caused by high grayscale areas approaching saturation and underexposure caused by excessive noise in low grayscale areas.
[0052] S2. Using the reference region of the image sequence to be processed, perform geometric alignment and intensity normalization on the image sequence to be processed to obtain standardized image data.
[0053] Extract a reference region from the image sequence to be processed, and extract feature points from the reference region using the image sequence to be processed containing the reference region to obtain an image sequence to be processed with feature point locations.
[0054] Furthermore, a reference region is extracted from the image sequence to be processed (for example, a rectangular region at the four corners of the target surface can be selected as the reference region to ensure that the reference region has stable geometric features in multiple frames of images). A corner detection method is used to extract feature points from the reference region, expressed as:
[0055] ;
[0056] in, Indicates pixel coordinates Corner response value at the location, Indicates pixel coordinates The second-order matrix at that location, Represents a second-order matrix The determinant, Represents a second-order matrix The trace is the sum of the diagonal elements of the matrix, and c represents an empirical parameter with a value range of [0.04, 0.06].
[0057] It should be noted that, This involves using multiple cameras to acquire multiple sets of images on a standard test target surface, with different settings for each set. Corner detection is performed on the reference area, and statistics are collected at different values. The number of corner points detected and the stability of corner points under the value, when When the value is less than 0.04, the corner response function is too sensitive to noise and easily generates a large number of false corners. A value greater than 0.06 indicates that the corner response function is too strict and may easily miss valid corners.
[0058] Pixels with corner response values greater than the response threshold are selected as feature point locations in the reference region. These feature point locations are then associated with the image sequence to be processed to obtain the image sequence containing feature point locations.
[0059] It should be noted that the response threshold is calculated by statistically analyzing the corner response values of all pixels within the reference area, obtaining the average value of the corner response values within the reference area, and then using the average value of the corner response values within the reference area as the response threshold.
[0060] The image sequence to be processed with feature point locations is geometrically aligned, and the gray-level mean of the reference region is calculated. The gray-level mean of the geometrically aligned image sequence to be processed and the reference region are intensity normalized to obtain standardized image data.
[0061] Furthermore, by comparing the feature point coordinates of the reference region in the image sequence with feature point locations with the feature point coordinates of the template reference region, the geometric transformation relationship is calculated. Specifically, multiple feature point coordinates of the reference region are selected in the image sequence with feature point locations, and matched with the feature point coordinates of the template reference region in a one-to-one correspondence manner. Then, the feature point coordinates of the reference region in the image sequence with feature point locations are used as input points, and the feature point coordinates of the template reference region are used as target points. By minimizing the error in the correspondence between the input points and the target points, a mapping that can map the input points to the target points is determined. The geometric transformation relationship of points is applied to the coordinates of each pixel in the image sequence to be processed, which has feature point positions. According to the geometric transformation relationship, the pixel is mapped from its original coordinate position to a new coordinate position. For blank pixel positions appearing in the coordinate grid after mapping, the bilinear interpolation method is used to obtain the gray value of the position based on the gray value of the adjacent pixel, thereby avoiding image breaks or holes. All pixels are rearranged according to the new coordinate positions to generate image frames that are geometrically consistent with the template reference area. The geometrically corrected image frames are combined sequentially to obtain the geometrically aligned image sequence to be processed.
[0062] It should be noted that the feature point coordinates of the template reference area are obtained using a standard template image taken from a fixed target surface before the image sequence to be processed is established. The fixed target surface has been pre-marked with geometrically stable feature points (such as the four corner edge points or the intersection points of the checkerboard) during the manufacturing process. By performing feature point detection on the reference area in the standard template image, the position coordinates of all feature points in the reference area are obtained, and these position coordinates are recorded as the feature point coordinates of the template reference area.
[0063] Select a reference region in the geometrically aligned image sequence to be processed, obtain the average pixel value within the reference region, and obtain the ratio of the gray value of each pixel in the geometrically aligned image sequence to the average pixel value of the reference region. This ensures that the brightness distribution of the entire geometrically aligned image sequence is uniform, resulting in an intensity-normalized image sequence to be processed, which is then output as standardized image data.
[0064] S3. Based on standardized image data, obtain potential reference maps and mechanism parameter vectors through joint inversion, and extract quality parameters.
[0065] Joint inversion initialization is performed using standardized data to obtain an initial potential reference map and an initial mechanism parameter vector. Error calculation is then performed on the initial potential reference map and the initial mechanism parameter vector to obtain a potential reference map and mechanism parameter vector containing error information.
[0066] Furthermore, the standardized image data is jointly inverted and initialized. By constructing a joint inversion objective function, the potential reference map and the mechanism parameter vector are simultaneously used as variables to be optimized. The expression is:
[0067] ;
[0068] in, This represents the number of frames in the standardized image data. Represents the first in the standardized image data Frame in pixel grayscale value at that location Indicates the potential reference map in pixels The intensity value at that location, Indicates the first Frame-coded patterns in pixels Mask value at that location, Represents the mechanism parameter vector, Represented by the mechanism parameter vector A defined imaging physical transformation process, Represented by the mechanism parameter vector A deterministic nonlinear mapping process, Indicates the potential reference map in pixels gradient value at, This represents the smoothness regularization coefficient, with a value range of []. , ], This represents the regularization coefficient, with a value range of []. , ], The square norm of the mechanism parameter vector. This represents the cost function value.
[0069] It should be noted that, It determines the pixels in each frame of the image based on the encoded pattern information of the image sequence to be processed. To determine if a location is illuminated, retrieve all pixels in the frame that belong to the illuminated location. The sum of standardized grayscale values is used as the ratio of the sum to the number of frames involved in the summation, which is then used as a latent reference map at the pixel level. The intensity value at that location, During the acquisition process, each frame of the image to be processed corresponds to a known coded pattern. The coded pattern, when generated, explicitly specifies which pixel positions are lit and which are not. When processing the first frame... When processing a frame, the encoded pattern corresponding to that frame is read, and the pixels are... When the pixel is lit, the mask value is set to 1, thus setting the pixel... The mask value is set to 0 when the device is not lit, thus obtaining the first... Frame-coded patterns in pixels Mask value at that location, It is an imaging physical transformation process that utilizes the optical point spread function parameter, sensor readout parameter, and noise and pixel response non-uniformity parameter in the mechanism parameter vector to sequentially construct optical blur, readout effect, and noise response, thereby forming an imaging physical transformation process. Color mapping is achieved by performing matrix operations on the three-channel signals output from the imaging physical transformation process using the color matrix parameters contained in the mechanism parameter vector. Then, the gamma parameters contained in the mechanism parameter vector are used to perform nonlinear grayscale transformation on the color-mapped signal, thus forming a complete nonlinear mapping process. Selecting pixels in the potential reference map The grayscale differences between the pixel and its horizontal and vertical neighbors are calculated separately. The horizontal difference is used as the horizontal gradient component, and the vertical difference is used as the vertical gradient component. The two are then combined to obtain the pixel gradient. gradient value at, When constructing the joint inversion function, the smoothness constraint term of the potential reference map is compared with the reconstruction error term using a weighted average. The range of values for the smoothness regularization coefficient is determined by ensuring that the two are comparable in magnitude. When the value is too small, the smoothness constraint is insufficient, and the latent reference map is prone to noise points and local artifacts. When the size is too large, the smoothness constraint is too strong, and the underlying reference map will become over-smoothed, resulting in the loss of detail information. When constructing the joint inversion objective function, the magnitude constraint term of the mechanism parameter vector is compared with the reconstruction error term using a weighted average. This prevents the values of the mechanism parameter vector from increasing indefinitely and causing overfitting. When the value is too small, the parameter regularization effect is insufficient, and the mechanism parameter vector is prone to numerical divergence and unreasonable fluctuations. When the value is too large, the parameter regularization effect is too strong, and the mechanism parameter vector will be over-compressed to near zero, causing the model to fail to effectively represent the actual imaging process, and the cost function value... It is used to measure the potential reference map With mechanism parameter vector The reconstruction error and the degree of regularization constraint in the current iteration.
[0070] By iteratively minimizing the joint inversion objective function, the latent reference map and the mechanism parameter vector gradually approach the optimal solution within a unified framework. In each iteration, the difference between the standardized image data and the estimated image generated based on the latent reference map and the mechanism parameter vector is calculated according to the first term in the objective function to obtain pixel-by-pixel error information. Combining the smoothing constraint term of the latent reference map and the magnitude constraint term of the mechanism parameter vector, the latent reference map and the mechanism parameter vector are adjusted. After the iteration converges, the latent reference map containing error information and the mechanism parameter vector containing error information are obtained.
[0071] It should be noted that the smoothness constraint term of the latent reference map is obtained by acquiring the gray-level difference between each pixel and its horizontal and vertical adjacent pixels in the latent reference map, using the gray-level difference as a local gradient, and then accumulating the squares of all local gradients to reflect the overall spatial smoothness of the latent reference map. The magnitude constraint term of the mechanism parameter vector is obtained by reading the values of all sub-parameters in the mechanism parameter vector, accumulating the squares of each sub-parameter to reflect the overall magnitude of the mechanism parameter vector.
[0072] The potential reference map and mechanism parameter vector containing error information are iteratively optimized and converged to obtain the potential reference map and mechanism parameter vector, and the quality parameters are extracted.
[0073] Furthermore, the first In the next iteration, the mechanism parameter vector is fixed as follows: Perform a gradient update on the potential reference graph and project it to the range of legal values. After updating and fixing the potential reference graph, perform a gradient update on the mechanism parameter vector and project it onto the physically feasible set, as expressed by:
[0074] ;
[0075] ;
[0076] in, Indicates the first The two-dimensional matrix variables of the potential reference graph at the next iteration. Indicates the first The two-dimensional matrix variables of the potential reference graph after the next iteration update This indicates a fixed update step size for the potential reference graph. This represents a fixed update step size for the mechanism parameter vector. Indicates the first In the next iteration For potential reference diagrams The partial derivatives, Indicates the first In the next iteration For mechanism parameter vector The partial derivatives, Indicates the first Mechanism parameter vector at the next iteration Indicates the first The mechanism parameter vector updated in the next iteration This represents a pixel-wise projection operator used to constrain the pixel values of the updated potential reference map to a range. , This represents the parametric projection operator, used to restrict the updated mechanistic parameter vector to a set. Inside.
[0077] It should be noted that the legal range of values for the potential reference image is the [0,1] interval of the normalized gray level, which is determined by the physical meaning of the pixel intensity. The fixed update step size is selected by choosing a range of values that can ensure the objective function decreases monotonically in each iteration without numerical divergence when constructing the iterative update rules, based on the decreasing trend of the objective function in the initial iteration stage.
[0078] After completion and After the update, calculate the relative decrease in the objective function between the current iteration and the previous iteration and determine convergence. The expression is:
[0079] ;
[0080] in, This indicates the relative decrease.
[0081] when < The iteration stops when a fixed number of consecutive occurrences (e.g., 3 consecutive occurrences) or when the number of iterations reaches the upper limit (e.g., 50 iterations). The final potential reference map and mechanism parameter vector are obtained. Three core indicators for quality detection are extracted from the mechanism parameter vector. The first is to derive the modulation transfer function curve from the sub-parameters related to the optical point spread function, and take the spatial frequency corresponding to the 50% of the curve as the sharpness indicator MTF50. The second is to read the fixed pattern noise amplitude as the fixed pattern noise indicator. The third is to read the pixel response non-uniformity amplitude as the pixel response non-uniformity indicator. The three indicators are used as quality parameters.
[0082] It should be noted that, < The condition for stopping iteration is that when the error decreases by less than 1 / 3 between two consecutive iterations... arrive When the convergence reaches a stable state, it can be considered that convergence has been achieved. Considering the tolerance for imaging errors in camera quality inspection, the following selection should be made. As a compromise, it balances computational accuracy and operational efficiency.
[0083] S4. Based on the metamerism swatches in the standardized image data, calculate the metamerism separation index, correct the quality parameters using the metamerism separation index, and obtain the color parameters and the corrected metamerism separation index.
[0084] From the standardized image data, according to the production line calibration coordinates, regions of interest (ROIs) of fixed sizes (e.g., 32×32 pixels) are extracted from metamerism plenum regions A and B on both the D65 and A light source frames. When the standardized image data contains multiple frames under the same light source, the pixel-by-pixel sum of the ROIs for metamerism plenum regions A and B is obtained. The ratio of the pixel-by-pixel sum to the total number of frames in the standardized image data is used as the frame average image under the two light sources to reduce the impact of flicker and random noise. For each ROI, the pixel-by-pixel sum is obtained on each of the three color channels. The ratio of the sum to the number of pixels is used as the linear RGB channel mean of metameris region A under D65 light source, the linear RGB channel mean of metameris region B under D65 light source, the linear RGB channel mean of metameris region A under light source A, and the linear RGB channel mean of metameris region B under light source A. Matrix operations and non-linear grayscale transformations are performed sequentially on the four linear RGB channel means to obtain the processed three-channel values. These processed three-channel values are then converted to the CIE standard XYZ color space using a common color space conversion process, and further converted to the CIE standard. Using the L*a*b* color space, we obtain the color values of metameris region A, metameris region B, and metameris region A under the D65 illuminant, as well as the color values of metameris region A and metameris region B under the A illuminant. We then calculate the L*a*b* difference vectors for both metameris region A and metameris region B under the two illuminants. Each difference vector consists of the differences between the corresponding L*, a*, and b* components. The difference between these two vectors is used as a three-dimensional difference vector. Following the general rules of CIE color difference measurement, we obtain the length of this three-dimensional difference vector, which is then used as the metameris separation index.
[0085] The quality parameters are matched with metamerism separation indices, the color matrix in the quality parameters is adjusted to obtain the adjusted color matrix, and the gamma parameter in the quality parameters is adjusted to obtain the adjusted gamma parameter.
[0086] Furthermore, the color matrix and gamma parameters in the quality parameters are used as initial values, and adjusted in conjunction with the metamerism separation index. Specifically, under the constraint of keeping the reference region color unchanged, the values of each element of the color matrix are adjusted in small increments (e.g., increasing or decreasing the current value by about 1%). After each adjustment, the metamerism separation index is recalculated. When the index decreases and the reference region color remains stable, the adjustment is retained; otherwise, the adjustment is canceled and the original value is restored. Through repeated iterations, the metamerism separation index is gradually reduced, and the adjusted color matrix is obtained. Within a given gamma parameter range (e.g., 1.8 to 2.4), the gamma parameter is adjusted in small increments (e.g., increasing or decreasing by 0.02 each time). After each adjustment, a new grayscale response curve is generated and compared with a standard grayscale curve. If the deviation of the grayscale curve decreases and the metamerism separation index decreases simultaneously, the adjustment is retained. If the deviation increases or the metamerism separation index does not improve, the adjustment is revoked and the original value is returned. Through multiple iterative searches, an adjusted gamma parameter that balances grayscale accuracy and the reduction effect of the metamerism separation index is finally obtained.
[0087] It should be noted that the grayscale response curve is obtained by photographing a grayscale test card arranged from low to high under standard light conditions, recording the average brightness value of each grayscale block in the image, and plotting the input grayscale level with the output brightness value. The standard grayscale curve is a target response curve specified in the CIE or sRGB standard, which maps the input grayscale level to the ideal output brightness value to form a preset reference curve.
[0088] The corrected metamerism separation index is calculated using the adjusted color matrix, adjusted gamma parameters, and metamerism separation index, thus obtaining the color parameters and the corrected metamerism separation index.
[0089] Furthermore, the adjusted color matrix and adjusted gamma parameters are applied to the standardized image data of metameris region A and metameris region B to obtain corrected color values. The corrected color values are then converted to the CIE L*a*b* color space. The color difference between metameris region A and metameris region B under the two light sources are calculated respectively, and the two sets of color differences are numerically compared. The mean square error of the two sets of color differences is used as the corrected metameris separation index. The color parameters including the adjusted color matrix and adjusted gamma parameters, as well as the corrected metameris separation index, are obtained.
[0090] It should be noted that the color difference of the metamerism swatch region is obtained by acquiring the L*a*b* value of the metamerism swatch region under the D65 light source and the L*a*b* value of the metamerism swatch region under the light source, comparing the numerical differences of the L component, a component and b component respectively, and combining the differences of the three components into an overall difference value as the color difference of the metamerism swatch region.
[0091] S5. Based on the color parameters and the corrected metamerism separation index, compare them with the preset index threshold to obtain the detection results.
[0092] A threshold for the metamerism separation index is set. When the corrected metamerism separation index is less than or equal to the threshold, the color consistency of the camera is considered to meet the requirements, and the output test result is qualified. When the corrected metamerism separation index is greater than the threshold, the color consistency of the camera is considered to have a problem, and the output test result is unqualified. The test results and color parameters are stored together, and a test report is obtained for subsequent traceability and quality control.
[0093] It should be noted that the judgment threshold is determined by selecting representative qualified camera samples and obviously unqualified camera samples, taking pictures of their metamerism color patch region A and metamerism color patch region B respectively, calculating the metamerism separation index according to the established process, determining the distribution range of qualified samples and unqualified samples by statistically analyzing the separation index results of a large number of samples, and selecting a value that can effectively distinguish between the two as the judgment threshold.
[0094] This embodiment also provides a computer device applicable to the camera quality detection method based on image detection, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the camera quality detection method based on image detection as proposed in the above embodiment.
[0095] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0096] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the image detection-based camera quality detection method proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0097] In summary, this invention achieves precise quantification of camera optical performance, noise characteristics, and response consistency by introducing joint inversion to obtain potential reference maps and mechanistic parameter vectors, thereby improving the accuracy and interpretability of detection data; it also achieves dynamic correction of camera color consistency by calculating metamerism separation indices based on metameritic color patch regions and linking them with color parameters for correction, ensuring the stability and reliability of detection judgment; and it achieves standardization and traceability of detection results by combining color parameter correction results with metamerism separation indices for threshold determination during the detection process, facilitating production line quality control and subsequent analysis.
[0098] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A camera quality inspection method based on image detection, characterized in that: include, Acquire multiple frames of image data and image data of metamerism regions to obtain the image sequence to be processed; By using the reference region of the image sequence to be processed, geometric alignment and intensity normalization are performed on the image sequence to be processed to obtain standardized image data; Based on standardized image data, potential reference maps and mechanism parameter vectors are obtained through joint inversion, and quality parameters are extracted. Based on the metamerism blobs in the standardized image data, the metamerism separation index is calculated. The quality parameters are then corrected using the metamerism separation index to obtain the color parameters and the corrected metamerism separation index. The detection results are obtained by comparing the color parameters and the corrected metamerism separation index with the preset index threshold.
2. The camera quality detection method based on image detection as described in claim 1, characterized in that: The specific steps for acquiring multi-frame image data and image data of metamerism regions to obtain the image sequence to be processed are as follows: Acquire multiple frames of image data and capture images of the target surface containing metamerism regions, acquiring image data of the metamerism regions. The image data from multiple frames and the image data from metamerism regions are combined to obtain the image sequence to be processed.
3. The camera quality detection method based on image detection as described in claim 2, characterized in that: The step involves geometric alignment and intensity normalization of the image sequence to be processed using a reference region to obtain standardized image data. The specific steps are as follows: Locate a reference region in the image sequence to be processed, extract feature points from the image sequence to be processed based on the reference region, and obtain the image sequence to be processed with feature point locations; The image sequence to be processed with feature point locations is geometrically aligned, and the gray-scale mean of the reference region is calculated. The gray-scale mean of the geometrically aligned image sequence to be processed and the reference region are intensity normalized to obtain standardized image data.
4. The camera quality detection method based on image detection as described in claim 3, characterized in that: The specific steps for obtaining the potential reference map and mechanism parameter vector based on standardized image data through joint inversion are as follows: Joint inversion initialization is performed using standardized image data to obtain an initial potential reference map and an initial mechanism parameter vector. Error calculation is then performed on the initial potential reference map and the initial mechanism parameter vector to obtain a potential reference map and mechanism parameter vector containing error information. The potential reference map and mechanism parameter vector containing error information are iteratively optimized and convergence is determined to obtain the potential reference map and mechanism parameter vector.
5. The camera quality detection method based on image detection as described in claim 4, characterized in that: The specific steps for extracting the quality parameters are as follows: The sharpness index, fixed pattern noise index, and pixel response non-uniformity index are extracted from the mechanism parameter vector as quality parameters for quality detection.
6. The camera quality detection method based on image detection as described in claim 5, characterized in that: The specific steps for calculating the metamerism separation index based on metameritic color patch regions in standardized image data are as follows: Locate metamerism color patch regions from standardized image data, extract pixel values from metamerism color patch regions, and calculate color information of metamerism color patch regions under the first and second light sources based on pixel values of metamerism color patch regions. The difference between the color information under the first light source and the color information under the second light source is calculated to obtain the metamerism separation index.
7. The camera quality detection method based on image detection as described in claim 6, characterized in that: The process of correcting quality parameters using metamerism metric to obtain color parameters and the corrected metamerism metric involves the following steps: The obtained quality parameters are matched with metamerism separation indexes, and the color matrix and gamma parameters are obtained by parsing the quality parameters. The adjusted color matrix is obtained by gradually fine-tuning the coefficients of each channel in the matrix; The adjusted gamma parameter was obtained by fine-tuning the gamma parameter and further reducing the metachromatic separation index. The corrected metamerism separation index is calculated using the adjusted color matrix, adjusted gamma parameters, and metamerism separation index, thus obtaining the color parameters and the corrected metamerism separation index.
8. The camera quality detection method based on image detection as described in claim 7, characterized in that: The detection result is obtained by comparing the color parameters and the corrected metamerism separation index with a preset index threshold. The specific steps are as follows: When the corrected metamerism separation index is less than or equal to the preset index threshold, the color consistency of the camera is considered to meet the requirements, and the output test result is qualified. When the corrected metamerism separation index is greater than the preset index threshold, the color consistency of the camera is considered to have a problem, and the output test result is unqualified.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the camera quality detection method based on image detection as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the camera quality detection method based on image detection as described in any one of claims 1 to 8.