Relative illumination detection method and related equipment for camera modules
By dividing the imaging circle area of the camera module into concentric ring sampling areas and increasing the density of the outer sampling frame using polar coordinate positioning, the problems of insufficient relative illumination detection range and low accuracy in the existing technology are solved, achieving accurate characterization of the brightness distribution of the entire field of view and improving the accuracy and stability of detection.
Patent Information
- Application Number
- CN202611415930.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-11
- Publication Date
- 2026-11-06
AI Technical Summary
Existing relative illumination detection methods for camera modules cannot accurately reflect the brightness distribution across the entire field of view, resulting in insufficient detection range, low accuracy, and inability to adapt to the field of view and optical characteristics of different camera modules.
The imaging circular division based on the field of view ratio and polar coordinate adaptive density sampling are adopted. By dividing the imaging circular area into multiple concentric circular sampling areas and increasing the sampling frame density in the outer circular sampling area, brightness data of multiple areas are obtained and relative illumination is calculated.
It improves the accuracy and stability of relative illumination detection, can comprehensively reflect the brightness distribution of the entire field of view of the camera module, and is applicable to the optical characteristics of different camera modules.
Smart Images

Figure CN123055868A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of camera module technology, and more specifically, to a method and related equipment for detecting the relative illumination of a camera module. Background Technology
[0002] With the rapid development of smart terminals, smart cars, and machine vision technologies, camera modules, as crucial sensing components for acquiring image information, are widely used in mobile phones, automotive systems, industrial inspection, and smart devices. The imaging quality of camera modules directly affects the visual performance of terminal devices. Relative illumination, as a key indicator for evaluating the brightness consistency between the edge and center areas of a lens, plays a vital role in measuring vignetting, fading characteristics, and overall image uniformity. Therefore, the accuracy and reliability of relative illumination detection technology for camera modules are of great significance for improving the design quality and product performance of camera modules.
[0003] In related technologies, the detection of relative illumination of camera modules typically employs a fixed-position frame sampling method. For example, sampling frames are set at the four corners of the imaging area, and the relative illumination result is obtained by collecting the brightness values of the corner areas and the center area and calculating the ratio. However, this type of detection method, due to its fixed sampling position and limited sample size, struggles to cover the brightness variations within the entire imaging field of view of the camera module. It cannot accurately reflect the actual brightness attenuation characteristics of edge areas, vignetting areas, and asymmetrical dark corner areas. Furthermore, different camera modules have different field of view angles, imaging ranges, and optical characteristics, making it difficult to adapt the fixed frame position to the actual field of view distribution, easily leading to a mismatch between the detection area and the actual optical change area. In other words, related technologies suffer from insufficient coverage, low detection accuracy, and an inability to accurately reflect the brightness distribution characteristics of the entire field of view. Summary of the Invention
[0004] The relative illumination detection method and related equipment for camera modules provided in this application can accurately characterize the brightness distribution of the entire field of view of a camera module by dividing the imaging ring based on the field of view ratio, polar coordinate adaptive density sampling, and multi-region brightness data acquisition, thereby improving the accuracy, stability, and applicability of relative illumination detection.
[0005] In a first aspect, this application provides a method for detecting the relative illumination of a camera module, comprising: dividing at least two concentric annular sampling areas radially according to a preset field-of-view ratio based on the imaging circular region of the camera module under test, wherein the preset field-of-view ratio is used to determine the radial boundary of each of the annular sampling areas; generating multiple sampling frames for each of the annular sampling areas using polar coordinate positioning, wherein the distribution density of sampling frames in the outer annular sampling area of the imaging circular region is higher than that in the inner annular sampling area; acquiring brightness data in each of the sampling frame areas when the camera module under test captures a preset test image; and determining the relative illumination of the camera module under test based on the brightness data in each of the sampling frame areas.
[0006] In some implementations, the imaging circular region based on the camera module under test is radially divided into at least two concentric annular sampling regions according to a preset field-of-view ratio. This includes: obtaining the target sampling frame size and the imaging circle diameter of the imaging circular region; determining the total number of annular sampling regions based on the ratio of the imaging circle diameter to the target sampling frame size; and determining the radial boundary of each annular sampling region according to the preset field-of-view ratio and the total number, thereby obtaining the at least two concentric annular sampling regions.
[0007] In some implementations, the step of obtaining the target sampling frame size includes: obtaining the field of view parameters of the camera module under test and the imaging circle radius of the imaging circle region; determining the radial pixel span corresponding to a unit field of view in the imaging circle region based on the field of view parameters; and determining the target sampling frame size by multiplying the radial pixel span by a preset precision coefficient, wherein the preset precision coefficient represents the number of pixel span units covered by a single sampling frame radially.
[0008] In some implementations, generating multiple sampling frames using polar coordinate positioning for each of the annular sampling regions includes: for each annular sampling region, determining the radial position of the sampling frame within the annular sampling region based on the ring number of the annular sampling region and the target sampling frame size; determining the corresponding angle step size based on the ring number, wherein the angle step size decreases as the ring number increases; determining the number of sampling frames within the annular sampling region and the polar angle position of each sampling frame based on the angle step size; and determining the polar coordinates of each sampling frame based on the radial position and the polar angle position.
[0009] In some embodiments, acquiring the brightness data of each sampling frame region when the camera module under test captures a preset test image includes: converting the polar coordinates of each sampling frame into pixel coordinates in the preset test image; determining the pixel region corresponding to each sampling frame in the preset test image based on the pixel coordinates of each sampling frame and the target sampling frame size; and acquiring the average value of the brightness of all pixels in each pixel region when the camera module under test captures the preset test image, as the brightness data of the corresponding sampling frame.
[0010] In some embodiments, converting the polar coordinates of each sampling frame into pixel coordinates in the preset test image includes: acquiring a standard test image output by the camera module under test; calculating the offset of the luminance centroid and geometric center of the standard test image to obtain the optical center offset of the camera module under test; and performing translation correction on the initial pixel coordinates of each sampling frame based on the optical center offset to obtain the pixel coordinates.
[0011] In some implementations, determining the relative illumination of the camera module under test based on the brightness data within each of the sampling frame regions includes: associating the brightness data of each sampling frame with the corresponding radial position to generate a brightness distribution matrix; obtaining a brightness attenuation fitting curve of brightness changing with radial distance based on the brightness distribution matrix; extracting a first brightness statistical value within a first radial range and a second brightness statistical value within a second radial range based on the brightness attenuation fitting curve, wherein the first radial range is close to the center of the imaging circular region and the second radial range is close to the edge of the imaging circular region; and determining the relative illumination based on the ratio of the second brightness statistical value to the first brightness statistical value.
[0012] In some embodiments, after determining the relative illuminance of the camera module under test based on the brightness data within each of the sampling frame areas, the camera module relative illuminance detection method further includes: obtaining a preset relative illuminance qualification threshold; comparing the relative illuminance with the preset relative illuminance qualification threshold to obtain the illuminance uniformity determination result of the camera module under test.
[0013] Secondly, this application also provides a relative illumination detection device for a camera module, comprising: a region division unit, used to divide at least two concentric annular sampling areas radially according to a preset field-of-view ratio based on the imaging circular region of the camera module under test; a sampling frame generation unit, used to generate multiple sampling frames for each of the annular sampling areas using polar coordinate positioning, wherein the distribution density of sampling frames in the outer annular sampling area of the imaging circular region is higher than that in the inner annular sampling area; a brightness acquisition unit, used to acquire brightness data in each of the sampling frame areas when the camera module under test captures a preset test image; and a relative illumination determination unit, used to determine the relative illumination of the camera module under test based on the brightness data in each of the sampling frame areas.
[0014] Thirdly, this application also provides an electronic device, including: a memory and a processor, wherein the processor is configured to execute a computer program stored in the memory to implement the steps of the camera module relative illumination detection method described in the first aspect.
[0015] Fourthly, this application also provides a computer-readable storage medium storing computer-executable instructions or a computer program, wherein when the computer-executable instructions or the computer program are executed by a processor, the steps of the camera module relative illumination detection method described in the first aspect are implemented.
[0016] Fifthly, this application also provides a computer program product, including a computer program or computer executable instructions, which, when executed by a processor, implement the steps of the camera module relative illumination detection method provided in the embodiments of this application.
[0017] In summary, this application divides the imaging circular region of the camera module under test into at least two concentric annular sampling areas radially according to a preset field-of-view ratio. Compared with the traditional method of sampling a small number of samples at fixed positions, this method can establish a correspondence between the sampling area and the actual imaging field of view of the camera module. By dividing the area into annular regions, the brightness changes at different field-of-view positions within the imaging circle can be included in the detection range, thereby improving the characterization ability of the overall field-of-view brightness distribution and avoiding the problem that the relative illumination detection results cannot reflect the true brightness attenuation due to insufficient sampling area. Since multiple sampling frames are generated for each annular sampling area using polar coordinate positioning, and the sampling frame distribution density in the outer annular sampling area is higher than that in the inner annular sampling area, differentiated sampling can be achieved according to the characteristics of the radial position of the imaging circle. The edge field of view of a camera module typically corresponds to areas of more pronounced brightness variation. By increasing the number of sampling frames in the outer region, richer edge brightness data can be obtained, enabling the detection process to more meticulously describe the brightness differences between different field of view positions and improve the accuracy of relative illumination detection. By acquiring brightness data within each sampling frame region when the camera module under test captures a preset test image, a complete detection dataset can be constructed from brightness data corresponding to multiple spatial locations. Compared to methods that only use brightness values from a few fixed locations for calculation, relative illumination can be determined based on the actual brightness information of multiple sampling areas. This means the relative illumination result no longer depends on the brightness measurement at a single location, but is based on the comprehensive brightness performance of multiple regions within the imaging circle, thereby improving the stability of the detection results. In summary, the camera module relative illumination detection method provided in this application, through imaging circular division based on the field of view ratio, polar coordinate adaptive density sampling, and multi-region brightness data acquisition, achieves accurate characterization of the brightness distribution across the entire field of view of the camera module, improving the accuracy, stability, and applicability of relative illumination detection. Attached Figure Description
[0018] Figure 1 A flowchart illustrating a relative illumination detection method for a camera module provided in an embodiment of this application; Figure 2 This is a schematic diagram of the composition structure of a camera module relative illumination detection device provided in an embodiment of this application; Figure 3 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0019] Figure 1 This is a schematic flowchart illustrating a relative illumination detection method for a camera module provided in an embodiment of this application. For example, see [link to example]. Figure 1 The relative illumination detection method for a camera module provided in this application embodiment may include the following steps 101 to 104: Step 101: Based on the imaging circular area of the camera module under test, divide at least two concentric annular sampling areas radially according to a preset field of view ratio.
[0020] The preset field of view ratio is used to determine the radial boundary of each annular sampling area.
[0021] In some examples, the camera module under test is the camera imaging component for which relative illumination performance testing is to be performed. This covers imaging modules of various optical specifications, including but not limited to wide-angle, ultra-wide-angle, telephoto, and macro camera modules. Different modules may have different optical parameters such as focal length, field of view, aperture, and image size. Finished or semi-finished camera modules awaiting factory quality inspection, performance sampling, or R&D testing can be selected. These modules are fixedly installed on a standard camera testing machine, and pre-processing such as lens focusing, light source calibration, and imaging parameter initialization is completed to ensure that the module is in a working state capable of normal imaging. This module can then be identified as the camera module under test. For example, a conventional wide-angle mobile phone camera module can be selected, fixed on a professional optical testing platform, and its imaging function can be enabled. After standard light source environment calibration is completed, this module becomes the camera module under test.
[0022] The imaging circle region is the theoretical circular area on the image sensor (Sensor) of the lens optical system of the camera module under test, where it can effectively complete optical imaging. This region basically coincides with or approximately coincides with the effective imaging surface of the image sensor. It is the effective area for the lens to truly image, present brightness distribution and vignetting characteristics. The image outside this circular area is an invalid imaging area and is not included in the relative illumination detection range. On the one hand, the effective imaging diameter of the lens and the target surface size of the image sensor can be obtained from the module specifications to theoretically calibrate the boundary of the imaging circle region. On the other hand, a pure white test image can be captured by the camera module under test with uniform illumination from a standard light source. The outline of the effective imaging circle in the image can be extracted to accurately determine the range, center position and diameter of the actual imaging circle region. For example, if the effective target surface imaging diameter of the image sensor of a camera module under test is 4.8 mm, after calibration with a measured pure white imaging image, its effective imaging circle region is determined to be a standard circular area with a diameter of 4.8 mm and its center located at the geometric center of the image. This area is the reference area for subsequent annular division.
[0023] The preset field of view (FOV) ratio is a threshold value used to divide the radial region of the imaging circle equally or differently, based on the maximum FOV of the camera module under test. It is used to define the field of view coverage corresponding to different annular sampling areas, realizing the field of view gradient division from the center of the imaging circle to the edge of the imaging circle. It can be flexibly adjusted to adapt to camera modules with different optical specifications. For example, based on the 100% maximum FOV of the module, three sets of FOV ratio ranges can be preset: the 0% to 30% FOV center range, the 30% to 70% FOV intermediate transition range, and the 70% to 100% FOV edge range. This set of ratios can adapt to the brightness attenuation distribution law of most conventional lenses, and the ratio value can also be finely adjusted according to the optical characteristics of special modules such as ultra-wide-angle and telephoto lenses.
[0024] The annular sampling area is a concentric ring-shaped effective imaging area formed by dividing the imaging circle radially according to a preset field-of-view ratio, with the center of the imaging circle as a common reference center. All annular sampling areas are seamlessly connected, non-overlapping, and cover the entire effective area of the imaging circle without omission. It is the core area carrier for subsequent brightness sampling frame layout and brightness data acquisition. Different annular sampling areas correspond to different gradient field-of-view ranges, which can accurately distinguish the central uniform brightness area, the intermediate transition brightness area, and the edge attenuation brightness area. For example, based on the above-mentioned preset field-of-view ratios of 0% to 30%, 30% to 70%, and 70% to 100%, the complete imaging circle area can be divided into three layers of concentric annular sampling areas, namely the central annular sampling area, the intermediate annular sampling area, and the edge annular sampling area. The three layers completely cover 100% of the imaging field of view, with no blind spots and no overlap.
[0025] For example, firstly, a camera module under test that has completed pre-calibration and can image normally can be selected. By combining the module's optical specifications with the measured image, the corresponding imaging circle region of the module can be accurately located, and the center position, effective diameter, and full-field-of-view range of the imaging circle can be determined. Then, according to the accuracy requirements of the relative illumination detection, a field-of-view ratio gradient adapted to the optical characteristics of the module is pre-configured. With the module's maximum field of view as 100% full-field reference, multiple continuous and non-overlapping field-of-view intervals are divided. With the geometric center of the imaging circle region as the sole reference, along the radial direction of the imaging circle, according to the radial dimensions corresponding to each preset field-of-view ratio, the inner and outer radial boundaries of the multi-layer annular regions are sequentially calibrated, ultimately forming at least two concentric and seamlessly connected annular sampling areas, so that all annular sampling areas cover the entire effective imaging field of view of the camera module under test.
[0026] By implementing step 101, the imaging circle is divided into multiple radially distributed annular regions, which can cover the brightness changes at different field positions, expanding the detection range from a local area to the entire imaging area. This improves the ability to characterize the brightness distribution features within the imaging circle and avoids the situation where the relative illumination detection results cannot accurately reflect the actual brightness attenuation due to a fixed or insufficient sampling area.
[0027] Step 102: For each annular sampling area, generate multiple sampling frames using polar coordinate positioning.
[0028] Among them, the distribution density of sampling frames in the outer annular sampling area of the imaging circular region is higher than that in the inner annular sampling area.
[0029] In some examples, polar coordinate positioning is a coordinate layout method that uses the central pole of the imaging circular area as a reference and combines two dimensions, radial distance and circumferential angle, to accurately locate the target point. It is adapted to the structural characteristics of the circular imaging field of view and can achieve a uniform and regular arrangement of sampling points within the annular area. Compared with the traditional rectangular coordinate positioning method, this positioning method is more in line with the optical characteristics of the effective circular imaging field of view of the camera module and can adapt to imaging circular areas with different radii and field of view specifications to complete the full coverage of point layout. For example, with the geometric center of the imaging circle as the origin of polar coordinates, the radial distance parameter is set to represent the straight-line distance from the sampling point to the imaging center, and the circumferential angle parameter is set to represent the rotational orientation of the sampling point. Relying on this polar coordinate system, sampling points can be uniformly distributed in all directions within each layer of the annular sampling area, completely avoiding the blind spots in the traditional fixed-point sampling.
[0030] A sampling frame, or Region of Interest (ROI), is the smallest detection unit deployed within each annular sampling area to collect local brightness data. It is a rectangular pixel area and serves as the fundamental carrier for brightness information collection and statistics in relative illumination detection of a camera module. Each sampling frame corresponds to an independent optical area within the imaging field of view. All sampling frames work together to completely collect brightness distribution data across the entire field of view. Based on the imaging circle size, field of view specifications, and preset detection accuracy standards of the camera module under test, a unified standard sampling unit size can be determined. Combined with polar coordinate positioning results, rectangular sampling areas with uniform specifications and precise positions are generated in batches within each annular sampling area; these are the sampling frames. For example, for a typical mobile phone wide-angle camera module, the pixel size of a single sampling frame is uniformly set to 30 pixels by 30 pixels. Corresponding rectangular sampling frames are generated within each annular sampling area according to polar coordinate positioning points. Each independent sampling frame can independently collect imaging brightness data for its corresponding area.
[0031] Based on the concentric structure of the annular sampling area, the circumference and coverage area of the outer annular sampling area are significantly larger than those of the inner annular sampling area. By using a uniform angle step size reduction rule, the number of sampling frames that can be deployed in the outer ring automatically increases with the increase of the ring radius. Without changing the size of a single sampling frame, a differentiated density distribution effect is naturally formed, with the outer side being denser and the inner side sparser. For example, the inner central annular sampling area has a shorter circumference and can be evenly deployed with 20 sets of sampling frames, resulting in a relatively sparse overall distribution. The outer edge annular sampling area has a significantly increased circumference and can be evenly deployed with 60 sets of sampling frames, resulting in more sampling points per unit area and a denser distribution. This allows for more precise capture of subtle brightness attenuation, local dark areas, and asymmetric vignetting phenomena at the edge of the field of view.
[0032] For example, firstly, a standard sampling frame size with uniform specifications can be preset to ensure that all sampling and detection units in the full field of view have consistent specifications, avoiding data deviations caused by differences in sampling size. Then, each layer of the annular sampling area is traversed layer by layer. For the radial range constraints of each layer of the annular sampling area, combined with the requirement of omnidirectional coverage, the coordinates of the sampling points in each layer of the annular area are calculated in batches using a polar coordinate positioning algorithm, and standard rectangular sampling frames are generated at the corresponding coordinate positions. During the overall deployment process, taking advantage of the structural characteristics of the outer annular sampling area having a longer perimeter and a wider field of view coverage, an adaptive matching method of angle step size is used. That is, the larger the ring number, the smaller the angle step size used for the outer annular sampling area, and the smaller the ring number, the larger the angle step size used for the inner annular sampling area. This allows for the deployment of more and denser sampling frames in the outer annular area, while the inner annular area maintains a moderately sparse and uniform sampling layout, ultimately forming a differentiated sampling distribution structure with sparse and uniform inner sides and dense full coverage outer sides.
[0033] By implementing step 102, the sampling frame can be reasonably configured according to the radial distribution characteristics of the imaging circle. Since the brightness changes corresponding to the edge field of view of the camera module are usually more obvious, by increasing the sampling density of the outer area, richer brightness information of the edge area can be obtained, thereby improving the detection capability of brightness differences at different field of view positions and enhancing the accuracy of relative illumination measurement. This ensures the sampling efficiency of the uniform brightness area in the center and significantly improves the sampling accuracy of the complex brightness area at the edge. From the sampling layout level, it solves the technical problems of traditional detection methods being unable to accurately capture the brightness changes of the entire field of view and the insufficient accuracy of edge dark corner detection.
[0034] Step 103: Obtain the brightness data of each sampling frame area when the camera module under test captures the preset test image.
[0035] In some examples, the preset test image is a standardized imaging image captured by the camera module under test facing a uniform standard light source under a standard optical testing environment. This image serves as a dedicated reference image for relative illumination testing. It accurately reproduces the original brightness distribution, vignetting characteristics, and vignetting attenuation features within the complete imaging circle of the tested module. Free from scene clutter and exposure deviation, it provides a unified image carrier for brightness data acquisition. A darkroom testing environment conforming to industry-standard camera optical testing can be constructed, with a uniform surface light source as the unified illumination reference, ensuring constant light source illuminance uniformity, color temperature, and brightness parameters. This facilitates alignment, focusing, and... The camera module under test, with its parameters calibrated, is positioned directly opposite the light source to acquire images. Imaging parameters such as exposure, gain, and white balance are fixed, and a clean, uniform, and noise-free standardized image is acquired, which serves as the preset test image. For example, in an optical testing darkroom, a high-uniformity diffuse surface light source is activated to ensure the effective luminous area of the light source fully covers the module's field of view. The brightness and color temperature of the light source are controlled at standard testing levels. The shooting posture and imaging parameters of the wide-angle camera module under test are fixed. After focusing and optical center calibration, a stable, pure white, uniform image is acquired; this image is the preset test image used for this brightness data acquisition.
[0036] The brightness data within each sampling frame region is a set of optical brightness values presented within the image region corresponding to each independent sampling frame in the preset test image. This data forms the fundamental quantitative data characterizing the brightness of the imaging in different field-of-view annular regions. This type of data can correspond to and match the optical characteristics of field-of-view regions at different radial positions and circumferential angles, fully reflecting the brightness gradient from the center field of view to the edge field of view, and realistically reflecting the vignetting and shading performance of the module. Based on the previously established polar coordinate positioning of all sampling frames, the effective pixel region corresponding to each sampling frame can be locked in the preset test image. Then, based on the image brightness reading mechanism, the brightness of each independent sampling frame can be... Brightness is picked up in the image area covered by the sampling frame, and the quantized brightness value corresponding to each sampling frame is obtained. The data is then summarized to obtain the global brightness data covering the entire annular sampling area, so as to achieve complete acquisition of brightness information at each field of view. For example, in the standardized preset test image that has been acquired, all sampling frames deployed in the central annular sampling area, the middle annular sampling area, and the edge annular sampling area are locked respectively. The brightness value of the image area corresponding to each sampling frame is read in sequence to obtain multiple sets of brightness data corresponding to the field of view. Among them, the edge annular sampling area has a higher sampling frame distribution density and a larger number of corresponding brightness data samples, which can reflect the brightness attenuation changes of the edge field of view in detail.
[0037] For example, a stable and standardized optical testing environment can be established first to maintain the uniformity of the test light source and the consistency of the imaging environment, avoiding interference from ambient light and light source fluctuations on the imaging effect. The camera module under test is fixed in the test fixture position, and the module imaging parameters are initialized and optical alignment calibration is completed to ensure that the module imaging state meets the relative illumination test standard requirements. Imaging is completed by the camera module under test facing the standard uniform light source, and a preset test image with clean image, uniform brightness, and unified parameters is acquired. Based on the positions of all sampling frames that have been set up in the early stage by polar coordinate positioning, the image area corresponding to each sampling frame is accurately matched and located in the preset test image. The brightness information of the area corresponding to each sampling frame is picked up one by one, and the brightness data of the entire inner and outer annular sampling areas is collected. Finally, the full-domain brightness raw data covering the complete imaging circular field of view of the camera module under test and matching the differentiated sampling density is obtained.
[0038] By implementing step 103, the brightness information at different spatial locations can be recorded separately and form corresponding data sets. Compared with the traditional detection method that only obtains a small number of fixed position brightness values, it can collect actual brightness data of multiple areas within the imaging circle, thereby more comprehensively reflecting the brightness changes of the camera module at different field of view positions, and providing a more complete and reliable data foundation for subsequent relative illumination calculation.
[0039] Step 104: Determine the relative illumination of the camera module under test based on the brightness data within each sampling frame area.
[0040] In some examples, relative illumination (RI) is an optical parameter characterizing the brightness uniformity and field-of-view attenuation of a camera module's image. It quantifies the degree of brightness decay from the center to the edges of the field of view, and is a crucial indicator for evaluating the vignetting, shading, and image uniformity of a camera module. The magnitude of relative illumination directly reflects the evenness of the brightness distribution across the entire field of view; a higher value indicates less brightness decay at the edges and better image uniformity. RI is calculated by comparing the effective brightness levels of the central and edge areas of the imaging circle, using a quantified method of regional brightness ratio. Unlike the traditional calculation logic of comparing a single fixed point, the embodiments of this application rely on the full-field brightness data obtained by high-density sampling of multiple regions across the entire field of view for statistical solution, so that the calculation results have full-field representativeness and can objectively reflect the brightness attenuation law of the complete imaging field of view. For example, the effective brightness of the central field of view of the tested camera module is statistically analyzed to obtain the central reference brightness, and the effective brightness of the edge field of view of the module is statistically analyzed to obtain the edge attenuation brightness. By the ratio of the edge effective brightness to the central reference brightness, the relative illumination value corresponding to the module can be obtained, which is used to characterize the edge vignetting and brightness attenuation degree of the module.
[0041] For example, firstly, all the sampling frame brightness data collected in step 103 can be compiled and summarized, completely including all brightness sample data corresponding to each inner and outer annular sampling area, ensuring that the calculation substrate covers the entire effective field of view of the imaging circle of the camera module under test; according to the field of view hierarchy division rules corresponding to the annular sampling area, the global brightness data is classified into regions, and the brightness data set of the inner annular area corresponding to the center field of view and the brightness data set of the outer annular area corresponding to the edge field of view are selected; the two types of data sets are statistically processed as a whole to obtain the benchmark value that can represent the true imaging brightness of the module center and the attenuation value that can represent the true imaging brightness of the module edge; through the ratio of the effective brightness value of the edge field of view to the effective brightness value of the center field of view, the relative illumination parameter of the camera module under test is quantitatively calculated.
[0042] By implementing step 104, the relative illumination calculation can comprehensively utilize the brightness information of multiple locations within the imaging area, rather than relying on the brightness values of a single or small number of sampling points. By analyzing brightness data from multiple regions, the impact of local brightness anomalies on the detection results can be reduced. It can fully capture detailed features such as lens asymmetric vignetting, local brightness depressions, and gradual attenuation of the field of view, thereby improving the stability and accuracy of the relative illumination detection results. At the same time, it enables the detection method to more realistically reflect the brightness attenuation characteristics within the overall field of view of the camera module.
[0043] In summary, this embodiment of the application divides the imaging circular region of the camera module under test into at least two concentric annular sampling areas radially according to a preset field-of-view ratio. Compared with the traditional method of sampling a small number of samples at fixed positions, this method can establish a correspondence between the sampling area and the actual imaging field of view of the camera module. By dividing the area into annular regions, the brightness changes at different field-of-view positions within the imaging circle can be included in the detection range, thereby improving the ability to characterize the overall field-of-view brightness distribution and avoiding the problem that the relative illumination detection results cannot reflect the true brightness attenuation due to insufficient sampling area. Since multiple sampling frames are generated for each annular sampling area using polar coordinate positioning, and the sampling frame distribution density in the outer annular sampling area is higher than that in the inner annular sampling area, differentiated sampling can be achieved based on the characteristics of the radial position of the imaging circle. Since the edge field of view of a camera module typically corresponds to areas of more pronounced brightness variation, increasing the number of sampling frames in the outer region allows for the acquisition of richer edge brightness data. This enables the detection process to more precisely describe the brightness differences between different field of view positions, improving the accuracy of relative illumination detection. Furthermore, by acquiring brightness data within each sampling frame region when the camera module under test captures a preset test image, a complete detection dataset can be constructed from brightness data corresponding to multiple spatial locations. Compared to methods that rely solely on brightness values at a few fixed locations, this approach determines relative illumination based on the actual brightness information of multiple sampling areas. The relative illumination result no longer depends on brightness measurements at a single location but is based on the comprehensive brightness performance of multiple regions within the imaging circle, thereby improving the stability of the detection results. In summary, the camera module relative illumination detection method provided in this application, through imaging circular division based on field of view ratio, polar coordinate adaptive density sampling, and multi-region brightness data acquisition, achieves accurate characterization of the brightness distribution across the entire field of view of the camera module, improving the accuracy, stability, and applicability of relative illumination detection.
[0044] In some embodiments, the aforementioned step 101 may include: obtaining the target sampling frame size and the imaging circle diameter of the imaging circle region; determining the total number of annular sampling areas based on the ratio of the imaging circle diameter to the target sampling frame size; and determining the radial boundary of each annular sampling area according to a preset field of view ratio and the total number, thereby obtaining at least two concentric annular sampling areas.
[0045] In some examples, the target sampling frame size is a standard size parameter for a single sampling region of interest, uniformly set during the relative illumination detection process of the camera module under test. It is the basic unit specification for full-field brightness sampling, determining the pixel coverage and detection precision of a single brightness sampling. The target sampling frame size can be comprehensively determined by combining the imaging resolution, field of view, and preset detection accuracy requirements of the camera module. It can be adapted and adjusted according to the optical design specifications of different modules, balancing detection accuracy and detection efficiency. The target sampling frame size can also be a preset fixed parameter, used only to match the size of the imaging circle to complete the calculation of the number of annular partitions, without the need for real-time dynamic adjustment.
[0046] The imaging circle diameter is the maximum lateral span of the effective imaging circle area of the tested camera module. It represents the maximum aperture range that the lens can achieve effective optical imaging. It is a benchmark parameter for matching the module's optical specifications and dividing the field of view sampling area. This parameter corresponds to the circular imaging boundary of the effective imaging surface of the image sensor, perfectly matching the module's actual imaging range, and can accurately distinguish between effective and ineffective imaging areas. For example, the optical specifications of a standard wide-angle camera module indicate that the effective imaging circle diameter is 4800 pixels. After verifying the contour of the measured imaging image, the imaging circle diameter of the module is determined to be 4800 pixels, which serves as the benchmark size for subsequent annular partition calculations.
[0047] The total number of annular sampling areas is determined based on the matching relationship between the size of the imaging circle of the tested module and the size of the sampling unit. The final number of concentric annular sampling areas determines the degree of subdivision of the radial sampling interval of the entire field of view. The larger the total number, the more detailed the radial region division of the imaging circle, the more layer gradients of brightness sampling, and the more accurately the brightness gradient process can be reproduced. The optimal number of annular layers can be quantitatively calculated by taking the size of the sampling unit as the minimum layer benchmark and combining it with the overall size of the imaging circle. The optimal number of annular layers can be uniformly layered without redundancy or omission. For example, when the diameter of the imaging circle is 4800 pixels and the size of the target sampling frame is 80 pixels, the total number of annular sampling areas can be determined to be 30 layers by calculating the ratio between the two. This number of layers can uniformly cover the entire radial range of the imaging circle and is suitable for the accuracy standard of this test.
[0048] The radial boundary is the critical inner and outer dimensions of each annular sampling area in the radial direction of the imaging circle. It is used to define the radial coverage of each layer of annular sampling areas. The radial boundaries of all annular sampling areas are arranged sequentially from the inside to the outside, with the center of the imaging circle as the radial zero point. The boundaries cooperate with each other to form a continuous, non-overlapping, and blind-zone-free annular layered structure. The overall radial dimension of the imaging circle can be uniformly distributed according to the field of view gradient by combining the total number of annular sampling areas and the preset field of view ratio. The radial start and end dimensions corresponding to each field of view interval can be calculated one by one, which are the radial boundaries of each annular sampling area. For example, based on the total number of layers and the three preset field of view ratios, the inner radial boundary of the central area, the radial boundary between the central area and the middle area, the radial boundary between the middle area and the edge area, and the outermost radial boundary of the imaging circle can be marked sequentially. Three independent annular sampling areas are formed by dividing the area by multiple sets of radial boundaries.
[0049] For example, firstly, based on the accuracy requirements of this relative illumination test, a unified target sampling frame size can be pre-set. Simultaneously, the imaging circle diameter parameter of the corresponding imaging circle region of the camera module under test can be accurately obtained through module parameter calibration or actual imaging. The ratio of the imaging circle diameter to the target sampling frame size is calculated, and the total number of annular sampling area layers adapted to the imaging specifications of the module is determined based on the calculation results, ensuring that the number of layers matches the imaging size and sampling accuracy. The pre-configured preset field of view ratio parameter is retrieved, and the maximum field of view of the module under test is used as the global reference. Combined with the determined total number of annular sampling areas, the radial dimension of the imaging circle is gradient-distributed, and the radial boundary position corresponding to each field of view interval is calculated and calibrated in sequence. The complete imaging circle region is segmented through multiple radial boundaries, and at least two distinct, concentric, seamlessly connected, and non-overlapping annular sampling areas are finally obtained, so that each annular sampling area corresponds to a fixed field of view range, achieving a precise match between the mechanical layer size and the optical field of view characteristics.
[0050] By implementing the above embodiments, the number and distribution range of sampling areas can be automatically determined according to the imaging circle size and sampling requirements of different camera modules, avoiding the problem of insufficient detection range caused by using a fixed number of sampling areas, and improving the adaptability of the relative illumination detection method to different camera module structures.
[0051] In some embodiments, the step of obtaining the aforementioned target sampling frame size may include: obtaining the field of view parameters of the camera module under test and the imaging circle radius of the imaging circle region; determining the radial pixel span corresponding to a unit field of view in the imaging circle region based on the field of view parameters; and determining the target sampling frame size by multiplying the radial pixel span by a preset precision coefficient, wherein the preset precision coefficient represents the number of pixel span units covered by a single sampling frame radially.
[0052] In some examples, the field of view parameter is an optical parameter that characterizes the optical imaging coverage of the camera module under test. It is used to define the maximum field of view angle that the lens can effectively image, and determines the field of view coverage and brightness attenuation distribution range of the image formed by the module. The field of view parameters of different types of camera modules are significantly different. The size of the field of view parameter directly determines the gradient speed of brightness change within the imaging circle. For example, the maximum field of view parameter of a conventional wide-angle camera module can be calibrated as 120 degrees. This parameter means that the module can achieve effective imaging within a 120-degree field of view range, and its brightness attenuation range and vignetting distribution are adapted to the characteristics of this field of view angle.
[0053] The imaging circle radius is the radial pixel length extending from the geometric center of the effective imaging circle of the camera module under test to the outermost boundary of the imaging circle. It is a reference size parameter that characterizes the effective imaging range of the module. This parameter is half the diameter of the imaging circle and can intuitively reflect the circular coverage of the effective imaging surface of the image sensor. It is the basic geometric parameter for converting the field of view and pixel span.
[0054] The radial pixel span corresponding to a unit field of view in the imaging circle region is the actual pixel length corresponding to each unit angle of the field of view of the tested camera module in the radial direction of the imaging circle. It is used to establish the correspondence between the optical field of view and the image pixel size, and to realize the accurate conversion of optical parameters to image sampling parameters. The radial pixel span can truly reflect the pixel distribution density on the image at different field of view angles, and is an intermediate parameter for adaptive matching sampling accuracy. It can be obtained by normalizing the maximum field of view parameter of the module and the pixel parameter of the imaging circle, uniformly mapping the complete field of view angle range to the radial pixel interval of the imaging circle, and solving for the standard radial pixel span value corresponding to a single angle. For example, under the condition that the maximum field of view of the module is 120 degrees and the imaging circle radius is 2400 pixels, the radial pixel span corresponding to a unit field of view angle can be obtained by normalization conversion as 20 pixels per degree, which means that within the field of view of the module, each degree of field of view angle corresponds to a radial size span of 20 pixels in the imaging image.
[0055] The preset accuracy coefficient is a preset calibration parameter used to adjust the fineness of relative illumination detection. This parameter represents the number of pixel span units covered by a single sampling frame in the radial direction, and is used to limit the field of view subdivision granularity corresponding to a single sampling unit. The preset accuracy coefficient can be flexibly configured according to the detection accuracy level. The smaller the accuracy coefficient value, the fewer radial pixel units covered by a single sampling frame, the higher the sampling subdivision degree, and the higher the detection accuracy. For example, in a standard production line inspection scenario, the preset accuracy coefficient can be set to 4, which means that a single sampling frame covers a radial span of 4 pixel units. In a high-precision R&D inspection scenario, the preset accuracy coefficient can be set to 2 to further reduce the sampling range of a single frame and improve the ability to capture subtle brightness changes in edge dark corners.
[0056] The radial pixel span corresponding to a unit field of view can be used as the basic conversion benchmark. Combined with the preset accuracy adjustment coefficient, the standardized sampling frame size adapted to the optical characteristics of the current module can be quantitatively calculated. For example, under the condition that the radial pixel span per degree is 20 pixels and the preset accuracy coefficient is 4, the radial size of the target sampling frame can be calculated to be 80 pixels. The sampling frame generated based on this standard can accurately match the field brightness change gradient of the module, taking into account both detection accuracy and detection efficiency.
[0057] For example, the optical parameters of the camera module under test can be calibrated first to accurately obtain the maximum field of view parameter corresponding to the module, and the pixel parameters of the imaging circle radius of the identified imaging circle region can be extracted. The overall field of view angle range of the module and the radial pixel size of the imaging circle are normalized and mapped to calculate the standard radial pixel span corresponding to a unit field of view angle in the imaging circle region, and the correspondence between the field of view angle and the image pixel size is established. According to the accuracy requirements of this relative illumination test, an appropriate preset accuracy coefficient is selected to determine the number of pixel span units that a single sampling frame needs to cover in the radial direction. Based on the obtained radial pixel span and the preset accuracy coefficient, a coupling operation is performed to adaptively calculate the target sampling frame size that is suitable for the optical characteristics of the current camera module under test.
[0058] By implementing the above embodiments, the size of the sampling frame can be correlated with the field of view characteristics and detection accuracy requirements of the camera module. The sampling granularity can be adjusted according to the optical imaging characteristics of camera modules with different field of view, so that the sampling frame can cover the effective detection area and meet the brightness change detection accuracy requirements, avoiding the problem that some brightness change details cannot be captured due to the fixed size of the sampling frame.
[0059] In some embodiments, step 102 may include: for each annular sampling region, determining the radial position of the sampling frame within the annular sampling region based on the ring number of the annular sampling region and the target sampling frame size; determining the corresponding angle step size based on the ring number, wherein the angle step size decreases as the ring number increases; determining the number of sampling frames within the annular sampling region and the polar position of each sampling frame based on the angle step size; and determining the polar coordinates of each sampling frame based on the radial position and the polar position.
[0060] In some examples, the ring number is a hierarchical numbering system for all concentric annular sampling areas within the imaging circle, sequentially increasing from the center of the imaging circle towards its outer boundary. This uniquely identifies the radial hierarchical position of each annular sampling area and serves as the fundamental index parameter for implementing layered differentiated sampling calculations. The arrangement of the ring numbers corresponds one-to-one with the field-of-view gradient, with different ring numbers corresponding to different radial intervals of the field of view and optical brightness attenuation characteristics. The entire imaging circle can be divided into N levels of annular partitions based on detection accuracy requirements to complete full-area frame-grabbing sampling, and the total number of levels can be flexibly adjusted. The larger the total number of levels N, the higher the degree of subdivision of the radial interval of the imaging circle. The smaller the size of the single-area capture frame is set accordingly, and the total number of capture frames that can be deployed across the entire field of view increases simultaneously, enabling more refined brightness sampling. For example, the intermediate transition ring sampling areas adjacent to the outside are sequentially set with second-level, third-level, and up to N-1-level ring numbers. The outermost ring sampling area, which is farthest from the center of the imaging circle and close to the boundary of the imaging circle, is uniformly set to the N-level ring number. The larger the ring number value, the closer the radial position of the corresponding ring sampling area is to the boundary of the imaging circle.
[0061] The radial position of the sampling frame within the annular sampling area is the center positioning dimension of a single sampling frame in the radial direction of the imaging circle. It represents the straight-line distance of the sampling frame from the center of the imaging circle and is used to define the radial placement reference position of the sampling frame within the corresponding annular sampling area. This ensures that the sampling frame falls accurately within the corresponding field of view level. A uniform and standardized radial position ensures that all sampling frames within the same level of annular sampling area are at the same radial field of view gradient, avoiding sampling field of view disorder caused by radial position offset. For example, given a fixed target sampling frame size, the radial position of the sampling frame corresponding to the first-level ring number is a close-range position near the center of the imaging circle, while the radial position of the sampling frame corresponding to the third-level ring number is a far-range position near the edge of the imaging circle. The radial positions of the sampling frames at each level expand outward in an orderly manner as the ring number increases, accurately matching the annular field of view intervals of each level.
[0062] The angle step size is the included angle between the centers of two adjacent sampling frames in the circumferential direction within the same annular sampling area. It is used to control the density and uniformity of the sampling frames within a single annular area and is an angle adjustment parameter for polar coordinate circumferential point placement. The angle step size has adaptive variation characteristics and can be dynamically adjusted according to the changes in the annular sampling area hierarchy. The angle step size can be adaptively matched based on the ring number of the current annular sampling area, following the matching rule that the larger the ring number, the smaller the angle step size. The outer high-number annular area is configured with a smaller angle step size, and the inner low-number annular area is configured with a larger angle step size, thus adapting to the differences in circumferential length of different layers. For example, the ring number value of the inner first-level annular sampling area is small, so the matched angle step size value is larger, and the included angle between the circumferences of adjacent sampling frames is larger; the ring number value of the outer third-level annular sampling area is large, so the matched angle step size value is significantly reduced, and the included angle between the circumferences of adjacent sampling frames is smaller, naturally achieving the effect of densifying the outer sampling points.
[0063] The number of sampling frames within an annular sampling area is the total number of sampling frames that can be uniformly and seamlessly distributed within a single annular sampling area. It directly determines the sampling density and data volume of the corresponding field of view. This number is adaptively adjusted according to the hierarchical changes of the annular sampling area, which is highly compatible with the optical characteristics of complex brightness changes and severe attenuation gradients at the edge of the lens field of view. For example, if the angle step value of the inner annular sampling area is large, the number of calculated sampling frames is smaller, and the sampling distribution is relatively sparse. If the angle step value of the outer annular sampling area is small, the number of calculated sampling frames increases significantly, and there are more sampling points per unit area, which can achieve high-density and fine sampling of the edge field of view.
[0064] The polar angle position of each sampling frame is the absolute angular position of the center of a single sampling frame along the polar coordinate circumference. It is used to accurately locate the placement of each sampling frame within the annular circumference, ensuring that all sampling frames are evenly arranged around the corresponding annular area without angular blind spots or local stacking. The polar angle position of each sampling frame can be calculated by starting from the zero-degree polar coordinate position and accumulating the angles according to the fixed angle step size corresponding to the current annular sampling area, gradually obtaining the independent polar angle position corresponding to each sampling frame, covering the complete circumferential angle range. For example, after determining the angle step size of the outer annular sampling area, the angle step size value is accumulated sequentially from the zero-degree starting position to generate multiple evenly distributed polar angle positions, so that all sampling frames are evenly arranged along the annular circumference in all directions, completely covering the 360-degree field of view, and can accurately capture asymmetrical vignetting and local brightness abnormality areas.
[0065] For example, firstly, a hierarchical indexing can be performed on all previously divided concentric annular sampling regions. A continuously increasing ring number is assigned from the center of the imaging circle to its outer boundary, clarifying the radial hierarchical attributes of each annular sampling region. For each ring number corresponding to an annular sampling region, the radial position of all sampling frames within the current annular sampling region is calculated based on the adaptively solved target sampling frame size, ensuring that sampling frames at the same level accurately correspond to the same radial field of view gradient. The corresponding angle step size is adaptively matched according to the ring number of each annular sampling region, so that the outer annular region with a higher ring number automatically matches a smaller angle step size, and the lower... The inner annular region of the sequence number is matched with a larger angle step size; by using the ratio of the complete circumferential angle to the corresponding angle step size, the total number of sampling frames that can be uniformly placed in each annular sampling area is calculated, and the increment is gradually accumulated from the starting angle of the circumference to generate the independent polar angle position corresponding to all sampling frames; taking the center of the imaging circle as the pole origin of the polar coordinate system, the radial position of the sampling frame calculated above is taken as the polar radius, and the independently accumulated polar angle position is taken as the polar angle. The polar radius and polar angle are paired and combined one by one to solve for the accurate polar coordinates corresponding to each sampling frame, thus completing the point placement of all sampling frames in the entire field of view.
[0066] By implementing the above embodiments, more sampling frames can be generated in the outer annular region and the sampling density can be increased. The sampling frames can be evenly distributed in the imaging circular region using polar coordinates. Adaptive and encrypted sampling is performed on the edge field of view region, so that areas with more obvious brightness changes can obtain richer data support, maximizing the sampling precision of the edge attenuation field of view. This effectively makes up for the shortcomings of blind spots and insufficient precision in the traditional four-corner sampling method, and can improve the precision of brightness distribution detection in the entire field of view.
[0067] In some embodiments, step 103 may include: converting the polar coordinates of each sampling frame into pixel coordinates in a preset test image; determining the pixel region corresponding to each sampling frame in the preset test image based on the pixel coordinates of each sampling frame and the target sampling frame size; and obtaining the average value of the brightness of all pixels in each pixel region when the camera module under test captures the preset test image, as the brightness data of the corresponding sampling frame.
[0068] In some examples, the pixel coordinates of each sampling frame are planar position coordinates obtained by transforming and adapting the sampling point position in the imaging polar coordinate system to the preset test image pixel coordinate system. This is used to accurately locate the center pixel position of each sampling frame in the test image. The pixel coordinate system takes the upper left corner of the test image as the pixel origin, and the horizontal and vertical directions correspond to the row and column arrangement directions of the image pixels, respectively. It is the basic coordinate system for image pixel region recognition and brightness acquisition. Based on the polar coordinate parameters of each sampling frame calculated in the early stage, the initial rectangular coordinates can be obtained by solving the polar rectangular coordinate transformation algorithm. Then, combined with the overall size parameters of the preset test image, the coordinate origin is translated and calibrated to map the center origin of the polar coordinate system to the geometric center of the image pixel coordinate system. Finally, the accurate pixel coordinates corresponding to each sampling frame are calculated. For example, by substituting the polar coordinate parameters of the sampling frame in a certain edge annular sampling area into the coordinate transformation formula, the conversion from polar coordinates to rectangular coordinates is completed, and the center pixel coordinates of the sampling frame in the test image pixel image are finally obtained, realizing the accurate matching of the sampling point position from the optical field coordinates to the image pixel coordinates.
[0069] The pixel area corresponding to each sampling frame in the preset test image is a rectangular pixel range defined by taking the pixel coordinates of the sampling frame as the center and combining it with the preset target sampling frame size. It is the actual image area where a single set of sampling frames completes the brightness data acquisition. For example, after determining the center pixel coordinates of a certain sampling frame, it is expanded equidistantly in four directions (up, down, left, and right) according to the fixed target sampling frame size to form a rectangular pixel area with uniform specifications. This area falls completely within the effective imaging circle of the camera module under test, corresponding to the imaging image at a specific field of view, and defines the accurate acquisition range for subsequent brightness average calculation.
[0070] In a preset test image, for each sampling frame corresponding to an independent pixel area, the brightness values of all pixels within the area can be read in batches. The data interference caused by single-pixel random noise, minor image defects, and slight fluctuations in illumination is eliminated by the arithmetic average statistical method. Finally, the mean data that can stably represent the overall brightness level of the corresponding field of view area is obtained, and this mean data is defined as the effective brightness data of the current sampling frame.
[0071] For example, firstly, the polar coordinate parameters of all sampling frames within each annular sampling area can be retrieved. Through a standardized coordinate transformation algorithm, the polar coordinate points constructed based on the imaging circle are converted one by one into the pixel coordinates corresponding to the preset test image, completing the accurate mapping from optical field coordinates to image pixel coordinates and ensuring that all sampling points are precisely aligned with the test image. Using the pixel coordinates corresponding to each sampling frame as the central reference, combined with the target sampling frame size obtained from the previous adaptive calculation, the frame is regularly expanded in the horizontal and vertical pixel directions to accurately delineate the independent rectangular pixel area corresponding to each sampling frame in the preset test image, achieving standardized locking of all sampling acquisition areas across the entire field of view. Subsequently, all pixel areas are traversed one by one, and the original brightness values of all pixels within each area are completely acquired. The average value of all brightness data within a single pixel area is calculated to eliminate data fluctuations caused by random noise of single pixels and minor imaging deviations. Finally, the average brightness value of each area is used as the effective brightness data of the corresponding sampling frame.
[0072] By implementing the above embodiments, the position of the sampling frame can be accurately mapped to the actual test image, which can avoid data errors caused by the mismatch between the sampling position and the image pixel area. Furthermore, by obtaining the average brightness of the region, the impact of individual pixel anomalies on the detection results can be reduced, thereby improving the reliability of the sampling brightness data.
[0073] In some embodiments, the aforementioned conversion of the polar coordinates of each sampling frame into pixel coordinates in a preset test image may include: acquiring a standard test image output by the camera module under test; calculating the offset of the brightness centroid and geometric center of the standard test image to obtain the optical center offset of the camera module under test; and performing translation correction on the initial pixel coordinates of each sampling frame based on the optical center offset to obtain the pixel coordinates.
[0074] In some examples, the standard test image is a pure color uniform imaging image obtained by the camera module under test under a standardized darkroom optical environment, directly facing a uniformly diffused standard light source. It is a dedicated reference image used to identify the optical center and calculate the offset error. A closed darkroom environment that conforms to industry optical testing specifications can be set up, ambient stray light interference can be turned off, a high uniformity surface standard light source can be turned on and the light source brightness, color temperature and uniformity can be calibrated, the camera module under test can be fixed in a standard test fixture, and the focus, exposure, white balance and gain parameters can be fixed and calibrated to ensure that the imaging parameters of the module are in a stable and uniform state. The camera module under test is controlled to face the standard light source to capture images, and a single frame of stable and fluctuation-free imaging is captured as the standard test image.
[0075] The luminance centroid is the optical centroid position calculated based on the global pixel luminance weight distribution of a standard test image. It is a positional parameter characterizing the actual optical imaging center of the camera module under test. Unlike the image geometric position, the luminance centroid is determined by both the global pixel luminance magnitude and pixel distribution position, accurately reflecting the actual imaging position of the lens's principal optical point and serving as the basis for identifying the true optical center. The geometric center is the theoretical geometric center point of the effective imaging frame of the standard test image. It is a standardized geometric position calculated based on the image pixel resolution and imaging size, belonging to the reference center position under the ideal imaging model. This position is determined only by the overall pixel size and imaging circle outline size of the image and is unrelated to the lens optical characteristics and imaging luminance distribution. It serves as the reference coordinate for optical offset correction.
[0076] Optical center offset is the positional deviation between the actual optical imaging center of the camera module under test and the geometric center of the image. It is used to characterize the degree of offset of the lens's optical principal point relative to the geometric center of the image sensor. In an ideal imaging model, the module's optical center and the image's geometric center are completely coincident. However, in actual mass production and assembly, due to process errors such as lens processing, lens assembly, and module bonding, the real optical center will experience horizontal and vertical positional offsets. The degree of this offset is the optical center offset. For example, during the actual measurement and calibration of a camera module under test, it was found that the brightness centroid was offset by three pixels horizontally and two pixels vertically relative to the image's geometric center. These horizontal and vertical offset values are the optical center offset of the module.
[0077] The ideal initial pixel coordinates obtained by polar coordinate transformation can be used as a benchmark. Combined with the measured optical center offset of the module, the initial pixel coordinates of all sampling frames are translated and compensated as a whole to offset the positional deviation caused by the optical center offset. Finally, the true optical field of view of the lens is matched, and the accurate and effective sampling frame pixel coordinates are output. The initial pixel coordinates are theoretical coordinates calculated based on the ideal geometric center, without considering the actual assembly deviation. After translation correction, the pixel coordinates can perfectly match the true imaging characteristics of the module. For example, after obtaining the offset parameters of three pixels horizontally and two pixels vertically of the module, the initial pixel coordinates of all sampling frames are uniformly translated and compensated. The horizontal coordinate of each sampling frame is increased by three pixels and the vertical coordinate is increased by two pixels, completing the correction of all sampling points and making the sampling frames fall accurately in the true optical imaging area of the module.
[0078] For example, the optical center of the camera module under test can first be detected using an optical calibration device to accurately obtain the optical center offset parameters corresponding to the module, and to clarify the horizontal and vertical offset scales of the real optical imaging center relative to the geometric center of the image. After completing the conversion calculation of the polar coordinates of each sampling frame to the initial pixel coordinates of the preset test image, the theoretical sampling point coordinates based on the ideal geometric center are obtained. Then, based on the obtained optical center offset, the initial pixel coordinates corresponding to each sampling frame are oriented and translated for correction. The horizontal and vertical coordinates are compensated and corrected according to the measured offset parameters to uniformly correct the point deviation of all sampling frames in the entire domain. After the overall translation correction, the accurate pixel coordinates that adapt to the real optical characteristics of the camera module under test are finally obtained, so that the placement of all sampling frames is completely in line with the real imaging field of view of the lens, effectively avoiding problems such as sampling frame misalignment, missed sampling of the effective field of view, and distortion of brightness data acquisition caused by optical center offset.
[0079] By implementing the above embodiments, the position of the generated sampling frame can compensate for the deviation between the actual optical center and the image center. Even if there is an optical center offset between different camera modules, the sampling frame can still maintain a corresponding relationship with the actual imaging field of view, thereby improving the accuracy of the brightness sampling position and avoiding deviations in the relative illumination detection results caused by optical center offset.
[0080] In some embodiments, step 104 may include: associating the brightness data of each sampling frame with the corresponding radial position to generate a brightness distribution matrix; obtaining a brightness attenuation fitting curve of brightness as a function of radial distance based on the brightness distribution matrix; extracting a first brightness statistical value in a first radial range and a second brightness statistical value in a second radial range based on the brightness attenuation fitting curve, wherein the first radial range is close to the center of the imaging circular region and the second radial range is close to the edge of the imaging circular region; and determining the relative illumination based on the ratio of the second brightness statistical value to the first brightness statistical value.
[0081] In some examples, the brightness distribution matrix is a structured data set that integrates the full field-of-view sampling information of the camera module under test. It is used to uniformly store the radial position parameters corresponding to each sampling frame and the matched measured brightness data, realizing a one-to-one correspondence between the spatial position of the field of view and the optical brightness value. This matrix completely records the global brightness distribution information of the imaging circle from the center to the edge, and can objectively reflect the true imaging brightness level at different radial field-of-view positions. It can traverse all the deployed sampling frames, use the unique radial position parameter corresponding to each sampling frame as the position dimension index, and use the measured regional average brightness data of each sampling frame as the numerical dimension parameter. It is structured and integrated through a one-to-one binding association to form a global brightness distribution data matrix with regular rows and columns and unique correspondence. For example, the radial distance parameters of each level of annular sampling area are entered in sequence, and the average brightness value of all sampling frames at the corresponding radial position is matched to construct a two-dimensional brightness distribution matrix containing the radial position of the field of view and the corresponding brightness value, which completely covers all sampling data from the center to the edge of the imaging circle without data omission or information loss.
[0082] The brightness decay fitting curve is a continuous function curve generated based on the fitting of global sampling data. It is used to characterize the continuous decay law of the imaging brightness of the camera module as it changes with the radial distance of the imaging circle. It can intuitively reflect the uniformity of brightness in the center field of view, the gradual change of brightness in the middle field of view, and the sudden drop in brightness and vignetting distribution characteristics in the edge field of view. This curve transforms discrete sampling point data into a continuously changing brightness model, which can fill the gaps in brightness change between discrete sampling points and completely restore the true brightness distribution trend of the entire field of view. It can retrieve the generated brightness distribution matrix and use a mathematical fitting algorithm adapted to the optical imaging law to smooth the discrete data points. The algorithm type can be any of polynomial fitting, spline fitting, or exponential fitting. The optimal fitting function is solved through algorithm iteration to generate a continuous and smooth brightness decay fitting curve. For example, based on the discrete data of all radial positions and corresponding brightness in the brightness distribution matrix, the data is fitted by a polynomial fitting algorithm to generate a smooth curve that changes continuously from the center of the imaging circle to the edge of the imaging circle. This curve can accurately restore the gradual change of lens brightness from bright to dark, and can also present the subtle brightness fluctuations caused by local dark areas and asymmetric vignetting.
[0083] The first radial range is a preset radial interval near the center of the imaging circle region, corresponding to the central core field of view region of the camera module. This region is the area where the imaging brightness of the module is most uniform and the attenuation is the weakest. It is the range of reference brightness values in relative illumination calculation and can stably reflect the optimal imaging brightness level of the module. For example, the radial interval corresponding to 0 to 10% or 0 to 20% of the field of view of the imaging circle can be selected as the first radial range. This interval is located in the core imaging region, where the imaging brightness is uniform and stable, with no obvious dark corners or brightness attenuation, making it suitable as a reference interval for relative illumination calculation.
[0084] The first luminance statistical value is a benchmark luminance value obtained based on luminance data statistics within the first radial range. It is used to characterize the standard imaging luminance level of the center field of view of the tested camera module and serves as the denominator benchmark parameter for calculating the relative illuminance ratio, determining the benchmark scale for overall illuminance calculation. All continuous luminance values within the first radial range of the luminance attenuation fitting curve can be extracted and integrated through mean statistics, median statistics, minimum value filtering, or maximum value filtering to obtain a statistical value that stably represents the luminance level of the entire center field of view, avoiding benchmark deviations caused by fluctuations in single-point data. For example, all luminance values of the fitting curve within the first radial range of 0 to 15% of the field of view can be extracted, and the average of all values can be calculated. The final average result is used as the first luminance statistical value, serving as the center benchmark luminance for this relative illuminance calculation.
[0085] The second radial range is a preset radial interval near the edge of the imaging circle area, corresponding to the edge limit field of view area of the camera module. This area is where lens vignetting and dark corner phenomena are concentrated, and the brightness attenuation is the most severe and the brightness distribution is uneven. It is the detection interval for evaluating the uniformity of illumination of the module. For example, the radial interval corresponding to the 60% to 100% field of view of the imaging circle is selected as the second radial range. This interval completely covers the edge attenuation field of view of the module and can fully reflect the true characteristics of lens vignetting and brightness attenuation.
[0086] The second brightness statistical value is the edge brightness value obtained by statistically analyzing the brightness data within the second radial range. It is used to characterize the imaging brightness attenuation level of the edge field of view of the tested camera module. It is the molecular parameter for calculating the relative illumination ratio and directly determines the final judgment result of the module's illumination uniformity. All continuous brightness values of the brightness attenuation fitting curve within the second radial range can be extracted and integrated through mean statistics, median statistics, minimum statistics, or weighted statistics to obtain a statistical value that can truly represent the brightness attenuation level of the edge field of view, accurately reflecting the worst brightness state and attenuation degree of the edge field of view. For example, all brightness values of the fitting curve within the second radial range of the 75% to 100% field of view can be extracted and the edge comprehensive brightness value can be obtained through weighted average calculation. This value is used as the second brightness statistical value to truly reflect the overall brightness attenuation degree of the module's edge field of view.
[0087] The relative illuminance of the camera module under test can be determined by using the first luminance statistical value of the center field of view as the base denominator and the second luminance statistical value of the edge field of view as the comparison numerator. The ratio calculation is used to quantify the attenuation ratio of edge luminance relative to center luminance, and finally determine the relative illuminance value of the camera module under test. That is, the second luminance statistical value is divided by the first luminance statistical value, and the result is quantified into a percentage. The percentage value obtained is the relative illuminance. The closer the value is to 100%, the better the brightness uniformity of the entire field of view of the module and the less severe the vignetting attenuation. For example, under the condition that the first luminance statistical value of the center is determined to be 250 units of brightness and the second luminance statistical value of the edge is determined to be 200 units of brightness, the percentage relative illuminance value is calculated by the ratio of the two. This value can accurately quantify the brightness uniformity and vignetting attenuation of the module's field of view.
[0088] For example, firstly, the brightness data of all sampling frames acquired in the previous full field of view can be bound one by one with the radial position parameters corresponding to each sampling frame to construct a brightness distribution matrix containing complete field of view spatial information and brightness numerical information, realizing the structured and regular storage of discrete sampling data. Then, the brightness distribution matrix is retrieved, and a preset fitting algorithm is used to smooth and fit all discrete position and brightness data in the matrix, generating a brightness attenuation fitting curve that continuously changes with radial distance. The brightness change information between discrete sampling points is supplemented by the continuous curve, completely restoring the full-domain brightness gradient law of the tested camera module from the center field of view to the edge field of view. According to the preset field of view interval division rules, the first radial range near the center of the imaging circle and the second radial range near the edge of the imaging circle are locked respectively. Continuous brightness data in the two intervals are extracted from the brightness attenuation fitting curve, and the first brightness statistical value that stably represents the central imaging level and the second brightness statistical value that represents the edge attenuation level are obtained by standardizing statistical methods. Finally, the ratio of the second brightness statistical value and the first brightness statistical value is calculated and converted to a percentage, and the relative illumination parameter of the tested camera module is accurately obtained.
[0089] By implementing the above embodiments, the brightness data of each sampling frame is associated with the corresponding radial position to generate a brightness distribution matrix. Based on this brightness distribution matrix, a brightness attenuation fitting curve is obtained to show the brightness change pattern of the camera module from the center area to the edge area. On this basis, the relative illuminance is determined by extracting the brightness statistics of the areas near the center area and the areas near the edge area respectively and calculating the ratio between the two. This makes the relative illuminance calculation no longer dependent on a small number of discrete sampling points, but based on the overall brightness attenuation trend analysis, thereby improving the stability and accuracy of the detection results and more accurately reflecting the brightness distribution characteristics of the entire field of view of the camera module.
[0090] In some embodiments, after step 104, the aforementioned camera module relative illumination detection method may further include: obtaining a preset relative illumination qualification threshold; comparing the relative illumination with the preset relative illumination qualification threshold to obtain the illumination uniformity determination result of the camera module under test.
[0091] In some examples, the preset relative illumination pass threshold is a critical illuminance judgment value pre-set based on the camera module product specifications, industry optical testing standards, and mass production quality control requirements. It serves as the benchmark critical parameter for distinguishing between qualified and unqualified illuminance uniformity of the camera module. The preset relative illumination pass threshold can be pre-calibrated in conjunction with the optical design indicators and product access standards of different types of camera modules. It can be configured differently according to different module categories such as wide-angle, ultra-wide-angle, telephoto, and macro, as well as customer quality requirements. It is also compatible with industry-standard optical testing specifications and internal mass production quality inspection standards, and can be flexibly called according to the testing scenario. For example, for a conventional consumer-grade wide-angle camera module, the preset relative illumination pass threshold can be set to 70%. This value means that when the brightness attenuation ratio of the edge field of view to the center field of view is not less than 70%, its vignetting and illuminance uniformity meet the product's factory standards. For high-specification, high-end imaging modules, a higher pass threshold can be set to improve the control standards for imaging uniformity.
[0092] For example, after completing the acquisition of full-field-of-view brightness data, construction of brightness distribution matrix, fitting of brightness attenuation curve, and accurate calculation of relative illuminance for the tested camera module, a preset relative illuminance pass threshold, which is fixed according to product specifications and industry testing standards, is retrieved to establish a unified judgment benchmark for this quality inspection. The accurate relative illuminance value obtained by the module is precisely compared with the preset pass threshold, and the automatic judgment is completed strictly according to the numerical relationship. When the measured relative illuminance value meets the condition of being greater than or equal to the preset pass threshold, it indicates that the brightness attenuation of the full-field-of-view of the camera module is controllable, the vignetting and fading phenomena meet the design standards and factory requirements, and the illuminance uniformity performance is qualified. When the measured relative illuminance value is lower than the preset pass threshold, it indicates that the brightness attenuation of the edge field of view of the module is excessive, the brightness uniformity of the full field of view is poor, there is an obvious vignetting defect, and the illuminance uniformity performance is unqualified.
[0093] By implementing the above embodiments, the relative illumination test results can be further used for product quality evaluation. Based on the completion of full-field brightness data acquisition and relative illumination calculation, the uniformity of illumination of the camera module can be automatically determined, improving the integrity and automation of the testing process and providing a basis for camera module performance screening and quality control.
[0094] Furthermore, as an implementation of the aforementioned method embodiments, this application also provides a camera module relative illumination detection device for implementing the aforementioned method embodiments. This device embodiment corresponds to the aforementioned method embodiments. For ease of reading, this camera module relative illumination detection device embodiment will not repeat the details of the aforementioned method embodiments one by one, but it should be understood that the device in this application embodiment can correspondingly implement all the contents of the aforementioned method embodiments. For example... Figure 2As shown, the camera module relative illumination detection device 20 includes: a region division unit 201, a sampling frame generation unit 202, a brightness acquisition unit 203, and a relative illumination determination unit 204. The region division unit 201 is used to radially divide at least two concentric annular sampling areas based on the imaging circular area of the camera module under test, according to a preset field-of-view ratio. The preset field-of-view ratio is used to determine the radial boundary of each annular sampling area. The sampling frame generation unit 202 is used to generate multiple sampling frames for each annular sampling area using polar coordinate positioning. The distribution density of sampling frames in the outer annular sampling area of the imaging circular area is higher than that in the inner annular sampling area. The brightness acquisition unit 203 is used to acquire brightness data within each sampling frame area when the camera module under test captures a preset test image. The relative illumination determination unit 204 is used to determine the relative illumination of the camera module under test based on the brightness data within each sampling frame area.
[0095] In some embodiments, the region division unit 201 is further configured to obtain the target sampling frame size and the imaging circle diameter of the imaging circle region; determine the total number of annular sampling areas based on the ratio of the imaging circle diameter to the target sampling frame size; and determine the radial boundary of each annular sampling area according to a preset field of view ratio and the total number, thereby obtaining at least two concentric annular sampling areas.
[0096] In some embodiments, the region division unit 201 is further configured to obtain the field of view parameters of the camera module under test and the imaging circle radius of the imaging circle region; based on the field of view parameters, determine the radial pixel span corresponding to a unit field of view in the imaging circle region; and determine the target sampling frame size by multiplying the radial pixel span by a preset precision coefficient, wherein the preset precision coefficient characterizes the number of pixel span units covered by a single sampling frame along the radial direction.
[0097] In some embodiments, the sampling frame generation unit 202 is further configured to, for each annular sampling region, determine the radial position of the sampling frame within the annular sampling region based on the ring number of the annular sampling region and the target sampling frame size; determine the corresponding angle step size based on the ring number, wherein the angle step size decreases as the ring number increases; determine the number of sampling frames within the annular sampling region and the polar position of each sampling frame based on the angle step size; and determine the polar coordinates of each sampling frame based on the radial position and the polar position.
[0098] In some embodiments, the brightness acquisition unit 203 is further configured to convert the polar coordinates of each sampling frame into pixel coordinates in a preset test image; determine the pixel region corresponding to each sampling frame in the preset test image based on the pixel coordinates of each sampling frame and the target sampling frame size; and acquire the average value of the brightness of all pixels in each pixel region when the camera module under test captures the preset test image, as the brightness data of the corresponding sampling frame.
[0099] In some embodiments, the brightness acquisition unit 203 is further configured to acquire a standard test image output by the camera module under test; calculate the offset of the brightness centroid and geometric center of the standard test image to obtain the optical center offset of the camera module under test; and perform translation correction on the initial pixel coordinates of each sampling frame based on the optical center offset to obtain the pixel coordinates.
[0100] In some embodiments, the relative illumination determination unit 204 is further configured to associate the brightness data of each sampling frame with the corresponding radial position to generate a brightness distribution matrix; based on the brightness distribution matrix, obtain a brightness attenuation fitting curve of brightness changing with radial distance through curve fitting; based on the brightness attenuation fitting curve, extract a first brightness statistical value in a first radial range and a second brightness statistical value in a second radial range, wherein the first radial range is close to the center of the imaging circular region and the second radial range is close to the edge of the imaging circular region; and determine the relative illumination based on the ratio of the second brightness statistical value to the first brightness statistical value.
[0101] In some embodiments, the relative illumination determination unit 204 is further configured to obtain a preset relative illumination qualification threshold; compare the relative illumination with the preset relative illumination qualification threshold to obtain the illumination uniformity determination result of the camera module under test.
[0102] This application also provides a computer-readable storage medium storing computer-executable instructions or computer programs, which, when executed by a processor, will cause the processor to perform any step of the camera module relative illumination detection method provided in this application.
[0103] In some embodiments, the computer-readable storage medium may be a random access memory (RAM), a read-only memory (ROM), flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); or it may be a variety of devices that include one or any combination of the above-mentioned memories.
[0104] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0105] In some embodiments, computer-executable instructions may, but do not necessarily, correspond to files in a file system, and may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).
[0106] In some embodiments, computer-executable instructions may be deployed to execute on an electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.
[0107] like Figure 3 As shown, this application also provides an electronic device 30, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor. When the processor 320 executes the computer program 311, it implements any step of the above-described camera module relative illumination detection method.
[0108] This application also provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer program or computer-executable instructions from the computer-readable storage medium and executes the computer program or computer-executable instructions, causing the electronic device to perform any step of the camera module relative illumination detection method described above.
[0109] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for detecting relative illumination of a camera module, characterized in that, include: Based on the imaging circular area of the camera module under test, at least two concentric annular sampling areas are radially divided according to a preset field of view ratio, wherein the preset field of view ratio is used to determine the radial boundary of each annular sampling area. For each of the aforementioned annular sampling areas, multiple sampling frames are generated using polar coordinate positioning. The distribution density of sampling frames in the outer annular sampling area of the imaging circular region is higher than that in the inner annular sampling area. When the camera module under test captures a preset test image, the brightness data of each sampling frame area is obtained; The relative illumination of the camera module under test is determined based on the brightness data within each of the sampling frame areas.
2. The relative illumination detection method for a camera module according to claim 1, characterized in that, The imaging circular region based on the camera module under test is divided radially into at least two concentric annular sampling regions according to a preset field-of-view ratio, including: Obtain the target sampling frame size and the imaging circle diameter of the imaging circle region; The total number of annular sampling areas is determined based on the ratio of the imaging circle diameter to the target sampling frame size; According to the preset field-of-view ratio and the total number, the radial boundary of each of the annular sampling areas is determined to obtain the at least two concentric annular sampling areas.
3. The relative illumination detection method for a camera module according to claim 2, characterized in that, The step of obtaining the target sampling frame size includes: Obtain the field of view parameters of the camera module under test and the imaging circle radius of the imaging circle region; Based on the field of view parameters, determine the radial pixel span corresponding to a unit field of view in the imaging circular region; The product of the radial pixel span and the preset precision coefficient is determined as the target sampling frame size, wherein the preset precision coefficient represents the number of pixel span units covered by a single sampling frame radially.
4. The relative illumination detection method for a camera module according to claim 3, characterized in that, The step of generating multiple sampling frames for each of the aforementioned annular sampling regions using polar coordinate positioning includes: For each of the annular sampling regions, the radial position of the sampling frame within the annular sampling region is determined based on the ring number of the annular sampling region and the target sampling frame size; The corresponding angle step size is determined based on the ring number, wherein the angle step size decreases as the ring number increases; Based on the angular step size, the number of sampling frames and the polar angle position of each sampling frame within the annular sampling area are determined; The polar coordinates of each sampling frame are determined based on the radial position and the polar angle position.
5. The relative illumination detection method for a camera module according to claim 4, characterized in that, When acquiring the preset test image captured by the camera module under test, the brightness data within each sampling frame area includes: Convert the polar coordinates of each sampling frame to pixel coordinates in the preset test image; Based on the pixel coordinates of each sampling frame and the size of the target sampling frame, the pixel region corresponding to each sampling frame in the preset test image is determined; When the camera module under test captures a preset test image, the average brightness of all pixels in each pixel region is obtained and used as the brightness data of the corresponding sampling frame.
6. The relative illumination detection method for a camera module according to claim 5, characterized in that, The step of converting the polar coordinates of each sampling frame to pixel coordinates in the preset test image includes: Acquire the standard test image output by the camera module under test; The offset of the brightness centroid and geometric center of the standard test image is calculated to obtain the optical center offset of the camera module under test; Based on the optical center offset, the initial pixel coordinates of each sampling frame are translated and corrected to obtain the pixel coordinates.
7. The relative illumination detection method for a camera module according to claim 4, characterized in that, The determination of the relative illumination of the camera module under test based on the brightness data within each of the sampling frame areas includes: The brightness data of each sampling frame is correlated with the corresponding radial position to generate a brightness distribution matrix; Based on the brightness distribution matrix, a brightness attenuation fitting curve is obtained by curve fitting to show the change in brightness with radial distance; Based on the brightness attenuation fitting curve, a first brightness statistical value within a first radial range and a second brightness statistical value within a second radial range are extracted, wherein the first radial range is close to the center of the imaging circular region and the second radial range is close to the edge of the imaging circular region. The relative illuminance is determined based on the ratio of the second illuminance statistical value to the first illuminance statistical value.
8. The method for detecting relative illumination of a camera module according to any one of claims 1 to 7, characterized in that, After determining the relative illumination of the camera module under test based on the brightness data within each of the sampling frame areas, the relative illumination detection method for the camera module further includes: Obtain the preset relative illumination qualification threshold; The relative illuminance is compared with the preset relative illuminance qualification threshold to obtain the illuminance uniformity determination result of the tested camera module.
9. A relative illumination detection device for a camera module, characterized in that, include: The region division unit is used to divide at least two concentric annular sampling areas radially based on the imaging circular area of the camera module under test, according to a preset field of view ratio, wherein the preset field of view ratio is used to determine the radial boundary of each of the annular sampling areas. The sampling frame generation unit is used to generate multiple sampling frames for each of the annular sampling areas using polar coordinate positioning, wherein the distribution density of sampling frames in the outer annular sampling area of the imaging circular area is higher than that in the inner annular sampling area. A brightness acquisition unit is used to acquire brightness data within each sampling frame area when the camera module under test captures a preset test image; The relative illumination determination unit is used to determine the relative illumination of the camera module under test based on the brightness data in each of the sampling frame areas.
10. An electronic device, comprising: The memory and processor are characterized in that the processor, when executing a computer program stored in the memory, implements the steps of the camera module relative illumination detection method as described in any one of claims 1 to 8.
