A CIS linear array camera ADC channel automatic offset correction method
By automatically adjusting the channel offset of the CIS camera, the problem of inconsistent imaging caused by channel response differences is solved, improving image quality and reducing the time and accuracy of manual adjustments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNIV OF ELECTRONICS SCI & TECH OF CHINA
- Filing Date
- 2024-09-12
- Publication Date
- 2026-04-14
AI Technical Summary
When shooting in dark environments, CIS cameras exhibit significant differences in response between different channels, leading to inconsistent imaging results. Existing methods are time-consuming and have low accuracy, necessitating automated adjustment of channel offsets.
By capturing dark field images of different channels at different offsets, the optimal offset value for each channel is determined, and an automated method is used to adjust the channel offset to ensure consistent response values.
This achieves consistency in response values across all channels, improves image quality, and reduces the time and accuracy issues associated with manual adjustments.
Smart Images

Figure CN119172652B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image acquisition preprocessing, specifically to an automatic offset correction method for the ADC channel of a CIS linear scan camera. Background Technology
[0002] CIS (Contact Image Sensor) is a new type of image sensor. Compared to traditional charge-coupled devices (CCDs), CIS integrates the light source, sensor, and amplifier, resulting in a more compact structure and lower cost. Currently, most domestic research focuses on speed and resolution, with limited attention paid to image preprocessing. Camera offset adjustment is currently within this area.
[0003] When a CIS camera captures a dark-field image without offset correction for the ADC channels, significant differences in the responses of different channels can occur, severely impacting image quality. Currently, CIS cameras use algorithms to correct gain and offset at various points in the image during post-processing. Typically, a non-uniformity correction method, namely flat-field correction, is employed to ensure that the response values of each channel are roughly the same when capturing a uniform image. While this method is effective, if the channels are not pre-processed, resulting in excessive offset, the actual grayscale of the image will be distorted, leading to a significant discrepancy between the actual image and the object. Traditional offset adjustment methods primarily involve manually adjusting the offset of each ADC channel. This method is time-consuming and labor-intensive, requiring offset adjustments to each channel in the registers for each modification, and also necessitating the identification of image positions and channel correspondences. Therefore, an automated method is needed to adjust the camera's offset values, ensuring that the response values of different channels are essentially consistent in dark-field conditions. Summary of the Invention
[0004] This invention addresses existing problems and shortcomings by providing a method for automatically adjusting the ADC channel offset in a CIS line scan camera. It obtains the offset value most suitable for the target response range by capturing dark-field images of different channels under different offsets, thus setting the optimal offset value for each channel. Different ADC channels have different response curves, and even different channels of the same ADC have different response curves. This results in different outputs for different channels under the same input, leading to significant differences in the images captured. To ensure similar responses, a common method is to apply an offset to the ADC channel output, i.e., add or subtract a value. To meet usage requirements, the offset is usually adjusted under the same ambient light conditions. However, simultaneous offset adjustments can cause partial overexposure or underexposure, affecting image quality. The best approach is to adjust the channel offset individually based on the response of each channel. However, manual adjustment is time-consuming and inaccurate. This invention solves this problem.
[0005] To better achieve the desired effect of this invention, an automatic offset correction method for the ADC channels of a CIS linear scan camera is proposed to determine the actual offset value of each channel. This method includes:
[0006] Step 1: Determine the camera's ADC and number of channels, and obtain the channel number information;
[0007] Step 2: Adjust the channel offset value. The corresponding actual image will change in the corresponding area. Determine the mapping relationship between the channel and the actual area of the image.
[0008] Step 3: Based on the configuration of each ADC, iterate through its different offset values and find the minimum response value of each channel corresponding to all offset values;
[0009] Step 4: Select different channels. Based on the minimum response value of each channel corresponding to all the offset values obtained above, determine whether the response value is within the input target adjustment range. Take the offset value corresponding to the smallest response value that is within the target adjustment range as the target offset value of the current channel.
[0010] Step 5: Set the corresponding offset value calculated above for different channels to complete the automatic offset setting.
[0011] Furthermore, the specific method for step 2 is as follows:
[0012] Step 2.1: Select the first channel;
[0013] Step 2.2: Increase the offset value of the current channel, setting it to the maximum allowable value;
[0014] Step 2.3: Acquire an image consisting of all channels after adjusting the offset values;
[0015] Step 2.4: Binarize the image according to the input binarization threshold; the image region corresponding to the channel with the higher 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 obtain 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 for step 3 is as follows:
[0019] Step 3.1: Initialize the offset of all channels to the minimum value of the adjustable range;
[0020] Step 3.2: Acquire an image composed of all adjusted channels;
[0021] Step 3.3: Find the minimum response value among all channels at 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 smallest response value is found among all channels corresponding to all offset values;
[0023] Furthermore, the specific method for step 4 is as follows:
[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 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 steps 4.2 to 4.3 until all adjustable offset values are traversed. The resulting offset value is the target offset value for 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 finally obtain the target offset values for all channels.
[0028] Compared with current methods, the present invention has the following advantages:
[0029] The implementation of this invention can achieve the optimal offset setting that meets the target range, so that the response of each ADC channel is basically at the same value, thereby solving the problem of excessive difference in response of each channel of CIS line scan camera, and also solving the problem of time-consuming and low-precision manual adjustment. Attached Figure Description
[0030] Figure 1 This is a flowchart of the method of the present invention.
[0031] Figure 2 This is a schematic diagram illustrating the process of searching for the image region locations corresponding to different channels during step 5 of the present invention.
[0032] Figure 3 This invention's automatic offset correction process is illustrated in the diagram showing the offset correction being performed on each channel. Detailed Implementation
[0033] This invention provides an automatic offset correction method for the ADC channel of a CIS linear array camera, so that those skilled in the art can understand and implement this invention. The invention is further described below, and the steps are as follows:
[0034] Step 1: Switch the camera's image capture mode to uncalibrated state.
[0035] Step 2: Turn off the camera light source, use a uniform white calibration board as the subject, and use only ambient light as the light source.
[0036] Step 3: Select the ADC model used by the current camera. Available models include 82v48, AK8478, and AK8446.
[0037] Step 4: Determine the starting ADC number and the number of ADCs for the camera to be corrected, as well as the positions of the starting and ending channels.
[0038] Step 5: Change the offset of different channels to the maximum value, acquire the image under the current conditions, find the highlighted area, and obtain the image area position corresponding to different channels.
[0039] Step 6: Based on the above data, modify the channel offset value, find the minimum pixel value under each channel, and if the pixel value is very close to the expected response value, modify the current channel offset value to the offset value corresponding to the above pixel value. This realizes the automatic offset correction of the ADC channel of the CIS line scan camera of the present invention.
[0040] like Figure 2 The diagram illustrates step 5 of the invention, where the image region locations corresponding to different channels are being located. Figure 3The diagram illustrates the automatic offset correction process of this invention, showing the offset correction being performed on each channel. This invention allows for individual differences between different channels, and by employing the method of this 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 in a CIS linear scan camera, characterized in that, The method includes: Step 1: Determine the camera's ADC and number of channels, and obtain the channel number information; Step 2: Adjust the channel offset value. The corresponding actual image will change in the corresponding area. Determine the mapping relationship between the channel and the actual area of the image. Step 2.1: Select the first channel; Step 2.2: Increase the offset value of the current channel, setting it to the maximum allowable value; Step 2.3: Acquire an image consisting of all channels after adjusting the offset values; Step 2.4: Binarize the image according to the input binarization threshold; the image region corresponding to the channel with the higher 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 obtain the mapping; Step 2.6: Change the channel and repeat steps 2.1 to 2.5 until all channels have been traversed; Step 3: Based on the configuration of each ADC, iterate through its different offset values and find the minimum response value of each channel corresponding to all offset values; Step 3.1: Initialize the offset of all channels to the minimum value of the adjustable range; Step 3.2: Acquire an image composed of all adjusted channels; Step 3.3: Find the minimum response value among all channels at the current offset; 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 smallest response value is found among all channels corresponding to all offset values; Step 4: Select different channels. Based on the minimum response value of each channel corresponding to all the offset values obtained above, determine whether the response value is within the input target adjustment range. Take the offset value corresponding to the smallest response value that is within the target adjustment range as the target offset value of the current channel. 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 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 steps 4.2 to 4.3 until all adjustable offset values are traversed. The resulting offset value is the target offset value for 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 finally obtain the target offset values for all channels; Step 5: Set the corresponding offset value calculated above for different channels to complete the automatic offset setting.
Citation Information
Patent Citations
Image scanning system and method based on CIS and storage medium
CN110022420A
Multichannel CIS image calibration method
CN112135009A