A camera quality detection method and system based on data analysis

By using a nine-grid image algorithm based on data analysis and editing distance matching degree calculation, the limitations of text prompts and insufficient sample data in existing camera quality detection methods are solved, enabling detailed identification and accurate detection of camera quality problems.

CN120529068BActive Publication Date: 2025-12-05SHENZHEN YOUWEI INFORMATION TECH DEV CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511014254.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-12-05
Estimated Expiration
2045-07-23

AI Technical Summary

Technical Problem

Existing camera quality inspection technologies suffer from limitations in text prompts, insufficient sample data coverage, and inaccurate assumptions regarding the number of modules and consistency, resulting in inaccurate inspection results.

Method used

A data analysis-based approach is adopted to identify camera patterns using a nine-grid image algorithm. The gradient is trained by balancing the weights of the loss function, and overlapping detection boxes are processed by combining Soft-NMS. The color difference between color blocks and characters is calculated, and the mirror scene is judged. The intersection area ratio of the overall target and the target parts is used for classification, and the edit distance matching degree is calculated to identify camera quality problems.

Benefits of technology

It enables accurate identification of image quality issues in camera detailing, improves the accuracy and consistency of detection, and can identify image quality problems under extreme lighting conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120529068B_ABST
    Figure CN120529068B_ABST
Patent Text Reader

Abstract

This invention discloses a camera quality inspection method and system based on data analysis, belonging to the field of camera quality inspection technology. The invention includes a position determination module for determining the position of the camera and the image to be captured; an imaging feedback module for acquiring pattern imaging feedback from the camera and stitching it into a nine-grid image within the system platform; a pattern recognition module for recognizing the nine-grid image based on a nine-grid image algorithm and matching the pattern recognition result with pre-stored offline pattern information; and a quality inspection module for mapping abnormal pattern imaging to a corresponding camera index directory, determining the camera number, and reporting the quality problem of the corresponding camera. This invention captures a set of patterns using each set of cameras, identifies the structural information of each pattern image through an algorithm, obtains problematic pattern images, and identifies detailed quality problems in the cameras.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of camera quality inspection technology, specifically a camera quality inspection method and system based on data analysis. Background Technology

[0002] Cameras may encounter some quality problems during the production process. Common camera quality problems can lead to abnormal images, such as: black and white images, mirrored images, color cast or distortion, and data loss.

[0003] Current camera quality detection technologies still have many shortcomings. For example, camera detection generally uses feature extraction for analysis. As described in the invention patent CN119854481A, "Camera Detection Method, Device, Equipment and Program Product," this method involves acquiring the target camera's monitoring image and text prompts, extracting features from both, and inputting these features into a deep learning model to predict image quality. The predicted image quality is then used to detect the target camera. However, this method has several limitations: for instance, the limitations of text prompts. Relying on text prompts to describe image quality indicators, if the text prompts are not comprehensive or accurate enough, it may lead to biased assessments of camera image quality. For example, some complex image quality problems may not be accurately expressed by preset text prompts, thus affecting the accuracy of the detection results. Furthermore, there is the limitation of sample data. If the sample data coverage is not broad enough, it may not accurately identify some special scenes or rare camera malfunctions. For example, for image quality detection under extreme lighting conditions, if the sample lacks corresponding data, the model may not be able to provide an accurate assessment. Furthermore, the quantity and consistency of modules are also key considerations during the testing process. For example, the invention patent "Detection Method, Apparatus and Equipment for Camera Modules" (publication number CN119835406A) acquires multispectral images from different numbers of camera modules, determines a standard camera module based on a set of multispectral images, and compares the consistency of the standard multispectral images of the standard camera module with each image in another set of multispectral images to determine whether the module is defective, thus solving the problem of low detection efficiency for camera modules. However, the selection of the standard module is affected by the sample size. If the number of camera modules in the first set is small, it may not accurately represent the overall performance level of the modules, leading to a bias in the selection of the standard module. For instance, if the first set of modules contains some modules with good or poor performance, it will affect the accuracy of the standard module, and consequently affect the detection results of other modules. Secondly, regarding the assumption of module consistency, this method assumes that the first set of camera modules has high consistency under ideal conditions. However, in actual production, even camera modules from the same batch may have certain individual differences. This assumption may lead to these differences being overlooked when determining standard modules, making subsequent consistency comparisons less accurate. Summary of the Invention

[0004] The purpose of this invention is to provide a camera quality inspection method and system based on data analysis to solve the problems raised in the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a camera quality detection method based on data analysis, the method comprising:

[0006] Determine the position of the camera relative to the image to be captured;

[0007] The image captured by the camera is fed back to the system platform and stitched into a nine-grid image;

[0008] The algorithm for identifying nine-square grid images is based on a nine-square grid image recognition method. The pattern recognition result is then matched with the pattern information stored offline in advance. If a match is found, it indicates that the pattern imaging is normal; otherwise, it indicates that the pattern imaging is abnormal.

[0009] The loss functions of each task are combined according to their weights. ,in, , , These refer to the loss function respectively. Loss function Loss function The weight coefficients are summed to 1; different training gradients are balanced by the weights.

[0010] After the backbone network outputs candidate boxes, Soft-NMS is used to process overlapping detection boxes, retaining boxes with high confidence and better shape.

[0011] Color block filtering calculates the color difference between the average Lab value of detected color blocks and the standard value. If the color difference exceeds a system-set threshold, the current detection result is filtered. The standard value is obtained by extracting the RGB values ​​of each color block for the same category of color blocks labeled in several positive sample datasets. The RGB values ​​of a single color block are converted to Lab space representation using a color space conversion model. The average Lab components of all color blocks of the same category are calculated separately, and the final average Lab value is used as the standard value for that category of color blocks.

[0012] Character filtering: In mirrored scenarios, the character detection results are filtered out based on the left-right symmetry of the character outlines.

[0013] Based on the overall target and part target information of each grid image in the nine-grid image, the overall target and part target recognition category information are classified according to the spatial positional relationship between the overall target bounding box and the part target bounding box;

[0014] Based on the location target bounding box and the overall target bounding box, calculate the proportion of the intersection area of ​​the location and the overall target bounding box to the location bounding box.

[0015] ;

[0016] in, This indicates the proportion of the area where the part intersects with the overall target to the area bounded by the part frame. Indicates the first Coordinate data for each part; Indicates the first The coordinate data of the overall target bounding box; This indicates the overlapping area of ​​the part bounding box and the overall target bounding box. Indicates the first The width of each part's frame; This represents the height of the frame at the i-th position. , These represent the quantity values ​​of the parts and the quantity values ​​of the overall target box, respectively. Where t is a preset threshold, If the i-th part belongs to the category corresponding to the j-th overall target, then the i-th part is determined to belong to the category corresponding to the j-th overall target; otherwise, it is determined not to belong to the category.

[0017] According to the above technical solution, candidate parts and overall targets are classified by the ratio of the intersection area of ​​the part and the overall target to the part box. The candidate part boxes classified into this category are sorted and output in spatial order of top left, top right, bottom right, and bottom left. The part category name is prefixed with the category name and output as a string along with the overall target category.

[0018] According to the above technical solution, the system determines the color of the pattern and the string of the character in each grid, outputs the recognition result string based on the nine-grid image algorithm recognition model, and is denoted as the first string. The system obtains the string of pattern information and is denoted as the second string. The system calculates the edit distance required to convert the first string to the second string, and obtains the lengths of the first string and the second string. Finally, the system calculates the matching degree.

[0019] According to the above technical solution, the calculation of the edit distance includes deletion and insertion operations. In the process of converting the first string to be exactly the same as the second string, the deletion and insertion operations at the same position are recorded as a distance.

[0020] According to the above technical solution, the calculation of the final matching degree includes:

[0021] ;

[0022] in, Refers to the final match rate; These refer to the lengths of the first string and the second string, respectively. This refers to the edit distance.

[0023] A camera quality inspection system based on data analysis, the system comprising:

[0024] The position determination module is used to determine the position of the camera relative to the image to be captured;

[0025] The imaging feedback module is used to acquire the pattern imaging feedback from the camera and stitch it into a nine-grid image within the system platform;

[0026] The pattern recognition module recognizes the nine-grid image based on the nine-grid image algorithm and matches the pattern recognition result with the pattern information stored offline in advance. If they match, it means that the pattern imaging is normal; if they do not match, it means that the pattern imaging is abnormal.

[0027] The quality inspection module is used to map abnormal pattern imaging to the corresponding camera index directory, determine the camera number of the camera that took the picture, and report the quality problem of the corresponding camera.

[0028] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention constructs a set of standard patterns and pre-calibrates the information of each pattern offline. The pattern is captured by each set of cameras, and the structural information of each pattern image is identified by an algorithm. The structural information is matched with the above-mentioned calibrated pattern information to obtain the pattern image with problems, indicating that the corresponding camera has problems, and can identify the subdivision quality problems of the camera. Attached Figure Description

[0029] Figure 1 This is a schematic diagram illustrating the steps of a camera quality detection method based on data analysis according to the present invention.

[0030] Figure 2 This is a schematic diagram of one of the nine-square grid settings in the camera quality detection method based on data analysis of the present invention. Detailed Implementation

[0031] Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0032] Example: Figures 1-2 As shown, this invention provides a camera quality inspection method based on data analysis, the method comprising:

[0033] Determine the position of the camera relative to the image to be captured;

[0034] The image captured by the camera is fed back to the system platform and stitched into a nine-grid image;

[0035] The algorithm for identifying nine-square grid images is based on a nine-square grid image recognition method. The pattern recognition result is then matched with the pattern information stored offline in advance. If a match is found, it indicates that the pattern imaging is normal; otherwise, it indicates that the pattern imaging is abnormal.

[0036] The abnormal pattern imaging is mapped to the corresponding camera index directory to determine the camera number that took the picture, and feedback is given that the corresponding camera has a quality problem.

[0037] Determining the position of the camera and the image to be captured includes:

[0038] Take any set of patterns and paste them on the same plane from left to right according to the pattern number and at the same height, with the patterns fixed at a fixed interval; place a set of cameras to be tested at a fixed distance in front of the patterns, at the same height as the center of the patterns, with each camera corresponding to one pattern. By setting the distance between the cameras to be tested and the patterns, as well as the fixed interval between the patterns, ensure that each camera to be tested can only capture the image of the corresponding pattern.

[0039] The process of acquiring the pattern image from the camera and feeding it back to the system platform to be stitched into a nine-grid image includes:

[0040] Define the label category for the overall target of the pattern within the nine-grid layout. The label categories for the rectangles in grids 1 to 9 are defined as pattern_1 to pattern_9, respectively. The corresponding grid label category must be labeled for the image features within any grid.

[0041] Also includes:

[0042] Based on the determined positions of the camera and the image to be captured, sample data is acquired. Model training is then performed on this sample data to generate a nine-grid image recognition algorithm model, specifically including:

[0043] To limit the annotation scope, several positive sample datasets were collected. Each positive sample dataset consists of a set of nine-square grid images of a pattern captured by a camera. The annotation strategy for each square image in the nine-square grid is to define only the target and its location. The annotation scope is limited as follows:

[0044] The overall objective is to define the smallest bounding rectangle of the complete pattern.

[0045] The target area includes color blocks at the four corners of a grid and a central character. The color blocks at the four corners of the grid include rectangles marked with a fixed color, which record the coordinates and the RGB values ​​and categories of all pixels within the area, where the categories are: blue, yellow, red, and green. The central character includes: the smallest bounding rectangle marked with numbers 1 to 9, which records the character category, which is 1, 2, 3...9, and its outline key points.

[0046] The training process includes:

[0047] A data augmentation strategy is employed to simulate mirror imaging: the positive sample image is horizontally flipped while preserving the overall image and color block annotations;

[0048] Simulated color cast: The HSV color space of the positive sample image is randomly shifted to reduce the model's dependence on fixed colors;

[0049] Simulated partial incompleteness: 10%-40% of the region is randomly occluded in the positive sample image, with the aim of learning the judgment of part integrity;

[0050] Simulated grayscale conversion: Converting positive sample images to grayscale while preserving character and overall shape annotations, with the aim of enhancing shape feature learning;

[0051] Design the loss function:

[0052] Regarding the overall objective, the loss function is constructed using Focal Loss + CIoU Loss. This strengthens the bounding box regression and class balance issues;

[0053] For color blocks, the loss function is constructed using CIoU Loss + L2 Loss. CIoU Loss is used to calculate the regression loss of the color block detection box. The color loss is calculated after the image RGB space is enhanced and the original image RGB space is converted to Lab space. The color loss of the color-skewed samples is automatically increased to suppress false detection.

[0054] For characters, the loss function is constructed using CIoU Loss + Smooth L1 Loss. CIoU Loss is used to calculate the regression loss of the character detection box, and Smooth L1 Loss is used to implement the regression loss of the stroke inflection point coordinates.

[0055] The loss functions of each task are combined according to their weights. By balancing different training gradients through weights;

[0056] After the backbone network outputs candidate boxes, Soft-NMS is used to process overlapping detection boxes, retaining boxes with high confidence and better shape.

[0057] Color block filtering calculates the color difference between the average Lab value of detected color blocks and the standard value. If the color difference exceeds a system-set threshold, the current detection result is filtered. The standard value is obtained by extracting the RGB values ​​of each color block for the same category of color blocks labeled in several positive sample datasets. The RGB values ​​of a single color block are converted to Lab space representation using a color space conversion model. The average Lab components of all color blocks of the same category are calculated separately, and the final average Lab value is used as the standard value for that category of color blocks.

[0058] Character filtering: In mirrored scenarios, the character detection results are filtered out based on the left-right symmetry of the character outlines.

[0059] Based on the overall target and part target information of each grid image in the nine-grid image, the overall target and part target recognition category information are classified according to the spatial positional relationship between the overall target bounding box and the part target bounding box;

[0060] Based on the location target bounding box and the overall target bounding box, calculate the proportion of the intersection area of ​​the location and the overall target bounding box to the location bounding box.

[0061] ;

[0062] in, This indicates the proportion of the area where the part intersects with the overall target to the area bounded by the part frame. Indicates the first Coordinate data for each part; Indicates the first The coordinate data of the overall target bounding box; This indicates the overlapping area of ​​the part bounding box and the overall target bounding box. Indicates the first The width of each part's frame; This represents the height of the frame at the i-th location. , These represent the quantity values ​​of the parts and the quantity values ​​of the overall target box, respectively. Where t is a preset threshold, If the value is set to 0.8, the i-th part is determined to belong to the category corresponding to the j-th overall target; otherwise, it is determined not to belong.

[0063] Candidate parts and the overall target are categorized by the ratio of the intersection area of ​​the part and the overall target to the part box. The candidate part boxes that belong to the category are sorted and output in spatial order of top left, top right, bottom right, and bottom left. The part category name is prefixed with the category name and output as a string along with the overall target category.

[0064] The system determines the color of the pattern and the string of the character in each grid. Based on the nine-grid image algorithm recognition model, it outputs the recognition result string, which is denoted as the first string. It obtains the string of pattern information calibrated by the system, which is denoted as the second string. It calculates the edit distance required to convert the first string to the second string, and obtains the lengths of the first string and the second string. Finally, it calculates the matching degree.

[0065] The calculation of the edit distance includes deletion and insertion operations. In the process of converting the first string to be exactly the same as the second string, the deletion and insertion operations at the same position are recorded as a distance.

[0066] The calculation of the final matching degree includes:

[0067]

[0068] in, Refers to the final match rate; These refer to the lengths of the first string and the second string, respectively. This refers to the edit distance.

[0069] In this embodiment, a camera quality inspection system based on data analysis is also included, the system comprising:

[0070] The position determination module is used to determine the position of the camera relative to the image to be captured;

[0071] The imaging feedback module is used to acquire the pattern imaging feedback from the camera and stitch it into a nine-grid image within the system platform;

[0072] The pattern recognition module recognizes the nine-grid image based on the nine-grid image algorithm and matches the pattern recognition result with the pattern information stored offline in advance. If they match, it means that the pattern imaging is normal; if they do not match, it means that the pattern imaging is abnormal.

[0073] The quality inspection module is used to map abnormal pattern imaging to the corresponding camera index directory, determine the camera number of the camera that took the picture, and report the quality problem of the corresponding camera.

[0074] In a specific embodiment of this application, the pattern is designed as a circular disc with a number in the center. The disc is divided into four equal parts by different colored areas, and the four corners of the pattern each have four equally sized, different colored areas, which are connected to the colored disc. This invention designs a set of patterns where the central numbers are 1-9, and all other areas are identical. For example, a schematic diagram of pattern number 1 is shown below. Figure 2 As shown;

[0075] The central design incorporates numbers for two main purposes. First, it facilitates the mapping between patterns and cameras: for example, a group of cameras are positioned on fixed stands, each numbered 1 to 9. The images of corresponding patterns captured by each camera are stitched together to form a nine-square grid image, with the images of patterns 1 through 9 placed in squares 1 through 9 respectively. Therefore, there is a one-to-one correspondence between the pattern position numbers and the camera stand position numbers. When a quality issue is reported via voice or visualization, the corresponding camera can be quickly located. Second, the numbering also reduces the difficulty of algorithmic recognition. The four corners are designed with differently colored rectangular patterns to prevent errors in the recognition results caused by issues such as black-and-white mode, image mirroring, color cast or distortion, or data loss in the captured images. This helps identify camera quality problems.

[0076] Simultaneously, this invention prints out the set of patterns on A3 paper. Patterns numbered 1-9 are pasted onto a similar flat surface on a wall at the same height and from left to right, with fixed intervals between patterns. A group of cameras, positioned at the same height as the center of each pattern, are placed at a certain distance in front of the patterns, with each camera corresponding to one pattern. By setting the distance between the cameras and the patterns, as well as the spacing between the patterns, it is ultimately ensured that each camera only captures the image of its corresponding pattern. Based on the above operations, the pattern positions, intervals, and camera placement are all fixed. This ensures that when each group of cameras of the same model performs detection, the cameras are placed in fixed positions for image capture.

[0077] Based on the above operations, when each camera captures a corresponding pattern, there is exactly one pattern in the image, and this pattern occupies the majority of the image area. Specifically, the background where the pattern is pasted should be as solid a color as possible, with a difference between the background color and the pattern color, and uniform lighting should be ensured.

[0078] Based on the aforementioned camera and pattern deployment operations, a large number of nine-grid images are acquired. Then, images with acceptable imaging quality are manually selected. Based on the selection algorithm, the samples need to be labeled with both overall targets and specific parts. Simultaneously, to automatically distinguish the pattern information in each grid image, the overall target of each pattern can be designed with different label categories, and the recognition results can be automatically classified based on these label categories. The labeling rules are detailed below:

[0079] In a 3x3 grid image, the overall targets of each pattern need to be distinguished, so different label categories are set for the overall targets of the patterns. The label categories for the rectangles in grids 1 to 9 are pattern_1 to pattern_9, respectively. There are 5 different parts inside the overall target of the pattern, and the label categories for the rectangles of each part are also set differently. For example, taking pattern 1 as an example, the label categories for the color blocks in the upper left, upper right, lower right, and lower left corners are pattern_1_blue, pattern_1_yellow, pattern_1_red, and pattern_1_green, respectively. The label information for the character block in the middle of the pattern is pattern_1_1, and the label information for other patterns follows the same pattern.

[0080] The camera images to be detected are stitched together to form a nine-square grid image. This image is then transmitted and input into the model described above to obtain the overall pattern target information and the target information of each grid in the nine-square grid image. The target information includes rectangular frame space information and label information.

[0081] By analyzing the label information of the overall pattern target in each grid of the predicted nine-grid image, the prediction results can be automatically categorized. For example, they can be categorized as pattern_1, pattern_2, ..., pattern_9.

[0082] Simultaneously, the predicted part information is categorized according to the same prefix (pattern_n). For example, pattern_1_blue, pattern_1_yellow, pattern_1_red, pattern_1_green, and pattern_1_1, all prefixed with "pattern_1", are grouped into the same category, "pattern_1". The predicted part categories are also sorted according to their relationships: top left, top right, bottom right, bottom left, and center. The pre-labeled offline pattern information mainly includes the color block category information at the four corners of the pattern and the character information in the center. The color block labeling order is: top left color block, top right color block, bottom right color block, bottom left color block. The labeled pattern information is: top left color block category, top right color block category, bottom right color block category, bottom left color block category, and center character information. Figure 2 For example, the calibrated pattern information is as follows:

[0083] pattern_1 / pattern_1_blue / pattern_1_yellow / pattern_1_red / pattern_1_green / pattern_1_1

[0084] The algorithm's recognition results are compared with the pre-calibrated offline pattern information to calculate the matching degree:

[0085] First, the edit distance is calculated using the edit distance algorithm; then, the matching degree is calculated; finally, by tracing back the edit operation path based on the calculated edit distance, all replacement, insertion, or deletion positions are marked to find the positions and characters of the mismatched characters.

[0086] Specifically, with Figure 2 For example,

[0087] Algorithm recognition result information (first string):

[0088] pattern_1 / pattern_1_red / pattern_1_green / pattern_1_blue / pattern_1_yellow / pattern_1_1

[0089] Calibration pattern information (second string):

[0090] pattern_1 / pattern_1_blue / pattern_1_yellow / pattern_1_red / pattern_1_green / pattern_1_1

[0091] Calculate the edit distance: The edit distance between the first string and the second string is 4.

[0092] It requires four operations: changing pattern_1 / pattern_1_blue to pattern_1 / pattern_1_red, and so on.

[0093] Calculate the matching degree:

[0094]

[0095] The mismatched positions include:

[0096] Index 1: pattern_1_blue -> pattern_1_red

[0097] Index 2: pattern_1_yellow -> pattern_1_green

[0098] Index 3: pattern_1_red -> pattern_1_blue

[0099] Index 4: pattern_1_green-> pattern_1_yellow

[0100] By calculating the matching degree using the above method, we can determine whether the pattern image captured by the camera is normal. By finding the mismatched string positions, we can identify the specific sub-problems that exist in the camera's quality.

[0101] Specifically, this manifests as: black and white images, color distortion or color cast, image mirroring, and data loss.

[0102] The camera is analyzed based on the matching degree calculated above, and the recognition result is matched with the pattern calibration information. The following mismatch indicates that there is a problem with the camera:

[0103] Therefore, based on the calculated matching degree of this application, a set of initial test thresholds is constructed, and the method for constructing the initial test thresholds includes:

[0104] When a camera has serious problems in historical data, i.e., when the image captured by the camera is a black and white image or the image has severe color distortion or severe color cast, the ratio between the editing distance and the maximum distance is obtained to form the first data list;

[0105] A set of grey cumulative models is formed based on the first data list, that is, using A new list of data is formed, in which, This represents the nth data group in the new data list; i represents the sequence number. This represents the i-th data item in the first data list;

[0106] The new data list is processed using weighted neighbor-value processing, and a whitening differential equation is simultaneously established for the new data list, ultimately forming the model output value based on the first data list:

[0107] ;

[0108] in, This represents the model output value based on the first data list; The vector of parameters to be estimated is the ratio of the endogenous control grey number to the development grey number in the whitening differential equation. Refers to the i-th data item in the first data list; The base of the natural logarithm function; N refers to the number of data points in the first data list.

[0109] Output As a matching degree threshold, that is, when the matching degree If the matching degree threshold is greater than 0, then cameras with serious quality problems are predicted.

[0110] That is, when the matching degree threshold Match This predicts cameras with fewer quality defects, including those with slight distortion, slight color cast, or slight data loss.

[0111] Taking the data in this embodiment as an example, using As a matching threshold, if a certain camera's matching degree... If the matching degree is equal to the matching degree threshold and the recognition result has no color category string, that is, the recognized color block information does not match the labeled color block information at all; but if the recognition result has a character category string and can match the labeled character category string, then the pattern image captured by the camera is predicted to be a black and white image or the image has severe color distortion or severe color cast.

[0112] If a certain camera matching degree If the result is 0 and contains a color category string but no character category string, then the pattern image captured by the camera is predicted to be a mirror image.

[0113] If a certain camera matching degree If the result is 0 and there is no color category string or character category string in the recognition result, then the predicted pattern image captured by the camera will show severe data loss.

[0114] In this embodiment, when the edit distance is 1, if a certain camera matching degree If the recognition results contain color category strings and character category strings, and the predicted category string of one part of the entire part information does not match the calibration information string, then the prediction camera has slight distortion, slight color cast, or slight data loss.

[0115] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A camera quality detection method based on data analysis, characterized in that: The method includes: Determine the position of the camera relative to the image to be captured; The image captured by the camera is fed back to the system platform and stitched into a nine-grid image; The algorithm-based nine-square grid image recognition model is used to recognize nine-square grid images. The pattern recognition result is matched with the pattern information stored offline in advance. If a match can be made, it means that the pattern imaging is normal. If a match cannot be made, it means that the pattern imaging is abnormal. Map abnormal pattern imaging to the corresponding camera index directory, determine the camera number of the camera that took the picture, and report that the corresponding camera has a quality problem; Also includes: Based on the determined positions of the camera and the image to be captured, sample data is acquired. Model training is then performed on this sample data to generate a nine-grid image recognition algorithm model, specifically including: To limit the annotation scope, several positive sample datasets were collected. Each positive sample dataset consists of a set of nine-grid images of a pattern captured by a camera. The annotation strategy for each grid image in the nine-grid dataset is to define only the overall target and the part target. The annotation scope is limited as follows: The overall objective is to define the smallest bounding rectangle of the complete pattern. The target area includes color blocks at the four corners of a grid and a central character. The color blocks at the four corners of the grid include rectangles marked with a fixed color, which record the coordinates and the RGB values ​​and categories of all pixels within the area, where the categories are: blue, yellow, red, and green. The central character includes: the smallest bounding rectangle marked with numbers 1-9, which records the character category and its outline key points, where the character categories are: 1, 2, 3...

9. The training process includes: A data augmentation strategy is used to simulate mirror imaging: the positive sample data is horizontally flipped to retain the overall target and color block annotations; Simulated color bias: Randomly shift the HSV color space of positive sample data to reduce the model's dependence on fixed colors; Simulated partial incompleteness: Positive sample data randomly occludes 10%-40% of the region, with the aim of learning the judgment of part integrity; Simulated grayscale conversion: Positive sample data is converted to grayscale while retaining character and overall shape annotations, with the aim of enhancing shape feature learning; Design the loss function L: In the overall goal, the loss function L is constructed using Focal Loss+CIoU Loss obj , which strengthens the boundary box regression and class balance problem; In terms of color blocks, a loss function L is constructed using CIoU Loss+L2 Loss color The regression loss of the color block detection frame is calculated by CIoU Loss, and the color loss is calculated after converting the enhanced image RGB space and the original image RGB space to Lab space. The color loss of the color sample automatically increases, and the false detection is suppressed. In terms of characters, a loss function L is constructed using CIoU Loss+Smooth L1 Loss char The regression loss of the character detection box is calculated by CIoU Loss, and the Smooth L1 Loss is used to realize the regression loss of stroke inflection point coordinates. Combine the loss functions of each task according to their weights: ; wherein, respectively refer to the weight coefficients of the loss function L obj , the loss function L color , the loss function L char , and the sum is 1; the training gradients of different tasks are balanced through the weights; After the backbone network outputs candidate boxes, Soft-NMS is used to process overlapping detection boxes and retain high-confidence boxes. Color block filtering: Calculate the color difference between the average Lab value of the detected color blocks and the standard value. If the color difference is greater than the system-set threshold, the current detection result is filtered. The standard value is obtained as follows: For the same category of color block regions labeled in several positive sample datasets, extract the RGB value of each color block one by one; convert the RGB value of a single color block to Lab space representation through a color space conversion model; calculate the average of the Lab components of all color blocks of the same category, and use the final average Lab value as the standard value of that category of color block. Character filtering; In mirrored scenarios, if the character outlines are determined to be symmetrical, the character detection results are filtered. Based on the overall target and part target information of each grid image in the nine-grid image, the overall target and part target recognition category information are classified according to the spatial positional relationship between the overall target bounding box and the part target bounding box; Based on the part target bounding box and the overall target bounding box, calculate the proportion of the intersection area of ​​the part target bounding box and the overall target bounding box to the part target bounding box; ; in, This indicates the proportion of the intersection area of ​​the part's bounding box and the overall bounding box to the area of ​​the part's bounding box; Box i This represents the coordinate data of the target bounding box for the i-th part; Box j This represents the coordinate data of the j-th overall target bounding box; W represents the area of ​​the intersection between the bounding box of the part and the bounding box of the whole. Boxi h represents the width of the bounding box for the i-th part; Boxi This represents the height of the target bounding box of the i-th part; m and n represent the total number of target bounding boxes and the number of target bounding boxes of the parts, respectively. Where t is a preset threshold, If the target box of the i-th part belongs to the category corresponding to the j-th overall target box, then it is determined that the i-th part belongs to the category corresponding to the j-th overall target box; otherwise, it is determined that it does not belong to the category.

2. The camera quality inspection method based on data analysis according to claim 1, characterized in that: Determining the position of the camera and the image to be captured includes: Take any set of patterns and paste them on the same plane from left to right according to the pattern number and at the same height, with the patterns fixed at a fixed interval; place a set of cameras to be tested at a fixed distance in front of the patterns, at the same height as the center of the patterns, with one camera to be tested corresponding to one pattern. By setting the distance between the camera to be tested and the pattern, as well as the fixed interval between the patterns, ensure that each camera to be tested can only capture the image of the corresponding pattern.

3. The camera quality inspection method based on data analysis according to claim 1, characterized in that: The process of acquiring the pattern image from the camera and feeding it back to the system platform to be stitched into a nine-grid image includes: Define the label category for the overall target of the pattern within the nine-grid layout. The label categories for the rectangles in grids 1 to 9 are defined as pattern_1 to pattern_9, respectively. The corresponding grid label category must be labeled for the image features within any grid.

4. The camera quality inspection method based on data analysis according to claim 3, characterized in that: Candidate part targets and overall targets are categorized by the proportion of the intersection area of ​​the part target box and the overall target box to the part target box. The candidate part target boxes that belong to this category are sorted and output in spatial order of top left, top right, bottom right, and bottom left. The category name of the part target box is prefixed with the category name and output as a string along with the overall target category.

5. The camera quality inspection method based on data analysis according to claim 1, characterized in that: The system determines the color of the pattern and the string of the character in each grid. Based on the nine-grid image algorithm recognition model, it outputs the recognition result string, which is denoted as the first string. It obtains the string of pattern information calibrated by the system, which is denoted as the second string. It calculates the edit distance required to convert the first string to the second string, and obtains the lengths of the first string and the second string. Finally, it calculates the matching degree.

6. The camera quality inspection method based on data analysis according to claim 5, characterized in that: The calculation of the edit distance includes deletion and insertion operations. In the process of converting the first string to be exactly the same as the second string, the deletion and insertion operations at the same position are recorded as a distance.

7. The camera quality inspection method based on data analysis according to claim 5, characterized in that: The calculation of the final matching degree includes: ; in, The final match score is indicated by the following parameters: lens1 and lens2 refer to the lengths of the first and second strings, respectively; D refers to the edit distance.

8. A camera quality inspection system based on data analysis, used to implement the camera quality inspection method based on data analysis as described in claim 1, characterized in that: The system includes: The position determination module is used to determine the position of the camera relative to the image to be captured; The imaging feedback module is used to acquire the pattern imaging feedback from the camera and stitch it into a nine-grid image within the system platform; The pattern recognition module recognizes the nine-square grid image based on the nine-square grid image algorithm recognition model, and matches the pattern recognition result with the pattern information stored offline in advance. If they match, it means that the pattern imaging is normal; if they do not match, it means that the pattern imaging is abnormal. The quality inspection module is used to map abnormal pattern imaging to the corresponding camera index directory, determine the camera number of the camera that took the picture, and report the quality problem of the corresponding camera.

Citation Information

Patent Citations

  • Camera module detection method, device and equipment

    CN119835406A

  • Camera detection method, device, equipment and program product

    CN119854481A

  • Detection method for camera shooting device and camera shooting device

    CN107147902A

  • Camera module imaging quality automatic detection method and device

    CN120302024A