A self-triggering overexposure prevention system for CIS linear array cameras in external trigger working mode
By introducing a self-trigger acquisition mode and arbitration mechanism in the external trigger working mode of the CIS linear array camera, the grayscale unevenness and overexposure problems caused by changes in the external trigger frequency are solved, high-quality image acquisition is achieved, and resource consumption is reduced.
Patent Information
- Application Number
- CN202411431238.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-10-14
AI Technical Summary
In the external trigger operating mode, the image grayscale is uneven due to changes in the external trigger frequency, and the motion system is suspended, which causes overexposure, affecting the image quality.
The self-triggered acquisition mode and the self-triggered arbitration mechanism under external trigger are introduced. Through the arbitrator, arbitration is conducted based on the frequency and phase relationship of the external trigger signal and self-trigger signal to ensure that the image acquisition time interval remains unchanged and avoid overexposure.
It effectively solves the problem of uneven grayscale and overexposure caused by changes in external trigger frequency, improves image quality, and reduces resource consumption, without affecting the scanning line frequency and exposure limit of CIS line array camera.
Smart Images

Figure CN119172647B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image acquisition and processing, and in particular to a self-triggering overexposure prevention system in an external triggering working mode of a CIS linear array camera. Background Art
[0002] CIS (Contact Image Sensor) has gradually become the optimal sensor choice for large-format linear scan cameras. CIS linear scan cameras are widely used in various application scenarios of machine vision, such as fabric defect detection, PCB defect detection, etc. In the actual detection process, the CIS linear scan camera needs to cooperate with the motion system to complete the target image acquisition. A major difficulty in completing this task is whether the motion control system and the linear scan camera acquisition system can cooperate perfectly. In order to achieve the linkage between the acquisition system and the motion control system, the solution of the CIS linear scan camera is to use an external trigger method, that is, the motion system is equipped with an encoder, and the CIS linear scan camera completes the motion situation judgment and performs image acquisition by receiving the encoder signal. In the external trigger working mode, due to the integral characteristics of CIS, external trigger signals of different frequencies determine different exposure times, which will cause uneven grayscale of the acquired image. In addition, if the motion system temporarily stops during the acquisition process (the external trigger signal disappears), the charge accumulated by the CIS photosensitive unit reaches the maximum threshold due to the long integration time, and the first line of the image after the next movement starts is overexposed, that is, the image grayscale is much greater than the normal value.
[0003] Inventors Liu Lin, Ni Guangming, Huang Bingquan, Tang Xuesong, Song Yuncen, Liu Juanxiu, Yang Xianming, Chen Zhenlong, Luo Ying., a patented method and system for controlling exposure time of a linear array camera. CN103458158A, 2013-12-18, proposed a method for controlling exposure time of a linear array camera including an FPGA and a contact image sensor to solve the problem of uneven image grayscale values caused by changes in the frequency of an external trigger signal. However, this method cannot solve the overexposure phenomenon caused by acquisition after the motion system stops. In the literature Luo Ying, Tan Peiyan, Liu Lin, et al. Improving the exposure performance of a contact sensor linear array camera using a secondary trigger method [J]. Optical Precision Engineering, 2014, 22(02): 245-251, a double exposure method is proposed to solve the possible overexposure problem. However, the problem of uneven grayscale under different external trigger frequencies is not solved. In addition, the implementation of the double exposure method will cause the working line frequency of the CIS camera to be halved and the upper limit of the exposure time is reduced. Summary of the invention
[0004] The present invention is based on the prior art and makes up for its shortcomings, and provides a self-triggering overexposure prevention method in the external triggering working mode of a CIS linear array camera. By introducing a self-triggering acquisition mode and a self-triggering arbitration mechanism under external triggering, two problems that cannot be solved simultaneously by the prior art are solved:
[0005] 1. The problem of uneven image grayscale value caused by changes in external trigger frequency.
[0006] 2. Overexposure problem caused by interruption of external trigger signal during continuous acquisition in external trigger mode.
[0007] The first problem seriously affects the quality of images collected by the CIS line array camera in the external trigger working mode, and the second problem causes overexposure stripes to appear in the collected images, resulting in the loss of original image information and the fragmentation of the complete collected images. The purpose of the present invention is to solve these two problems.
[0008] The technical solution of the present invention is: a self-triggering overexposure prevention system in an external trigger working mode of a CIS linear array camera, the system comprising: an external trigger processing module, a data acquisition module, a data cache processing module, a high-speed data interface, a self-triggering module, and an arbitrator, wherein the external trigger processing module receives an external trigger signal, filters the external trigger signal, performs phase judgment, and then transmits the filtered signal to the arbitrator; the self-triggering module generates a self-triggering signal of a fixed frequency to the data acquisition module, after the self-triggering signal is responded to by the data acquisition module, the data acquisition module outputs a control signal to the CIS and ADC, controls the CIS and ADC, and the data acquisition module receives the collected image data; the data acquisition module outputs a write trigger signal to the arbitrator and the data cache processing module, and when the data cache processing module receives the write trigger signal, it caches a line of image data transmitted by the data acquisition module; the arbitrator performs arbitration according to the frequency and phase relationship between the filtered external trigger signal and the write trigger signal, and outputs a read trigger signal to the data cache processing module according to the arbitration result, and when the data cache processing module receives the read trigger signal, it reads a line of data to the high-speed data interface, and then transmits it to the host computer.
[0009] Furthermore, the specific arbitration method of the arbitrator is:
[0010] Step 1: Determine whether an external trigger signal is detected, if not, continue waiting, if yes, proceed to step 2;
[0011] Step 2: Determine whether a write trigger signal is detected, if yes, generate a read trigger signal and return to step 1; if no, go to step 3;
[0012] Step 3: Determine whether an external trigger signal is detected, if yes, go to step 4, if no, return to step 2;
[0013] Step 4: Determine whether a write trigger signal is detected, if yes, generate a read trigger signal and return to step 2, if no, go to step 5;
[0014] Step 5: Determine whether an external trigger signal is detected, if not, return to step 4, if yes, proceed to step 6;
[0015] Step 6: Determine whether a write trigger signal is detected. If not, stay in this step and continue to determine. If yes, generate a read trigger signal and return to step 1.
[0016] Furthermore, when no external trigger signal is detected, the self-trigger module reduces the frequency of the self-trigger signal to a set frequency.
[0017] Furthermore, the read data of the read trigger signal is the data written by the write trigger signal closest to the trigger of the external trigger signal.
[0018] Furthermore, the set frequency meets two requirements: one is to ensure that the data read out when the next external trigger signal arrives is not overexposed, and the other is to ensure that the frequency is lower than the operating frequency during external trigger acquisition to achieve low power consumption requirements.
[0019] Furthermore, the minimum interval GAP allowed between the read trigger signal on the time axis and the latest write trigger signal in the negative direction of the time axis under the condition of reading a complete line of data is min for:
[0020]
[0021] Among them, wrclk represents the cycle of a write data clock, in seconds. rdclk represents the cycle of a read data clock, in seconds. depth represents the depth of a row of images. For example, a row of images in this acquisition has 1000 pixels, that is, the depth of this acquisition is 1000. So the unit of GAP is wrclk, that is, the cycle of the write data clock. For example, GAP min =100 means that the minimum interval is 100 read data cycles. Alternatively, the GAP value can be replaced with seconds, for example GAP min =100wrclk, if wrclk = 10ns, then GAP min =1000ns.
[0022] The implementation of the present invention can solve the overexposure problem in the external trigger working mode of the current CIS line array camera and the grayscale unevenness problem caused by the change of the external trigger frequency. Compared with other methods for solving the overexposure problem, the present invention consumes less resources and does not affect the scanning line frequency and exposure limit of the CIS line array camera itself. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is the system block diagram of the self-triggering overexposure prevention method in the external trigger working mode.
[0024] Figure 2 This is the arbitration flow chart of the arbitrator.
[0025] Figure 3 This is a scanned image obtained using the self-trigger mode.
[0026] Figure 4 This is a scanned image obtained without using the self-trigger mode. DETAILED DESCRIPTION
[0027] The general system framework of the method involved in the present invention is as follows Figure 1 As shown. The external trigger processing module is responsible for glitch filtering, phase judgment and frequency division of the external trigger signal entering the FPGA. The data acquisition module is responsible for completing the data acquisition control of the CIS and ADC and receiving the image data. The data cache processing module completes the caching and processing of the data. The module has a built-in cache unit BRAM. wr_trigger is the write trigger signal of the cache module, and rd_trigger is the corresponding read trigger signal. When rd_trigger is responded, a line of data will be sent to the high-speed data interface after processing and transmitted to the host computer. When wr_trigger is responded, a line of image data will be cached. The self-trigger module will generate a self-trigger signal (auto_trigger) with a constant fixed frequency. After this trigger signal is responded, the data acquisition module will control the CIS and ADC to complete the acquisition of a line of data. The arbitrator module will arbitrate according to the frequency and phase relationship between the trigger signal processed by the external trigger processing module and the wr_trigger signal, and output the rd_trigger signal according to the arbitration relationship to complete the transfer of data from the data cache processing module to the high-speed data interface.
[0028] The technical solution of the invention is to ensure that the acquisition time interval of the optical image remains unchanged, and the acquisition cycle, exposure time, and exposure interval remain unchanged through a self-triggered acquisition mode, and the grayscale of the image data obtained on this basis has the smallest unevenness. And because the self-trigger module is completely independent of other control modules, it ensures that the CIS is always in a working state, avoiding the phenomenon of overexposure of the CIS due to long-term integration. When no external trigger signal is detected, the self-trigger module will reduce the frequency of the self-trigger signal (auto_trigger) to a lower specific frequency. This specific frequency will meet two requirements: one is to ensure that the data read out when the next external trigger signal arrives is not overexposed, and the other is to ensure that the frequency is lower than the working frequency during external trigger acquisition to meet the low power consumption requirements. In addition, in order to coordinate the external trigger working mode and the self-trigger mode, an arbitrator is introduced to complete the read trigger control of the data cache processing module.
[0029] The self-trigger signal completes the control of the data acquisition module, while the external trigger signal completes the triggering of the data transmission instruction. Since the external trigger signal and the self-trigger signal are completely asynchronous, there will be the following three situations for the arbitration between the two:
[0030] 1The frequency of the self-trigger signal is greater than the frequency of the external trigger signal.
[0031] 2 The frequency of the self-trigger signal is less than the frequency of the external trigger signal.
[0032] 3 The frequency of the self-trigger signal is equal to the frequency of the external trigger signal.
[0033] For the above three situations, a common arbitration logic is used to handle each situation;
[0034] The arbitration logic for the arbitrator is as follows Figure 2 As shown. The core idea of arbitration is to reasonably respond to each request made by the external trigger. Each trigger of the processed external trigger signal can be regarded as a request for the system to collect data. The response to this request is not to respond as long as the request is made as in the previous method, but to arbitrate according to the situation of the write trigger signal. After the arbitration is successful, a read trigger signal is issued to allow the collected data to be transmitted. If the arbitration fails, no response is given. It is worth noting that the read data of the read trigger signal defaults to the data written by the most recent write trigger after the external trigger signal is triggered. There is a minimum threshold for the judgment of this "most recent". If it is lower than this threshold, the data read is the data written by the write trigger that is the second closest to the external trigger signal. The size of this threshold can be obtained from the following interval inequality. The interval (GAP) refers to the interval allowed between the read trigger on the time axis and the most recent write trigger in the negative direction of its time axis when the read data is a complete row. This interval inequality is:
[0035]
[0036] From the definition of GAP, we know that GAP is greater than or equal to 0. Therefore, the minimum threshold, that is, the minimum value of GAP, is defined by the following formula:
[0037]
[0038] The embodiment of the present invention provides a method for self-triggering overexposure prevention in an external triggering working mode of a CIS linear array camera, so that ordinary technicians in the field can understand and implement the present invention. The present invention is further described below. The steps are as follows:
[0039] (1) Control the digital system through software control or other control methods to make it work in external trigger mode.
[0040] (2) When the digital system is working, it generates a self-trigger signal to complete the signal drive required in the data acquisition process and write the collected pixel data into the data storage and processing module.
[0041] (3) The encoder connected to the motor of the motion device generates an external trigger signal that enters the digital system as the motion device moves.
[0042] (4) The digital system processes the external trigger signal generated by the encoder and enters the arbitrator together with the self-trigger signal to complete arbitration. The arbitrator arbitrates the frequency and phase of the two signals according to the arbitration mechanism. If the requirements are met, the arbitrator enables the read trigger signal to transmit a line of data. If the requirements are not met, the arbitration continues.
[0043] (5) The data transmitted after the read trigger signal response is selected according to the judgment principle, thereby completing the transmission of a row of data. This realizes a cycle of self-triggering overexposure prevention in the external trigger mode of the CIS linear array camera of the present invention.
[0044] pass Figure 3 and Figure 4 It can be seen that the scanned image obtained using the self-trigger mode avoids overexposure very well. Figure 4 The white lines in the image are due to overexposure, which results in a higher grayscale of the collected pixels.
Claims
1. A self-triggering overexposure prevention system in an external triggering working mode of a CIS linear array camera, the system comprising: An external trigger processing module, a data acquisition module, a data cache processing module, a high-speed data interface, a self-trigger module, and an arbitrator. The external trigger processing module receives an external trigger signal, filters the external trigger signal, determines the phase, and then transmits the filtered signal to the arbitrator; the self-trigger module generates a self-trigger signal with a fixed frequency to the data acquisition module. After the self-trigger signal is responded to by the data acquisition module, the data acquisition module outputs a control signal to the CIS and ADC to control the CIS and ADC, and the data acquisition module receives the collected image data; the data acquisition module outputs a write trigger signal to the arbitrator and the data cache processing module. When the data cache processing module receives the write trigger signal, it caches a line of image data transmitted by the data acquisition module; the arbitrator arbitrates according to the frequency and phase relationship between the filtered external trigger signal and the write trigger signal, and outputs a read trigger signal to the data cache processing module according to the arbitration result. When the data cache processing module receives the read trigger signal, it reads a line of data to the high-speed data interface and then transmits it to the host computer.
2. A self-triggering overexposure prevention system in an external triggering working mode of a CIS linear array camera as claimed in claim 1, characterized in that: The specific arbitration method of the arbitrator is: Step 1: Determine whether an external trigger signal is detected, if not, continue waiting, if yes, proceed to step 2; Step 2: Determine whether a write trigger signal is detected, if yes, generate a read trigger signal and return to step 1; if no, go to step 3; Step 3: Determine whether an external trigger signal is detected, if yes, go to step 4, if no, return to step 2; Step 4: Determine whether a write trigger signal is detected, if yes, generate a read trigger signal and return to step 2, if no, go to step 5; Step 5: Determine whether an external trigger signal is detected, if not, return to step 4, if yes, proceed to step 6; Step 6: Determine whether a write trigger signal is detected. If not, stay in this step and continue to determine. If yes, generate a read trigger signal and return to step 1.
3. A self-triggering overexposure prevention system in an external triggering working mode of a CIS linear array camera as claimed in claim 1, characterized in that: When no external trigger signal is detected, the self-trigger module reduces the frequency of the self-trigger signal to a set frequency.
4. A self-triggering overexposure prevention system in an external triggering working mode of a CIS linear array camera as claimed in claim 1, characterized in that: The read data of the read trigger signal is the data written by the write trigger signal closest to the external trigger signal.
5. A self-triggering overexposure prevention system in an external triggering working mode of a CIS linear array camera as claimed in claim 3, characterized in that: The set frequency meets two requirements: one is to ensure that the data read out when the next external trigger signal arrives is not overexposed, and the other is to ensure that the frequency is lower than the working frequency during external trigger acquisition to achieve the requirement of low power consumption.
6. A self-triggering overexposure prevention system in an external triggering working mode of a CIS linear array camera as claimed in claim 4, characterized in that: The minimum gap GAP allowed between the read trigger signal on the time axis and the latest write trigger signal in the negative direction of the time axis when a complete row of data is read. min for: Among them, wrclk represents a cycle of a write data clock, rdclk represents a cycle of a read data clock, and depth represents the depth of a line of image.
Citation Information
Patent Citations
Method and system for controlling time of exposure of line-scan digital camera
CN103458158A
Extensible pulse power supply time sequence generator with high-precision external trigger control
CN118444748A