Camera module abnormity judgment method and device, equipment and medium
By acquiring camera module images and dividing them into sub-regions, camera module anomalies are judged based on the sharpness and consistency ratio. This solves the problem of difficulty in quickly and accurately judging image quality in existing technologies and achieves efficient camera module anomaly assessment.
Patent Information
- Application Number
- CN202511429946.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2026-01-13
AI Technical Summary
In existing technologies, it is difficult to quantify the imaging quality of robot camera modules. Human observation is time-consuming and inaccurate, and MTF analysis requires specialized equipment and technology, making it impossible to quickly identify module abnormalities.
By acquiring evaluation images captured by the camera module, the region of interest is identified and divided into multiple sub-regions. Anomaly assessment results are determined based on sharpness intensity, including edge recognition, mean blurring, and corner detection. The region sharpness and consistency ratio are calculated.
It enables rapid and accurate evaluation of the imaging quality of camera modules, reduces manpower consumption, and improves judgment efficiency and accuracy. It is applicable to both monocular and multi-view camera modules.
Smart Images

Figure CN121329903A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of camera imaging technology, and in particular to a method, apparatus, device, and medium for judging camera module anomalies. Background Technology
[0002] With the development of robotics, vision-based robotic solutions are gradually becoming mainstream. In these solutions, the imaging quality of the robot's camera module often has a significant impact on the accuracy of the robot's localization, semantic analysis, and other processing tasks. Related technologies typically employ direct human observation of the image or use modulation transfer function (MTF) to determine the imaging quality and thus identify any anomalies in the camera module.
[0003] However, when directly observing images with the human eye, there are difficulties in quantification, and some areas of the image require careful observation to notice blurry areas, resulting in high manpower consumption. Furthermore, the symmetry of camera imaging and the consistency of imaging from multi-view modules cannot be directly confirmed through observation. MTF analysis of images requires specialized equipment, software, and technicians, making it unsuitable for rapid judgment. Therefore, a convenient and efficient method for judging module anomalies is needed. Summary of the Invention
[0004] This invention provides a method, apparatus, device, and medium for judging camera module anomalies, in order to solve the problem that the imaging analysis in related technologies has a high threshold and is not suitable for rapid judgment.
[0005] In a first aspect, the present invention provides a method for judging camera module anomalies, comprising: acquiring an evaluation image captured by the camera module, and obtaining sharpness intensity based on the evaluation image; acquiring a region of interest in the evaluation image; dividing the region of interest into multiple sub-regions, and determining the anomaly evaluation result of the camera module based on the multiple sub-regions and sharpness intensity.
[0006] In some embodiments, obtaining sharpness intensity based on an evaluation image includes: performing edge recognition processing on the evaluation image to obtain a contour map; and performing mean blur processing on the contour map to obtain sharpness intensity.
[0007] In some embodiments, obtaining the region of interest (ROI) of the evaluation image includes: identifying a preset calibration plate in the evaluation image; detecting corner points of the preset calibration plate; and extracting a valid region of the evaluation image as the ROI based on the corner points.
[0008] In some embodiments, determining the abnormal evaluation result of the camera module based on multiple sub-regions and sharpness intensity includes: determining the regional sharpness of the sub-regions based on sharpness intensity; and determining the abnormal evaluation result of the camera module based on the regional sharpness of each sub-region.
[0009] In some embodiments, the abnormal evaluation result of the camera module is determined based on the regional sharpness of each sub-region, including: determining the average sharpness of the sub-region based on the regional sharpness; if the average sharpness is lower than a preset sharpness threshold, it is determined that the camera module has a sharpness abnormality; if the average sharpness is not lower than the preset sharpness threshold, it is determined that the camera module does not have a sharpness abnormality.
[0010] In some embodiments, the abnormal evaluation result of the camera module is determined based on the regional sharpness of each sub-region, including: determining the regional sharpness difference between a first adjacent region and a second adjacent region in the sub-region, and the global sharpness mean of the region of interest, based on the regional sharpness, wherein the first adjacent region and the second adjacent region are different; comparing the regional sharpness difference with the global sharpness mean to determine the consistency ratio of the region of interest; if the consistency ratio is not lower than a preset consistency threshold, it is determined that the camera module has a sharpness symmetry abnormality; if the consistency ratio is lower than the preset consistency threshold, it is determined that the camera module does not have a sharpness symmetry abnormality.
[0011] In some embodiments, the camera module is a multi-view camera module, and the regional sharpness includes at least the first-view regional sharpness of the first evaluation image and the second-view regional sharpness of the second evaluation image. The first evaluation image is acquired by the first-view camera in the multi-view camera module, and the second evaluation image is acquired by the second-view camera in the multi-view camera module. Based on the regional sharpness of each sub-region, the abnormal evaluation result of the camera module is determined, including: determining the sharpness difference between the first evaluation image and the second evaluation image based on the first-view regional sharpness and the second-view regional sharpness; if the sharpness difference is not lower than a preset sharpness difference threshold, it is determined that the camera module has an inter-view consistency anomaly; if the sharpness difference is lower than the sharpness difference threshold, it is determined that the camera module does not have an inter-view consistency anomaly.
[0012] Secondly, the present invention provides a camera module anomaly judgment device, comprising: a data acquisition module for acquiring an evaluation image captured by the camera module and acquiring sharpness intensity based on the evaluation image; a region acquisition module for acquiring a region of interest in the evaluation image; and an anomaly evaluation module for dividing the region of interest into multiple sub-regions and determining the anomaly evaluation result of the camera module based on the multiple sub-regions and sharpness intensity.
[0013] Thirdly, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned camera module anomaly judgment method.
[0014] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described camera module anomaly detection method.
[0015] In the aforementioned camera module anomaly judgment method, apparatus, device, and medium, the following scheme is implemented: acquiring an evaluation image captured by the camera module and obtaining sharpness intensity based on the evaluation image; acquiring the region of interest (ROI) of the evaluation image; dividing the ROI into multiple sub-regions; and determining the anomaly assessment result of the camera module based on the multiple sub-regions and sharpness intensity. The method of this invention, by acquiring an evaluation image, dividing the ROI into sub-regions, and performing correlation analysis between the divided sub-regions and sharpness intensity, can effectively compare the sharpness differences between each sub-region, thereby identifying whether there are abnormal regions in the evaluation image, and thus achieving rapid assessment of the imaging quality of the camera module. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. 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.
[0017] Figure 1 This is a flowchart of a camera module anomaly detection method according to an embodiment of the present invention; Figure 2 This is another flowchart of a camera module anomaly detection method in one embodiment of the present invention; Figure 3 This is another flowchart of a camera module anomaly detection method in one embodiment of the present invention; Figure 4 This is another flowchart of a camera module anomaly detection method in one embodiment of the present invention; Figure 5 This is a schematic block diagram of a camera module anomaly detection device according to an embodiment of the present invention; Figure 6 This is a schematic block diagram of a computer device according to an embodiment of the present invention. Detailed Implementation
[0018] As an example, such as Figure 1 As shown, a method for judging camera module anomalies is provided, including the following steps: S101, acquire the evaluation image captured by the camera module, and obtain the sharpness intensity based on the evaluation image; S102, Obtain the region of interest in the evaluation image; S103 divides the region of interest into multiple sub-regions and determines the anomaly evaluation results of the camera module based on the multiple sub-regions and the sharpness intensity.
[0019] As an example, in step S101, the evaluation image captured by the camera module can be obtained through the debugging interface of the camera module, but it is not limited to this. The evaluation image captured by the camera module can also be obtained by accessing the database that stores the evaluation images. Then, by performing gradient operation on the evaluation image, its second derivative is calculated to extract the image contour of the evaluation image, and by blurring the image contour, the sharpness intensity of the evaluation image is obtained.
[0020] In other words, sharpness intensity can be used to indicate the sharpness of each region in the evaluation image. This invention does not limit the specific method of obtaining sharpness intensity. For example, it can also be calculated using other image sharpness algorithms, such as the Brenner function, the Laplacian function, etc., to determine the sharpness intensity of the evaluation image.
[0021] In one instance, the evaluation image may be an image containing a standard test pattern, such as black stripes or a checkerboard pattern on a white background, to facilitate region segmentation and anomaly assessment of the evaluation image.
[0022] As an example, in step S102, since the camera module may experience lens distortion or other issues during actual shooting, resulting in a deviation between the evaluation image and the actual scene, it is necessary to identify the evaluation image, determine the effective area in the evaluation image as the region of interest, and then eliminate the interference of invalid areas caused by distortion or occlusion at the image edge, which helps to improve the accuracy of anomaly judgment.
[0023] In other words, the region of interest is the effective area in the evaluation image used for sharpness analysis. For example, it is the area in the evaluation image that contains a pre-defined standard test pattern. The region of interest can be a part of the evaluation image or the entire evaluation image, depending on the distance between the standard test pattern and the camera module, as well as the size of the standard test pattern. This invention does not limit this.
[0024] For example, when the standard test pattern is a single-board calibration board, lens distortion may cause other invalid areas (such as black borders, surrounding background areas, etc.) to exist in the evaluation image in addition to the standard test pattern. In this case, only the area containing the standard test pattern can be taken as the region of interest. When the standard test pattern is a multi-board calibration board or calibration box, since the range of the standard test pattern is large enough, even if there is lens distortion, the standard test pattern can still cover the entire area of the evaluation image. Therefore, the entire evaluation image can be taken as the region of interest.
[0025] For example, in step S103, the region of interest can be divided into multiple sub-regions, and the sharpness of each sub-region can be determined according to the sharpness intensity. By analyzing the sharpness intensity of each sub-region, it can be determined whether there is an abnormality in the camera module and the specific cause of the abnormality in the camera module.
[0026] The present invention does not limit the method of dividing the sub-regions. For example, the region of interest can be uniformly divided into a 3×3 grid, or the region of interest can be non-uniformly divided according to a preset partitioning scheme. The present invention does not limit this.
[0027] In summary, this invention proposes a method for judging camera module anomalies, comprising: acquiring an evaluation image captured by the camera module and obtaining sharpness intensity based on the evaluation image; acquiring the region of interest (ROI) of the evaluation image; dividing the ROI into multiple sub-regions; and determining the anomaly assessment result of the camera module based on the multiple sub-regions and sharpness intensity. By acquiring the evaluation image, dividing the ROI into sub-regions, and performing correlation analysis between the divided sub-regions and sharpness intensity, the sharpness differences between each sub-region can be effectively compared, thereby identifying whether there are abnormal regions in the evaluation image, thus achieving rapid assessment of the imaging quality of the camera module.
[0028] As an example, such as Figure 2 As shown, step S101, which is to obtain sharpness intensity based on the evaluation image, includes: S201, perform edge recognition processing on the evaluation image to obtain a contour map; S202, perform mean blurring on the contour map to obtain clear intensity.
[0029] For example, in step S201, the purpose of edge recognition processing is to extract the overall contour features of the evaluation image, thereby providing a basis for subsequent sharpness intensity calculation. Specifically, edge detection of the evaluation image can be performed using the Laplacian operator, Lobes operator, or Canny operator to determine the boundaries of image changes in the evaluation image, thereby obtaining the contour map of the evaluation image.
[0030] In one embodiment, edge regions in the evaluation image can be determined by performing second-order differentiation on the evaluation image, i.e., edge recognition is performed using the Laplacian operator. However, during the second-order differentiation calculation, image noise is significantly amplified, leading to artifacts or breaks in the edge recognition results. Therefore, the image can be filtered or otherwise smoothed before edge recognition to suppress noise interference. For example, Gaussian filtering can be used to preprocess the evaluation image, thereby reducing the impact of image noise on the edge recognition results.
[0031] Alternatively, the contour plot of the evaluation image can be determined using the following formula: in, It represents the grayscale value of each pixel (or pixel grid) in the evaluation image; It represents the second partial derivative of the gray value of each pixel in the horizontal direction (i.e., the x-axis), and is used to indicate the rate of change of gray value in the horizontal direction of the image. It represents the second-order partial derivative of the gray value of each pixel in the vertical direction (i.e., the y-axis), which is used to indicate the rate of change of gray value in the vertical direction of the image. Represents the Laplace operator; It represents the degree of grayscale change of each pixel, that is, the output result (contour map) after the second derivative is calculated.
[0032] As an example, in step S202, the contour map is subjected to mean blurring to convert the contour intensity of the region into the sharpness intensity of the region, thereby reflecting the imaging sharpness of each region.
[0033] In one embodiment, mean blurring can smooth the contour intensity distribution by calculating the average value of pixels in the local neighborhood, effectively suppressing the influence of isolated noise points while preserving the overall sharpness trend of the region. The result of this processing is the sharpness intensity; in other words, sharpness intensity can be used to indicate the distribution of sharpness in an image.
[0034] In summary, this invention proposes a method for judging camera module anomalies, comprising: performing edge recognition processing on the evaluation image to obtain a contour map; and performing mean blur processing on the contour map to obtain sharpness intensity. The method of this invention, through edge recognition and smoothing processing, transforms the contour features in the evaluation image into a quantifiable sharpness intensity distribution, achieving a refined characterization of the image region's sharpness and helping to improve the accuracy of anomaly assessment results.
[0035] As an example, such as Figure 3 As shown, step S102, obtaining the region of interest of the evaluation image, includes: S301, Identify the preset calibration plate in the evaluation image; S302, detect the corner points of the preset calibration plate, and extract the effective area of the evaluation image as the region of interest based on the corner points.
[0036] As an example, in step S301, the evaluation image can be identified by means of feature matching, template matching, etc., so as to determine the position of the preset calibration plate in the evaluation image.
[0037] The preset calibration plate is used to indicate the effective area in the evaluation image. The preset calibration plate can be a checkerboard calibration plate, a dot calibration plate, or other calibration patterns with specific geometric features. This invention does not limit the specific calibration plate to these features.
[0038] As an example, in step S302, a corner detection algorithm, such as the Harris corner detection algorithm, can be used to detect the corner positions of the preset calibration board, thereby determining the area enclosed by the corners as the effective area and using it as the region of interest for subsequent sharpness analysis.
[0039] In one example, the corner coordinates of a preset calibration board can be detected by feature point recognition, thereby determining the region enclosed by the corner coordinates (or decoding the corner positions) as the region of interest.
[0040] In summary, this invention proposes a method for judging camera module anomalies, comprising: identifying a preset calibration board in an evaluation image; detecting corner points of the preset calibration board; and extracting the effective region of the evaluation image as the region of interest based on the corner points. The method of this invention, by identifying the corner points of the calibration board, locates the effective imaging region of the evaluation image, ensuring accurate positioning of the effective region and avoiding interference from external environmental factors or camera module lens distortion on sharpness evaluation, thereby improving the reliability of anomaly evaluation results.
[0041] As an example, such as Figure 4 As shown, step S103, based on multiple sub-regions and sharpness intensity, determines the anomaly evaluation results of the camera module, including: S401, based on sharpness intensity, determines the regional sharpness of a sub-region; S402, based on the regional sharpness of each sub-region, determines the anomaly assessment result of the camera module.
[0042] As an example, in step S401, the overall sharpness intensity of the evaluation image can be statistically divided according to the division of sub-regions to obtain the regional sharpness of each sub-region (i.e., the distribution of content sharpness in each sub-region).
[0043] Among them, sharpness intensity can be used to indicate the sharpness intensity value of each pixel (or pixel grid) in the evaluation image, which can indicate the degree of grayscale change of each pixel.
[0044] For example, the evaluation image can be divided into 3×3 sub-regions. Then, based on the overall intensity of the evaluation image, the sharpness distribution of each sub-region in the 3×3 sub-regions can be determined, thereby determining the regional sharpness of each sub-region based on the sharpness distribution of each sub-region.
[0045] Optionally, the regional sharpness of a sub-region can also be obtained by dividing the evaluation image into multiple sub-regions (such as grid blocks m*n), and then calculating the Laplacian variance and the mean gradient of each sub-region.
[0046] As an example, in step S402, statistical analysis of the regional sharpness of each sub-region can be performed to determine whether there is an abnormality in the regional sharpness of each sub-region, thereby determining whether there is an abnormality in the camera module and thus determining the corresponding abnormality assessment result.
[0047] In one embodiment, the presence of abrupt changes in regional clarity can be determined by comparing the regional clarity of each sub-region, thereby determining whether there is a module anomaly. Alternatively, the presence of a module anomaly can be determined by comparing the clarity of each region with the overall clarity intensity of the evaluation image. This invention does not limit the method of determining module anomalies.
[0048] Specifically, in one embodiment, the average sharpness of a sub-region can be determined based on the regional sharpness; if the average sharpness is lower than a preset sharpness threshold, it is determined that the camera module has a sharpness abnormality; if the average sharpness is not lower than the preset sharpness threshold, it is determined that the camera module does not have a sharpness abnormality.
[0049] In other words, the average sharpness of each sub-region can be calculated by averaging the regional sharpness of each sub-region, and then compared with a preset sharpness threshold (e.g., 15). If the average sharpness of any sub-region is lower than the preset sharpness threshold, it indicates that the camera module has an imaging blur problem in that region, and the abnormal evaluation result is judged as a sharpness abnormality. If the average sharpness of all sub-regions is not lower than the preset sharpness threshold, the overall imaging quality is considered to meet the requirements, and the abnormal evaluation result is judged as no sharpness abnormality.
[0050] It should be understood that the preset sharpness threshold can be dynamically adjusted according to the type of preset calibration board and the distance between the preset calibration board and the camera module to ensure the accuracy and adaptability of the judgment of abnormal evaluation results.
[0051] Specifically, in one embodiment, the difference in regional sharpness between a first adjacent region and a second adjacent region in a sub-region, and the global average sharpness of the region of interest can be determined based on regional sharpness, where the first adjacent region and the second adjacent region are different. The difference in regional sharpness is compared with the global average sharpness to determine the consistency ratio of the region of interest. If the consistency ratio is not lower than a preset consistency threshold, it is determined that the camera module has a sharpness symmetry abnormality. If the consistency ratio is lower than the preset consistency threshold, it is determined that the camera module does not have a sharpness symmetry abnormality.
[0052] In this context, the first adjacent region refers to the regions within each sub-region that are vertically adjacent. For example, when the evaluation image is divided into four 2×2 sub-regions, the top-left sub-region and the bottom-left sub-region form a first adjacent region, and the top-right sub-region and the bottom-right sub-region form a first adjacent region. The second adjacent region refers to the regions within each sub-region that are horizontally adjacent. For example, when the evaluation image is divided into four 2×2 sub-regions, the top-left sub-region and the top-right sub-region form a second adjacent region, and the bottom-left sub-region and the bottom-right sub-region form a second adjacent region. It should be understood that the first adjacent region can also refer to the regions within each sub-region that are horizontally adjacent, in which case the second adjacent region refers to the regions that are vertically adjacent.
[0053] In other words, the consistency ratio of the evaluation image can be obtained by calculating the sharpness difference between each group of adjacent sub-regions above and below or left and right in the evaluation image and dividing it by the global sharpness mean. If the consistency ratio is greater than or equal to a preset consistency threshold (e.g., 0.5), it is determined that the camera module has a sharpness asymmetry problem in the corresponding direction, and the abnormal evaluation result is a sharpness symmetry abnormality. If the consistency ratio is less than the preset consistency threshold, it is considered that the sharpness distribution of the camera module is uniform in the corresponding direction, and the abnormal evaluation result is determined to be that there is no sharpness symmetry abnormality.
[0054] For example, the presence of a sharpness symmetry anomaly in the camera module can be determined by judging whether the regional sharpness difference and the global sharpness mean satisfy the following discriminant: in, Indicates the difference in sharpness between regions. This represents the global sharpness mean, with 0.5 being a preset consistency threshold. Therefore, when the regional sharpness difference and the global sharpness mean satisfy... When the camera module does not exhibit any sharpness symmetry anomalies, it is determined that the regional sharpness difference and the global sharpness mean do not meet the requirements. At that time, it was determined that the camera module had a problem with asymmetric sharpness.
[0055] Optionally, the first adjacent region can also be a diagonally adjacent sub-region (for example, when the evaluation image is divided into four 2×2 sub-regions, the upper left sub-region and the lower right sub-region are a group of first adjacent regions), and the second adjacent region is another diagonally adjacent sub-region (for example, when the evaluation image is divided into four 2×2 sub-regions, the lower left sub-region and the upper right sub-region are a group of second adjacent regions). That is, the difference in sharpness between two diagonally distributed sub-regions in the evaluation image can also be used as a basis for consistency judgment. The present invention does not limit the specific sub-regions indicated by the first and second adjacent regions.
[0056] It should be understood that the camera module in the above embodiments can be a monocular camera module, a dual monocular camera module, or a multi-monocular camera module, and the present invention does not limit it in this regard.
[0057] Specifically, in one embodiment, the camera module is a dual-single-camera module or a multi-single-camera module. The regional sharpness includes at least the first-view region sharpness of the first evaluation image and the second-view region sharpness of the second evaluation image. The first evaluation image is acquired by the first-view camera in the multi-view camera module, and the second evaluation image is acquired by the second-view camera in the multi-view camera module. Then, the device executing this method can determine the sharpness difference between the first evaluation image and the second evaluation image based on the first-view region sharpness and the second-view region sharpness. If the sharpness difference is not lower than a preset sharpness difference threshold, it is determined that the camera module has an inter-view consistency anomaly. If the sharpness difference is lower than the sharpness difference threshold, it is determined that the camera module does not have an inter-view consistency anomaly.
[0058] The first visual region sharpness can be the regional sharpness of any sub-region in the first evaluation image, or the average sharpness of each sub-region in the first evaluation image; similarly, the second visual region sharpness can be the regional sharpness of the sub-region in the second evaluation image that corresponds to the first visual region sharpness, or the average sharpness of each sub-region in the second evaluation image, and the present invention does not limit it in this way.
[0059] Among them, inter-eye consistency abnormality refers to a large difference in sharpness when different cameras in a multi-eye camera module shoot the same object. That is, the sharpness of all or part of the sub-regions of the first evaluation image and the second evaluation image obtained by different cameras is not lower than the preset sharpness difference threshold.
[0060] In other words, the consistency of image sharpness among multi-camera modules can be determined by comparing the regional sharpness differences or the overall average sharpness differences of corresponding sub-regions in the images acquired by different cameras in the multi-camera module. When the difference exceeds or equals a preset sharpness difference threshold (e.g., 5), it is considered that the sharpness difference among multi-camera modules is too large, and it is determined that there is an inter-camera consistency anomaly in the camera module. When the difference is less than the preset sharpness difference threshold, it is considered that the sharpness difference among multi-camera modules is within an acceptable range, and it is determined that there is no inter-camera consistency anomaly in the camera module.
[0061] For example, taking the first evaluation image and the second evaluation image as being equally divided into four sub-regions of 2×2, if the difference in regional sharpness between the upper left sub-region of the first evaluation image and the second evaluation image is less than the preset sharpness difference threshold of 5, it is determined that the difference in sharpness between different target cameras in the camera module is small, that is, there is no inter-target consistency abnormality in the camera module. Taking the first evaluation image and the second evaluation image as an example of dividing them into nine sub-regions of 3×3, if the difference in sharpness between the first evaluation image and the second evaluation image in the central sub-region is greater than the preset sharpness difference threshold of 5, it is determined that the sharpness difference between different target cameras in the camera module is large, that is, there is an abnormality in the inter-target consistency of the camera module.
[0062] Optionally, the overall regional sharpness difference between the first evaluation image and the second evaluation image can also be judged. For example, the average value of each sub-region in the first evaluation image and the second evaluation image can be processed to obtain the overall sharpness average value of the first evaluation image and the overall sharpness average value of the second evaluation image. When the difference between the overall sharpness average value of the first evaluation image and the overall sharpness average value of the second evaluation image is not less than the preset sharpness difference threshold of 5, it is determined that the sharpness difference of different target cameras in the camera module is large, that is, there is an abnormality in the inter-target consistency of the camera module.
[0063] In summary, this invention proposes a method for judging camera module anomalies, comprising: determining the regional sharpness of sub-regions based on sharpness intensity; and determining the anomaly assessment result of the camera module based on the regional sharpness of each sub-region. The method of this invention identifies potential imaging defects by analyzing the distribution characteristics of regional sharpness, thereby determining whether the camera module has anomalies and generating corresponding anomaly assessment results, effectively enhancing the sensitivity and accuracy of anomaly detection.
[0064] The method of the present invention has the following beneficial effects: 1. By acquiring evaluation images, the region of interest is divided into sub-regions, and the sub-regions are correlated with sharpness intensity. This can effectively compare the sharpness differences between the sub-regions, thereby identifying whether there are abnormal regions in the evaluation image, and thus achieving rapid evaluation of the imaging quality of the camera module.
[0065] 2. By performing edge recognition and mean blurring on the evaluation image, contour information in the image is extracted and transformed into regional sharpness representation, which enhances the sensitivity to blurred regions, reduces the interference of noise on the evaluation results, and improves the evaluation accuracy.
[0066] 3. By determining the average sharpness of sub-regions and calculating the sharpness differences between regions based on this, and combining it with preset thresholds to determine whether there is local blur or consistency anomalies, the overall evaluation of the camera module is achieved through block statistics and comparative analysis.
[0067] 4. By determining the regional sharpness difference between the first and second adjacent regions in the sub-region, and the global sharpness mean of the region of interest, the ratio of the local sharpness difference to the global mean is calculated, thereby effectively identifying abrupt changes in local sharpness and further determining whether the camera module has imaging inconsistency defects.
[0068] 5. By comparing the mean sharpness differences of corresponding sub-regions of multiple cameras and combining them with a preset sharpness difference threshold, the consistency of imaging sharpness among multiple cameras can be determined. This effectively identifies imaging inconsistencies among multiple cameras, improves the applicability of this method, and enhances the accuracy of anomaly assessment results.
[0069] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0070] In one embodiment, a camera module anomaly detection device is provided, which corresponds one-to-one with the camera module anomaly detection method described in the above embodiments. For example... Figure 5 As shown, the camera module anomaly detection device includes a data acquisition module 501, an area acquisition module 502, and an anomaly evaluation module 503. Detailed descriptions of each functional module are as follows: The data acquisition module 501 is used to acquire the evaluation image captured by the camera module and obtain the sharpness intensity based on the evaluation image; The region acquisition module 502 is used to acquire the region of interest in the evaluation image; Anomaly assessment module 503 is used to divide the region of interest into multiple sub-regions and determine the anomaly assessment results of the camera module based on the multiple sub-regions and the sharpness intensity.
[0071] In one embodiment, the data acquisition module 501 is further configured to perform edge recognition processing on the evaluation image to obtain a contour map; and to perform mean blur processing on the contour map to obtain a clear intensity.
[0072] In one embodiment, the region acquisition module 502 is further configured to: identify a preset calibration plate in the evaluation image; detect corner points of the preset calibration plate; and extract a valid region of the evaluation image as a region of interest based on the corner points.
[0073] In one embodiment, the anomaly assessment module 503 is further configured to: determine the regional sharpness of a sub-region based on sharpness intensity; and determine the anomaly assessment result of the camera module based on the regional sharpness of each sub-region.
[0074] In one embodiment, the anomaly assessment module 503 is further configured to determine the average sharpness of a sub-region based on the regional sharpness; if the average sharpness is lower than a preset sharpness threshold, then the camera module is determined to have a sharpness anomaly; if the average sharpness is not lower than the preset sharpness threshold, then the camera module is determined not to have a sharpness anomaly.
[0075] In one embodiment, the anomaly assessment module 503 is further configured to: determine the regional sharpness difference between a first adjacent region and a second adjacent region in a sub-region, and the global sharpness mean of the region of interest, based on the regional sharpness, wherein the first adjacent region and the second adjacent region are different; compare the regional sharpness difference with the global sharpness mean to determine the consistency ratio of the region of interest; if the consistency ratio is not lower than a preset consistency threshold, then it is determined that the camera module has a sharpness symmetry anomaly; if the consistency ratio is lower than the preset consistency threshold, then it is determined that the camera module does not have a sharpness symmetry anomaly.
[0076] In one embodiment, the anomaly assessment module 503 is further configured to: ...
[0077] This invention provides a camera module anomaly detection device, comprising: a data acquisition module for acquiring an evaluation image captured by the camera module and obtaining sharpness intensity based on the evaluation image; a region acquisition module for acquiring a region of interest (ROI) in the evaluation image; and an anomaly assessment module for dividing the ROI into multiple sub-regions and determining the anomaly assessment result of the camera module based on the multiple sub-regions and sharpness intensity. The device of this invention, by acquiring the evaluation image, dividing the ROI into sub-regions, and performing correlation analysis between the divided sub-regions and sharpness intensity, can effectively compare the sharpness differences between the sub-regions, thereby identifying whether there are abnormal regions in the evaluation image, thus achieving rapid assessment of the imaging quality of the camera module.
[0078] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database is used for data in the camera module anomaly detection method. The network interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a camera module anomaly detection method.
[0079] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a camera module anomaly detection method.
[0080] In one embodiment, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program that, when executed by a processor, implements a camera module anomaly detection method.
[0081] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), IAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0082] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0083] The above-described 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 the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for judging camera module anomalies, characterized in that, include: The evaluation image captured by the camera module is obtained, and the sharpness intensity is obtained based on the evaluation image; Obtain the region of interest in the evaluation image; The region of interest is divided into multiple sub-regions, and based on the multiple sub-regions and the sharpness intensity, the anomaly evaluation result of the camera module is determined.
2. The method according to claim 1, characterized in that, Obtaining sharpness intensity based on the evaluation image includes: The evaluation image is subjected to edge recognition processing to obtain a contour map; The contour image is subjected to mean blurring to obtain a clear intensity.
3. The method according to claim 1, characterized in that, The step of obtaining the region of interest of the evaluation image includes: Identify the preset calibration plate in the evaluation image; The corner points of the preset calibration plate are detected, and the effective regions of the evaluation image are extracted as regions of interest based on the corner points.
4. The method according to claim 1, characterized in that, The determination of the abnormal evaluation result of the camera module based on the multiple sub-regions and the sharpness intensity includes: Based on the sharpness intensity, determine the regional sharpness of the sub-region; Based on the regional sharpness of each sub-region, the anomaly assessment result of the camera module is determined.
5. The method according to claim 4, characterized in that, The determination of the anomaly evaluation result of the camera module based on the regional sharpness of each of the sub-regions includes: Based on the regional sharpness, determine the average sharpness of the sub-region; If the average sharpness is lower than a preset sharpness threshold, then the camera module is determined to have a sharpness abnormality. If the average sharpness is not lower than the preset sharpness threshold, then the camera module is determined to have no sharpness abnormalities.
6. The method according to claim 4, characterized in that, The determination of the anomaly evaluation result of the camera module based on the regional sharpness of each of the sub-regions includes: Based on the regional sharpness, the regional sharpness difference between the first adjacent region and the second adjacent region in the sub-region is determined, as well as the global sharpness mean of the region of interest, wherein the first adjacent region and the second adjacent region are different regions; The region sharpness difference is compared with the global sharpness mean to determine the consistency ratio of the region of interest; If the consistency ratio is not lower than the preset consistency threshold, then the camera module is determined to have an abnormal sharpness symmetry. If the consistency ratio is lower than the preset consistency threshold, it is determined that the camera module does not have any sharpness symmetry abnormality.
7. The method according to claim 4, characterized in that, The camera module is a multi-view camera module, and the region sharpness includes at least the first-view region sharpness of the first evaluation image and the second-view region sharpness of the second evaluation image. The first evaluation image is acquired by the first-view camera in the multi-view camera module, and the second evaluation image is acquired by the second-view camera in the multi-view camera module. The determination of the anomaly evaluation result of the camera module based on the regional sharpness of each of the sub-regions includes: Based on the sharpness of the first eye region and the sharpness of the second eye region, the sharpness difference between the first evaluation image and the second evaluation image is determined; If the sharpness difference is not lower than the preset sharpness difference threshold, then the camera module is determined to have an inter-eye consistency abnormality. If the sharpness difference is lower than the sharpness difference threshold, it is determined that the camera module does not have an inter-eye consistency anomaly.
8. A camera module anomaly detection device, characterized in that, include: The data acquisition module is used to acquire the evaluation image captured by the camera module and obtain the sharpness intensity based on the evaluation image; A region acquisition module is used to acquire the region of interest in the evaluation image; An anomaly assessment module is used to divide the region of interest into multiple sub-regions and determine the anomaly assessment result of the camera module based on the multiple sub-regions and the sharpness intensity.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the camera module anomaly detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the camera module anomaly detection method as described in any one of claims 1 to 7.
Citation Information
Cited By
Image definition evaluation method, device and equipment
CN121691908A