Automatic offset correction method for ADC channel of CIS linear array camera
By automatically adjusting the channel offset of CIS cameras, the problem of large differences in channel responses in CIS cameras under dark field conditions is solved, and the consistency of channel responses and imaging effects are improved.
Patent Information
- Application Number
- CN202411274460.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-09-12
AI Technical Summary
The responses of CIS cameras vary greatly in different channels under dark field conditions, resulting in poor imaging results. The existing methods mainly rely on manual adjustment of ADC channel offset, which is time-consuming and low accuracy, and lacks automation solutions.
By taking dark field images of different channels at different offsets, determine the offset value of each channel that is most suitable for the target response range, and automatically adjust the channel offset value to make the responses of each channel basically consistent. The method of steps 1-5 is adopted: Determine the channel number, adjust the offset, traverse the offset value, select the minimum response value, set the target offset value, and realize automatic offset setting.
The basic consistency of responses of each ADC channel is achieved, the problem of time-consuming and low accuracy of manual adjustment is solved, and the imaging effect is improved.
Smart Images

Figure CN119172652A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image acquisition preprocessing, and in particular to a method for automatically correcting ADC channel offset of a CIS linear array camera. Background Art
[0002] CIS (Contact Image Sensor) is a new type of image sensor. Compared with the traditional charge coupled device (CCD), CIS adopts an integrated design of light source, sensor and amplifier, which has the advantages of more compact structure and lower cost. For China, most of them are currently committed to speed and resolution, and rarely involve image preprocessing solutions. Camera offset adjustment is in this field.
[0003] When a CIS camera shoots a dark field image without offset correction for the ADC channel, the responses of different channels will be greatly different, which will greatly affect the imaging effect. At present, when CIS cameras process images in the post-processing stage, they will use algorithms to correct the gain and offset of each position of the image. Generally, the method adopted is a non-uniformity correction method, namely flat field correction, so that when the camera shoots a uniform image, the response values output by each channel are basically the same. Although the above method can play a certain role, if the channels are not pre-processed, the offset is too large. This method will cause the actual grayscale of the image to be distorted, and the actual image obtained will be greatly different from the object. The traditional offset adjustment method is mainly to manually adjust the offset of each channel of the ADC. This method wastes time and manpower. Each modification requires offset adjustment of each channel at the register, and the corresponding relationship between the image position and the channel must be found. Therefore, an automated method is needed to adjust the offset value of the camera so that the response values of different channels of the camera in the dark field are basically consistent. Summary of the invention
[0004] Based on the existing problems and deficiencies, the present invention provides a method for automatically adjusting the ADC channel offset of a CIS linear array camera. By shooting dark field images of different channels at different offsets, the offset value that best suits the target response range is obtained, thereby setting the optimal offset value of different channels. The response curves of different ADC channels are different, and the response curves of different channels of the same ADC are also different. This results in different outputs obtained in the areas corresponding to different channels of the camera under the same input, resulting in obvious differences in the images taken by the camera. To make the responses basically the same, the method usually used is to give the output of the ADC channel an offset, that is, add / subtract a value. In order to meet the conditions of use, the offset is usually adjusted under the same ambient light conditions. If the offset is adjusted synchronously, the image will be partially overexposed or partially too dark, affecting the imaging effect. The best method is to adjust the offset of the channel separately according to the response of different channels, but manual adjustment takes a long time and has low precision. The present invention solves this problem.
[0005] In order to better achieve the effect of the present invention, a CIS linear array camera ADC channel automatic offset correction method is proposed for determining the actual offset value of each channel. The method includes:
[0006] Step 1: Determine the ADC and channel number of the camera, and obtain the number information of each channel;
[0007] Step 2: Adjust the offset value of the channel. The corresponding actual image will change in the corresponding area to determine the mapping relationship between the channel and the actual area of the image.
[0008] Step 3: According to the configuration of different ADCs, traverse their different offset values and find the minimum response value of each channel corresponding to all offset values;
[0009] Step 4: Select different channels, and determine whether the response value is within the input target adjustment range according to the minimum response value of each channel corresponding to all the offset values obtained above, and use the offset value corresponding to the minimum response value within the target adjustment range as the target offset value of the current channel;
[0010] Step 5: Set the corresponding offset values calculated above for different channels to complete the automatic offset setting.
[0011] Furthermore, the specific method of step 2 is:
[0012] Step 2.1: Select the first channel;
[0013] Step 2.2: Increase the offset value of the current channel and set it to the maximum allowable value;
[0014] Step 2.3: Acquire the image composed of all channels after adjusting the offset value;
[0015] Step 2.4: Binarize the image according to the input binarization threshold, and the image area corresponding to the channel with a high offset value will be highlighted;
[0016] Step 2.5: Find the left and right boundaries of the highlighted area, which is the actual image area corresponding to the current channel, and get the mapping;
[0017] Step 2.6: Change the channel and repeat steps 2.1 to 2.5 until all channels have been traversed.
[0018] Furthermore, the specific method of step 3 is:
[0019] Step 3.1: Initialize the offset of all channels to the minimum value of the adjustable range;
[0020] Step 3.2: Collect the image composed of all channels after adjustment;
[0021] Step 3.3: Find the minimum response value among all channels under the current offset;
[0022] Step 3.4: Change the offset value and repeat the operations from step 3.1 to step 3.3 until all adjustable offset values are traversed and the minimum response value of all channels corresponding to all offset values is found;
[0023] Furthermore, the specific method of step 4 is:
[0024] Step 4.1: Select the first channel and initialize the target response value to 255;
[0025] Step 4.2: Adjust the offset value and check whether the response value corresponding to the current offset value is within the target adjustment range. The target adjustment range is determined according to the actual situation and whether it is smaller than the current target response value. If all the above conditions are met, replace the target response value with the current response value and record the corresponding offset value.
[0026] Step 4.3: Change the offset value and repeat the operations from step 4.2 to step 4.3 until all adjustable offset values are traversed and the obtained offset value is the target offset value of the current channel;
[0027] Step 4.4: Change the channel and repeat the operations from step 4.2 to step 4.4 until all channels are traversed and the target offset values of all channels are finally obtained.
[0028] Compared with the current method, the present invention has the following friendly effects:
[0029] The implementation of the present invention can obtain the optimal offset setting that meets the target range, so that the responses of the channels of each ADC are basically at the same value, thereby solving the problem of excessive differences in the responses of each channel of the CIS linear array camera and the problem that manual adjustment is time-consuming and has low precision. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 Flow chart of the method of the present invention.
[0031] Figure 2 This is a schematic diagram of the image area positions corresponding to different channels being searched in step 5 of the present invention.
[0032] Figure 3 The automatic offset correction process of the present invention is a schematic diagram of the offset correction being performed on each channel. DETAILED DESCRIPTION
[0033] The embodiment of the present invention provides a method for automatic offset correction of ADC channels of a CIS linear array camera, so that a person skilled in the art can understand and implement the present invention. The present invention is further described below. The steps are as follows:
[0034] Step 1: Switch the camera capture mode to uncalibrated
[0035] Step 2: Turn off the camera light source, use a uniform white calibration plate as the subject, and use only ambient light as the light source
[0036] Step 3: Select the ADC model used by the current camera. The models that can be adjusted include 82v48, AK8478 and AK8446
[0037] Step 4: Determine the starting ADC number and number of ADCs of the camera to be corrected, as well as the positions of the starting channel and the ending channel
[0038] Step 5: Change the offset of different channels, set it to the maximum value, collect the current image, find the highlighted area, and get the image area position corresponding to different channels
[0039] Step 6: According to the above data, modify the offset value of the channel and find the minimum pixel value under each channel. If the pixel value is very close to the expected response value, modify the offset value of the current channel to the offset value corresponding to the above pixel value. This realizes the automatic offset correction of the ADC channel of the CIS linear array camera of the present invention.
[0040] like Figure 2 As shown, the process of step 5 of the present invention is shown, at this time, the image area positions corresponding to different channels are being found; Figure 3As shown, the automatic offset correction process of the present invention is shown, and offset correction is being performed on each channel. The present invention allows individual differences between different channels, and after adopting the method of the present invention, the final output of each channel is made consistent at the hardware level.
Claims
1. A method for automatic offset correction of ADC channels of CIS linear array cameras. It is characterized in that The method includes: Step 1: Determine the ADC and channel number of the camera, and obtain the number information of each channel; Step 2: Adjust the offset value of the channel. The corresponding actual image will change in the corresponding area to determine the mapping relationship between the channel and the actual area of the image. Step 3: According to the configuration of different ADCs, traverse their different offset values and find the minimum response value of each channel corresponding to all offset values; Step 4: Select different channels, and determine whether the response value is within the input target adjustment range according to the minimum response value of each channel corresponding to all the offset values obtained above, and use the offset value corresponding to the minimum response value within the target adjustment range as the target offset value of the current channel; Step 5: Set the corresponding offset values calculated above for different channels to complete the automatic offset setting.
2. A CIS linear array camera ADC channel automatic offset correction method as claimed in claim 1, It is characterized in that The specific method of step 2 is: Step 2.1: Select the first channel; Step 2.2: Increase the offset value of the current channel and set it to the maximum allowable value; Step 2.3: Acquire the image composed of all channels after adjusting the offset value; Step 2.4: Binarize the image according to the input binarization threshold, and the image area corresponding to the channel with a high offset value will be highlighted; Step 2.5: Find the left and right boundaries of the highlighted area, which is the actual image area corresponding to the current channel, and get the mapping; Step 2.6: Change the channel and repeat steps 2.1 to 2.5 until all channels have been traversed.
3. A CIS linear array camera ADC channel automatic offset correction method as claimed in claim 1, It is characterized in that The specific method of step 3 is: Step 3.1: Initialize the offset of all channels to the minimum value of the adjustable range; Step 3.2: Collect the image composed of all channels after adjustment; Step 3.3: Find the minimum response value among all channels under the current offset; Step 3.4: Change the offset value and repeat steps 3.1 to 3.3 until all adjustable offset values are traversed and the minimum response value in all channels corresponding to all offset values is found.
4. A CIS linear array camera ADC channel automatic offset correction method as claimed in claim 1, It is characterized in that The specific method of step 4 is: Step 4.1: Select the first channel and initialize the target response value to 255; Step 4.2: Adjust the offset value and check whether the response value corresponding to the current offset value is within the target adjustment range. The target adjustment range is determined according to the actual situation and whether it is smaller than the current target response value. If all the above conditions are met, replace the target response value with the current response value and record the corresponding offset value. Step 4.3: Change the offset value and repeat the operations from step 4.2 to step 4.3 until all adjustable offset values are traversed and the obtained offset value is the target offset value of the current channel; Step 4.4: Change the channel and repeat the operations from step 4.2 to step 4.4 until all channels are traversed and the target offset values of all channels are finally obtained.
Citation Information
Patent Citations
Image scanning system and method based on CIS and storage medium
CN110022420A
Ramp signal generator and image sensor including same
CN110944130A
Multichannel CIS image calibration method
CN112135009A
Image scanning apparatus
US20050057783A1
Background Calibration Method For Fixed Gain Amplifiers
US20120119930A1
