A method for testing the exposure value of a camera module
By using scene-specific sampling of pixels to determine brightness values in camera module exposure testing, the exposure algorithm is simplified, solving the problems of high computational load and low efficiency in existing technologies, and achieving more efficient testing.
Patent Information
- Application Number
- CN202210764981.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-01
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2042-07-01
AI Technical Summary
Existing methods for testing exposure values of camera modules involve large amounts of computation, have low testing efficiency, and lack room for optimization.
By selecting the most central sampled pixel for maximum value determination or selecting a corner sampled pixel for minimum value determination in different scenes, the exposure algorithm process is simplified and redundant calculations are reduced.
By simplifying the exposure algorithm process, the amount of computation is significantly reduced, and testing efficiency is improved.
Smart Images

Figure CN115348439B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a camera module testing method, specifically to an exposure testing method for the module. Background Technology
[0002] Since exposure value testing has a wide range of applications, it is included in almost everything except black level testing. This article explains the process optimization of its software implementation.
[0003] Due to the technical limitations of the optical imaging principle used in module applications, the incident light from the lens cannot reach the sensor surface uniformly. Therefore, major module manufacturers and sensor technology platforms have developed techniques to correct the images output by the modules. To ensure reliable correction results, the technical correction has limitations on the environmental parameters of the image.
[0004] Module exposure testing is the first step in ensuring that the image environment meets the requirements of technical calibration. It is widely used and standardized by the required parameters. Existing technical calibration mainly specifies parameters such as: region of interest (ROI) specification, luminance value (G, Y) specification, or exposure time (ms) specification, etc.
[0005] The range of exposure parameters differs in different technical corrections, which also determines the differences in exposure value testing algorithms. These differences have room for systematization and optimization.
[0006] Current methods for testing exposure values involve varying the exposure time to bring the brightness within a specified area to the required range. For tests with fixed exposure times, the parameters are limited, leaving no room for optimization. However, for exposure tests with specific areas and brightness values, the exposure time is subject to adjustment, allowing for optimization of the software algorithm. Existing exposure testing and correction algorithms suffer from high computational complexity and low testing efficiency. Summary of the Invention
[0007] To address the shortcomings of the existing technology, this invention provides a method for testing the exposure value of a camera module. This method can select the most central sampled pixel in each scene to perform the maximum value logical judgment, or select the corner sampled pixel to perform the minimum value logical judgment, which can reduce the amount of calculation and improve efficiency.
[0008] To achieve the above objectives, the present invention adopts the following technical solution:
[0009] 1. A method for testing the exposure value of a camera module, characterized by comprising the following steps:
[0010] S1. Obtain the raw image data captured by the camera module, define the ROI, and calculate the average exposure value G,Y of the ROI;
[0011] S2. Determine whether the brightness value is equal to the specified value. If the brightness value equals the specified value, proceed to step S15; if the brightness value does not equal the specified value, proceed to step S3.
[0012] S3. Determine whether the brightness value is greater than the specified value. If the brightness value is greater than the specified value, proceed to step S4; if the brightness value is less than the specified value, proceed to step S5.
[0013] S4. Reduce the exposure time and proceed to step S6;
[0014] S5. Increase the exposure time and proceed to step S7;
[0015] S6. Calculate the ROI brightness value by selecting any one of the four corners based on the original image data, and proceed to step S8.
[0016] S7. Select the center based on the original image data and calculate the ROI region degree value, then proceed to step S9;
[0017] S8. Determine whether the new brightness value is equal to the specified value. If the new brightness value is equal to the specified value, proceed to step S10. If the new brightness value is not equal to the specified value, proceed to step S4.
[0018] S9. Determine whether the new brightness value is equal to the specified value. If the new brightness value equals the specified value, proceed to step S10; if the new brightness value does not equal the specified value, proceed to step S5.
[0019] S10. Calculate the average exposure value of the original image data, with ROI of 20%*20%, and proceed to step S11.
[0020] S11. Determine whether the brightness value is equal to the specified value. If the brightness value is equal to the specified value, proceed to step S15.
[0021] S12. Determine whether the brightness value is greater than the specified value. If the brightness value is greater than the specified value, proceed to step S13; if the brightness value is less than the specified value, proceed to step S14.
[0022] S13. Reduce the exposure time and proceed to step 10;
[0023] S14. Increase the exposure time and proceed to step 10;
[0024] S15. Exposure complete, test over.
[0025] 2. The method for testing the exposure value of a camera module according to claim 1, wherein the exposure area in step S1 is limited to a proportional ROI or a pixel-based ROI.
[0026] 3. The method for testing the exposure value of a camera module according to claim 2, characterized in that: the ROI in step S1 is 20%*20%.
[0027] 4. The method for testing the exposure value of a camera module according to claim 1, wherein the ROI in step S6 is 100 pixels * 100 pixels.
[0028] 5. The method for testing the exposure value of a camera module according to claim 1, wherein the ROI in step S7 is 100 pixels * 100 pixels.
[0029] The beneficial effects of this invention include: simplifying the process steps of the exposure algorithm by utilizing the equivalent characteristics of sampling data, greatly reducing the number of repeated calculations, thereby improving the efficiency of exposure testing. Attached Figure Description
[0030] Figure 1 This is a flowchart of the present invention;
[0031] Figure 2 This is a schematic diagram of the output brightness of the module of the present invention;
[0032] Figure 3 This is an example diagram of the ROI area sampling exposure test of the present invention. Detailed Implementation
[0033] The present invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0034] One such Figure 1-3 The method for testing the exposure value of the camera module shown is optimized by improving the sampling method and thus increasing the efficiency of the program test.
[0035] Based on the imaging principle of a camera, the image captured by a camera module can be seen as a combination of small R, G, and B pixel squares arranged one after another.
[0036] There are two types of ROI (Region of Interest) limits: one is the proportional type, which selects N%*N% of the central area of the entire image as the ROI area for calculating the average exposure values G and Y; the other is the pixel number type, which selects N*N pixels in the central area of the entire image as the ROI area for calculating the average exposure values G and Y.
[0037] like Figure 2 As shown, based on the optical imaging principle of the module, the brightness value is the highest at the center, and the light gradually weakens as it moves towards the four corners. Therefore, it can be reliably concluded that the brightness value of the central area is greater than that of the outer areas, thus providing guidance for the sampling method when testing the module's brightness value. The brightness value at the center of the ROI is the maximum brightness value of the ROI area, and the brightness values at the four corners of the ROI are the minimum brightness values of the ROI, with G_max > G_avg > G_min.
[0038] like Figure 3As shown, for the intermediate process of exposure value testing, the most central sampled pixel can be selected in each scene to replace the logic judgment of the maximum value, or the corner sampled pixel can be selected to replace the logic judgment of the minimum value. Both can reduce the amount of calculation and improve efficiency.
[0039] like Figure 1 As shown, the algorithm optimization and overall testing and calibration steps are as follows:
[0040] S1. Calculate the average exposure value for the raw image data. The ROI is 20% * 20%, proceed to step 2.
[0041] S2. Determine if the brightness value equals the specified value?
[0042] If the brightness value equals the specified value, proceed to step 15.
[0043] If the brightness value is not equal to the specified value, proceed to step 3.
[0044] S3. Determine if the brightness value is greater than the specified value?
[0045] If the brightness value is greater than the specified value, proceed to step 4.
[0046] If the brightness value is less than the specified value, proceed to step 5.
[0047] S4. Reduce the exposure time and proceed to step 6.
[0048] S5. Increase the exposure time and proceed to step 7.
[0049] S6. Calculate the exposure value of the ROI (Region of Interest) in one of the four corners of the raw image data. The ROI is 100 pixels * 100 pixels in one of the four corners. Proceed to step 8.
[0050] S7. Calculate the ROI brightness value at the center of the raw image data. The ROI is 100 pixels * 100 pixels at its center. Proceed to step 9.
[0051] S8. Determine if the new brightness value equals the specified value?
[0052] If the new brightness value equals the specified value, proceed to step 10.
[0053] If the new brightness value is not equal to the specified value, proceed to step 4.
[0054] S9. Determine if the new brightness value equals the specified value?
[0055] If the new brightness value equals the specified value, proceed to step 10.
[0056] If the new brightness value is not equal to the specified value, proceed to step 5.
[0057] S10. Calculate the exposure value using the raw method on the raw image data. ROI is 20% * 20%, proceed to step 11.
[0058] S11. Determine if the brightness value equals the specified value?
[0059] If the brightness value equals the specified value, proceed to step 15.
[0060] S12. Determine if the brightness value is greater than the specified value?
[0061] If the brightness value is greater than the specified value, proceed to step 13.
[0062] If the brightness value is less than the specified value, proceed to step 14.
[0063] S13. Reduce the exposure time and proceed to step 10.
[0064] S14. Increase the exposure time and proceed to step 10.
[0065] S15. Exposure complete, test ended.
[0066] Example
[0067] Assuming the width of the module's pixel array is W, the height is H, and the ROI is 20%*20%, if the module uses 12M (12000000) pixels and 4000*3000 pixels, then apply the above example.
[0068] The time complexity of a single exposure using the ROI proportional exposure method is:
[0069] For(i=0,i<0.2*4000,i=i+1)
[0070] For(j=0,j<0.2*3000,j=j+1)
[0071] O = O(48 0000)
[0072] The new exposure method performs a single exposure with an ROI sample of 100 pixels * 100 pixels. The time complexity is:
[0073] For (i = 0, i < 100, i = i + 1)
[0074] For(j=0,j<100,j=j+1)
[0075] O = O(1 0000)
[0076] The above example is based on a single exposure. In actual applications, the module needs to undergo multiple exposures to complete the test, so the actual computational load is several to more than ten times that of the example above.
[0077] The technical solutions provided by the embodiments of the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the embodiments of the present invention. The descriptions of the embodiments above are only for helping to understand the principles of the embodiments of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the embodiments of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for testing the exposure value of a camera module, characterized in that: Includes the following steps, S1. Obtain the raw image data captured by the camera module, limit the ROI to 20%*20%, and calculate the average exposure value G,Y of the ROI. S2. Determine whether the brightness value is equal to the specified value. If the brightness value equals the specified value, proceed to step S15; if the brightness value does not equal the specified value, proceed to step S3. S3. Determine whether the brightness value is greater than the specified value. If the brightness value is greater than the specified value, proceed to step S4; if the brightness value is less than the specified value, proceed to step S5. S4. Reduce the exposure time and proceed to step S6; S5. Increase the exposure time and proceed to step S7; S6. Calculate the ROI brightness value by selecting any one of the four corners based on the original image data, and proceed to step S8. S7. Select the center based on the original image data and calculate the ROI region degree value, then proceed to step S9; S8. Determine whether the new brightness value is equal to the specified value. If the new brightness value equals the specified value, proceed to step S10. If the new brightness value does not equal the specified value, proceed to step S4. S9. Determine whether the new brightness value is equal to the specified value. If the new brightness value equals the specified value, proceed to step S10; if the new brightness value does not equal the specified value, proceed to step S5. S10. Calculate the average exposure value of the original image data. The ROI is 20%*20%. Proceed to step S11. S11. Determine whether the brightness value is equal to the specified value. If the brightness value is equal to the specified value, proceed to step S15. S12. Determine whether the brightness value is greater than the specified value. If the brightness value is greater than the specified value, proceed to step S13; if the brightness value is less than the specified value, proceed to step S14. S13. Reduce the exposure time and proceed to step 10; S14. Increase the exposure time and proceed to step 10; S15. Exposure complete, test over.
2. The method for testing the exposure value of a camera module according to claim 1, characterized in that: In step S1, the exposure area is limited to a proportional ROI or a pixel-based ROI.
3. The method for testing the exposure value of a camera module according to claim 1, characterized in that: In step S6, the ROI is 100 pixels * 100 pixels.
4. The method for testing the exposure value of a camera module according to claim 1, characterized in that: In step S7, the ROI is 100 pixels * 100 pixels.
Citation Information
Patent Citations
Image shooting exposure adjustment method, device and computer equipment
CN109587407A
Image processing method and device, computer equipment and storage medium
CN112118388A