A scanning imaging light source control system, method, and equipment based on the exposure timing of a rolling shutter.
By using a light source control system based on the exposure timing of the rolling shutter, the state of the aiming light and the supplementary light is dynamically adjusted, solving the problems of aiming light spot interference and continuous illumination of the supplementary light, thus achieving energy saving, heat reduction, and improved battery life of the equipment.
Patent Information
- Application Number
- CN202611404502.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2026-06-15
- Filing Date
- 2026-09-10
- Publication Date
- 2026-11-17
AI Technical Summary
In existing roller shutter-type image sensor devices, the aiming light spot interferes with image acquisition, and the supplementary light is on for a long time, resulting in high heat generation and high power consumption, which affects battery life.
The light source control system based on the shutter exposure timing uses frame synchronization signals to control the switching on and off of the aiming light and the fill light. The aiming light is dynamically turned on and off, and the brightness of the fill light is adjusted according to the physical position of the pixel row, so that different areas are divided to provide different levels of fill light brightness.
It effectively eliminates the interference of aiming light spot on the image, shortens the time of ineffective illumination, reduces heat generation and power consumption, and improves battery life.
Smart Images

Figure CN123123748A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of optoelectronic control and scanning imaging technology. Specifically, it relates to a scanning imaging light source control system based on the exposure timing of a rolling shutter, a scanning imaging light source control method, and a terminal device including the scanning imaging light source control system. Background Technology
[0002] In devices with barcode scanning capabilities (such as handheld POS machines, logistics PDAs, and various barcode scanners), to meet the needs of different operating scenarios, they are typically equipped with both a targeting light module and a supplementary light module. During actual use, the targeting light module projects a positioning light spot onto the target barcode location to assist the user in fine-tuning the device's focus. The supplementary light module provides necessary field-of-view illumination when ambient light conditions are insufficient.
[0003] However, existing terminal device operating mechanisms have significant control flaws. On one hand, when the image sensor is exposing pixels, if the aiming light spot remains on, the bright aiming light spot pattern will overlap with the target barcode image and be captured by the image sensor, directly disrupting the continuity of grayscale and contrast within the image area, thus leading to a high probability of failure in the backend barcode recognition and decoding algorithms. On the other hand, due to cost and integration considerations, most devices in the industry use rolling shutter image sensors. Unlike the mechanism of a global exposure sensor where all pixels start and end exposure simultaneously, the pixels in a rolling shutter image sensor start exposure row by row, with the exposure start point of each row accumulating delays sequentially. Therefore, the time for the entire pixel array to complete a single frame exposure is significantly lengthened. For example, with a standard 10ms exposure parameter setting, the overall time window from the first row to the last row may be extended to more than 20ms.
[0004] To address the hardware characteristics of lacking a global synchronization signal and having a long exposure time, the industry currently employs a simple and crude strategy of "long illumination mode" to meet lighting conditions. This involves turning on the supplementary light before the system issues the image capture command and keeping it constantly on at maximum brightness until the barcode recognition is completely successful. The supplementary light remains on for between 100ms and 3000ms during the entire scanning process. While this strategy avoids synchronization complexity, it generates a massive amount of ineffective illumination, severely wasting energy and causing significant Joule heating in the internal circuitry, resulting in a significant decrease in the battery life of mobile terminals and affecting long-term continuous operation.
[0005] Therefore, how to provide a novel control timing strategy that can completely eliminate the physical interference of the aiming light spot on the acquired image, significantly shorten and reduce the ineffective illumination of the supplementary light, reduce the heat generation of the terminal device, and extend the battery life under the architecture of the rolling shutter image sensor is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] In view of this, the present invention aims to provide a scanning imaging light source control system, control method and terminal device based on the exposure timing of a rolling shutter, so as to solve the technical problems of interference of the aiming lamp spot with image acquisition and high heat generation and high power consumption caused by the continuous illumination of the supplementary light in the existing rolling shutter exposure scanning equipment.
[0007] According to a first aspect of the present invention, a scanning imaging light source control system based on a rolling shutter exposure timing sequence is provided, comprising: An image sensor having a pixel array configured to perform line-by-line exposure operation; An exposure control module is used to control the image sensor to perform the line-by-line exposure operation and to send a frame synchronization signal when the image sensor completes the exposure of the first pixel line. A targeting light module is used to form a targeting light spot within the imaging field of view of the image sensor to indicate the imaging position; A supplementary lighting module is used to provide supplementary lighting for the target area within the imaging field of view; The light source control module is connected to the exposure control module, the aiming light module, and the fill light module, respectively; The light source control module is configured as follows: Receive the frame synchronization signal and obtain the current exposure parameters of the image sensor; Using the frame synchronization signal as a time reference, the physical position of the currently exposed pixel row is calculated based on the current exposure parameters; The aiming light module is switched on and off so that when the currently exposed pixel row is in an area affected by the aiming light spot, the aiming light module is in a closed state, and when the currently exposed pixel row is in an area not affected by the aiming light spot, the aiming light module is in a closed state. Based on the preset fill light area where the physical position of the currently exposed pixel row is located, the fill light module outputs a corresponding brightness control signal to control the fill light module to output different levels of fill light brightness.
[0008] Alternatively, the aiming light module and the supplementary light module may be two independent light-emitting modules; or the aiming light module and the supplementary light module may be implemented by different light-emitting units in the same light-emitting component; or the aiming light module and the supplementary light module may be integrated into a composite light source module that can simultaneously form an aiming pattern and provide imaging supplementary light.
[0009] Optionally, the aiming light spot divides the pixel array into an upper region unaffected by the light spot, a middle region affected by the light spot, and a lower region unaffected by the light spot based on its own physical position. When the light source control module controls the on / off state of the aiming light module: when the currently exposed pixel row is in the upper layer unaffected by light spots or the lower layer unaffected by light spots, the aiming light module is controlled to be in the on state; when the currently exposed pixel row is in the middle layer affected by light spots, the aiming light module is controlled to be in the off state.
[0010] Optionally, the starting pixel row of the lower layer unaffected by the light spot is numbered 1 and the ending pixel row is numbered N1, the starting pixel row of the upper layer unaffected by the light spot is numbered N2, and the middle layer affected by the light spot includes the N1+1 pixel row to the N2-1 pixel row. The light source control module controls the aiming light module based on a safe activation time window parameter, which is determined in the following way: Determine a first duration A, which is the cumulative line shutter duration of the electronic shutter initialization performed sequentially from the 2nd pixel row to the N2nd pixel row; Determine a first duration C, which is the cumulative line shutter duration of the electronic shutter initialization performed sequentially from the first pixel row to the N1th pixel row; A first duration E is determined, which is the sum of the single-line shutter duration and the exposure duration. The single-line shutter duration is the fixed duration required for the image sensor to initialize each pixel row, and the exposure duration is the duration corresponding to the current exposure parameters. Determine the first duration D, which is the difference between the first duration E and the first duration A after subtracting the preset one-frame period duration; Determine a first duration B, which is equal to the sum of the first duration D and the first duration C; The time corresponding to the first duration A after the frame synchronization signal is triggered is taken as the start time, and the time corresponding to the first duration B after the start time is taken as the end time.
[0011] Optionally, the preset fill light area divides the pixel array from bottom to top into a first weaker region, a first normal region, a key region, a second normal region, and a second weaker region. When the light source control module outputs a corresponding brightness control signal to the fill light module: when the currently exposed pixel row is located in the key area, the fill light module is controlled to output a first brightness; when the currently exposed pixel row is located in the first normal area or the second normal area, the fill light module is controlled to output a second brightness; when the currently exposed pixel row is located in the first weak area or the second weak area, the fill light module is controlled to output a third brightness; wherein, the first brightness is greater than the second brightness, and the second brightness is greater than the third brightness.
[0012] Optionally, the system further includes a host processor for writing the current exposure parameters to the image sensor; The light source control module is configured to passively listen to the bus data between the host processor and the image sensor through a built-in communication port in order to intercept and update the current exposure parameters, thereby avoiding active communication interaction with the host processor.
[0013] Alternatively, the current exposure parameters are stored as combined byte data by two consecutive target registers in the image sensor; The light source control module has a built-in dual-register continuous write event recognition logic, which is configured to perform multi-condition verification on the communication write transactions intercepted by passive monitoring in sequence, including device address, read / write direction, data length, register address, and stop condition. The light source control module confirms the validity of the current exposure parameters and performs an internal update only if both target registers are written in a continuous and uninterrupted valid communication write transaction; wherein, the multi-condition verification mechanism supports writing the two target registers in any order and includes read transaction exclusion, error flag exclusion, non-target register exclusion, and duplicate start exclusion rules.
[0014] Optionally, the light source control module controls the driver chip in the fill light module by outputting a pulse width modulation signal, thereby adjusting the output brightness of the fill light module; The light source control module obtains the light emission start-up delay from when the driver chip receives the turn-on signal to when the fill light module actually lights up; and when calculating the output time node of the brightness control signal, it uses the light emission start-up delay as a time compensation parameter for advance compensation, so that the brightness change time of the fill light module is aligned with the actual exposure time of the pixel row.
[0015] Optionally, the light source control module calculates multiple control duration parameters for brightness switching based on the current exposure parameters, single-line shutter speed, and line width of each preset fill light area: Determine the second duration A, which is the sum of the duration of one frame cycle at the current frame rate and the single-line shutter duration; Determine the second duration B, which is the product of the row number of the pixel row before the end of the key area and the single-row shutter duration; Determine the second duration C, which is the product of the number of pixel rows in the second normal region and the single-row shutter duration; Determine the second duration D, which is the product of the number of pixel rows in the second weaker region and the single-row shutter duration; Determine a second duration F, which is the product of the number of pixel rows in the first weaker region and the single-row shutter duration; Determine the second duration G, which is the product of the number of pixel rows in the first normal region and the single-row shutter duration; Determine the second duration E, which is equal to the second duration A minus the single-line shutter duration, the exposure duration corresponding to the current exposure parameters, the second duration B, the second duration C, and the second duration D.
[0016] Optionally, with the trigger time of the frame synchronization signal as the zero time reference, the time points at which the light source control module controls the brightness switching of the fill light module include: At time T1, the output brightness of the fill light module is switched to the second brightness, and T1 is equal to the second duration B; At time T2, the output brightness of the supplementary light module is switched to the third brightness, and T2 is equal to the sum of the second duration B and the second duration C; At time T3, the supplementary lighting module is controlled to be in the off state; when the second duration E is greater than zero, T3 is equal to the sum of the second duration B, the second duration C and the second duration D; when the second duration E is less than or equal to zero, the control action at time T3 is canceled. At time T4, the output brightness of the fill light module is switched to the third brightness; when the second duration E is greater than zero, T4 is equal to the sum of T3 and the second duration E; when the second duration E is less than or equal to zero, the control action at time T4 is canceled. At time T5, the output brightness of the fill light module is switched to the second brightness. T5 is equal to the sum of the second duration B, the second duration C, the second duration D, the second duration E, and the second duration F. At time T6, the output brightness of the fill light module is switched to the first brightness, and T6 is equal to the sum of T5 and the second duration G.
[0017] 11. The scanning imaging light source control system based on the shutter exposure timing according to claim 10, characterized in that, when the exposure duration corresponding to the current exposure parameter increases such that the calculated value of the second duration E is less than or equal to zero, the absolute value of the second duration E represents the overlap duration of two adjacent frame regions. When the exposure duration corresponding to the current exposure parameter continues to increase, causing the calculated values at time T3 and time T5 to overlap, the light source control module determines that the current exposure parameter has reached the maximum exposure duration parameter allowed by the system. The calculated value of the maximum exposure duration parameter is: the second duration A plus the second duration F, minus the single-line shutter duration, the second duration B, the second duration C and the second duration D.
[0018] Optionally, the system further includes an image processing module connected to the image sensor to receive the acquired raw images; The image processing module has a built-in preset supplementary lighting physical model, which is configured to make the binarization threshold used by pixels in each preset supplementary lighting area positively correlated with the theoretical supplementary lighting intensity distribution of the corresponding area when performing a binarization processing algorithm on the original image.
[0019] Optionally, the threshold mapping relationship used by the image processing module when performing the binarization algorithm is as follows: The baseline threshold within the key area is set as T_key, the threshold at the boundary between the first normal area and the second normal area and the adjacent weaker area is set as T_normal_min, and the threshold at the end edge of the first weaker area and the second weaker area is set as T_weak_min. In the key region, the binarization threshold for each pixel row remains at the value of T_key; In the first normal region and the second normal region, the binarization threshold of each pixel row decreases linearly from T_key to T_normal_min as the pixel row number approaches the upper and lower edges of the image; In the first and second weaker regions, the binarization threshold of each pixel row decreases linearly from T_normal_min to T_weak_min as the pixel row number approaches the upper and lower edges of the image.
[0020] Optionally, for a pixel array with M pixel rows, the first weaker region includes pixel rows 1 to 150, the first normal region includes pixel rows 151 to 300, the critical region includes pixel rows 301 to 724, the second normal region includes pixel rows 725 to 874, and the second weaker region includes pixel rows 875 to M; where M equals 1024. For any pixel row with row number "row", the corresponding binarization threshold T(row) is calculated using the following formula: When row is in [301, 724], T(row) = T_key; When row is in [151, 300], T(row) = T_key - (T_key - T_normal_min) × (300 - row) / 150; When row is in [725, 874], T(row) = T_key - (T_key - T_normal_min) × (row - 724) / 150; When row is in [1, 150], T(row) = T_normal_min - (T_normal_min - T_weak_min) × (150 - row) / 150; When row is in [875, 1024], T(row) = T_normal_min - (T_normal_min - T_weak_min) × (row - 874) / 150.
[0021] According to a second aspect of the present invention, a scanning imaging light source control method based on a rolling shutter exposure timing is provided, applicable to any of the above-mentioned scanning imaging light source control systems based on a rolling shutter exposure timing, the method comprising the following steps: Receive the frame synchronization signal sent by the exposure control module when the image sensor completes the exposure of the first pixel row; Obtain the current exposure parameters of the image sensor; Using the frame synchronization signal as a time reference, the physical position of the currently exposed pixel row is calculated based on the current exposure parameters; The aiming light module is switched on and off so that it is turned off when the currently exposed pixel row is in an area affected by the aiming light spot, and turned on when the currently exposed pixel row is in an area not affected by the aiming light spot. Based on the preset fill light area where the physical position of the currently exposed pixel row is located, a corresponding brightness control signal is output to the fill light module to control the fill light module to output different levels of fill light brightness.
[0022] Optionally, the step of obtaining the current exposure parameters of the image sensor specifically includes: The peripheral interface is used to passively monitor the communication bus through which the host processor writes register data to the image sensor. Run the dual-register continuous write event identification logic to perform multi-condition verification on the intercepted bus write transactions, including device address, read / write direction, data length, register address, and stop condition; Once it is confirmed that both preset target registers have been successfully written in consecutive, non-interference write transactions, the updated current exposure parameters are extracted.
[0023] Optionally, the step of outputting a corresponding brightness control signal to the fill light module based on the preset fill light area where the physical position of the currently exposed pixel row is located specifically includes: The pixel array of the image sensor is divided from bottom to top into a first weak region, a first normal region, a key region, a second normal region, and a second weak region. During the calculation and determination of the exposure period in the key area, a first pulse width modulation signal is output to enable the fill light module to provide maximum illumination brightness; During the calculation and determination of the exposure period in the first normal region or the second normal region, a second pulse width modulation signal is output to enable the fill light module to provide medium illumination brightness. During the calculation to determine whether to enter the first weaker region or the second weaker region for exposure, a third pulse width modulation signal is output to enable the fill light module to provide weaker illumination or turn off the fill light.
[0024] Optionally, the method further includes: when determining the timing node for outputting the brightness control signal based on the control duration parameter, adding the pre-determined hardware start-up delay parameter of the fill light module drive circuit to the calculation formula, so that the actual change in light intensity time is aligned with the true integral exposure time of the target pixel row.
[0025] Optionally, the method further includes the following image post-processing steps: Obtain the original image containing the target barcode; To address the physical characteristic of decreased brightness at the edge of the preset supplementary lighting area, the preset supplementary lighting physical model is directly integrated into the binarization algorithm; A dynamic binarization threshold that linearly decreases as the pixel row number approaches the image edge is used to binarize image pixels in non-key areas, thereby improving the overall image feature extraction accuracy.
[0026] According to a third aspect of the present invention, a terminal device is provided, including a host processor and any of the above-mentioned scanning imaging light source control systems based on the shutter exposure timing, wherein the terminal device is a movable terminal device that supports alignment scanning function.
[0027] The beneficial effects of this invention are as follows: This invention fully utilizes the temporal underlying characteristics of the sequential exposure of the roller shutter exposure sensor, establishing a control framework that uses the first-line frame synchronization signal of the exposure control module as the time measurement benchmark to deduce the specific pixel row position currently being sensed. Based on this physical position information, the system implements a safe time window for blanking avoidance of the aiming light module, ensuring that the aiming light is temporarily turned off during the integral exposure of the central pixel row affected by light spots, while remaining on in the unaffected upper and lower areas. This eliminates the superposition of light spots in the acquired image without affecting continuous eye alignment. On the other hand, the system adopts a multi-level brightness adjustment strategy for the supplementary light module, dynamically outputting based on regional attributes. It provides full illumination in the core key areas of the barcode scanning, while providing tiered weakening illumination in the non-key areas at the upper and lower edges, and directly turns off the supplementary light during exposure intervals. This mechanism breaks the inefficient control of conventional constant illumination, precisely compresses the time period and amplitude of ineffective illumination, significantly reduces ineffective heat generation and power consumption, and greatly improves the battery life and system reliability of mobile terminals.
[0028] Other features and advantages of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0029] The present invention can be better understood by referring to the following description taken in conjunction with the accompanying drawings, in which the same or similar reference numerals are used throughout the drawings to denote the same or similar parts.
[0030] Figure 1 A system composition block diagram of the scanning imaging light source control system according to an embodiment of the present invention is shown.
[0031] Figure 2 The diagram illustrates the pixel array region division and the interference relationship of the aiming light spot according to an embodiment of the present invention.
[0032] Figure 3 The flowchart of the working logic state machine of the light source control module passively listening to communication bus data according to an embodiment of the present invention is shown.
[0033] Figure 4The diagram illustrates the multi-level brightness switching sequence and time control node diagram of the supplementary light according to an embodiment of the present invention.
[0034] Figure 5 The diagram shows the mapping curve between the binarization processing threshold and the pixel row number set according to the supplementary lighting physical model of this invention. Detailed Implementation
[0035] To enable those skilled in the art to more fully understand the technical solutions of the present invention, exemplary embodiments of the present invention will be described more comprehensively and in detail below with reference to the accompanying drawings. Obviously, the one or more embodiments of the present invention described below are merely one or more specific ways to implement the technical solutions of the present invention, and are not exhaustive. It should be understood that other ways belonging to a general inventive concept can be used to implement the technical solutions of the present invention, and should not be limited to the embodiments described exemplary. Based on one or more embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0036] Example: In the existing barcode scanning architecture, in view of the pain point that the aiming light of the roller shutter image sensor cannot be turned off by simply reversing the level, and the power consumption problem caused by the forced long-term operation of the supplementary light, the embodiment of the present invention provides a new solution that takes into account both aiming spot blanking and energy-saving zone supplementary lighting.
[0037] See Figure 1 The present invention first provides a scanning imaging light source control system based on the exposure timing of a rolling shutter. The scanning imaging light source control system includes an image sensor, an exposure control module, a light source control module, a host processor, and an aiming lamp module and a fill light module that are independent or integrated with each other.
[0038] The image sensor has a pixel array of a preset size (e.g., 1024×1024), configured by the underlying physical hardware to perform line-by-line exposure operations in pixel-row order, either bottom-up or top-down. The exposure control module not only controls this line-by-line integration exposure behavior but is also configured to actively send a frame synchronization signal the instant the first pixel row (e.g., row 1) is exposed. This frame synchronization signal serves as the origin reference for controlling the timing in this system.
[0039] In order to take over control, a separate light source control module (which can be implemented by a microprocessor such as an MCU) is set up in this embodiment of the invention. On the one hand, the light source control module receives the above-mentioned frame synchronization signal through a specific pin and obtains the current exposure parameters; on the other hand, based on the precise calculation of the internal timer, it sends independent drive control commands to the aiming lamp module and the fill light module respectively.
[0040] It should be noted that, for the light-emitting device, the embodiments of the present invention not only support designing the aiming light module and the supplementary light module as two separate independent light-emitting modules, but also support configuring them as different light-emitting units within the same light-emitting component; in addition, when it is possible to simultaneously form an indication positioning aiming pattern and take into account the overall field of view supplementary lighting, the two can also be realized by an integrally formed composite light source module.
[0041] Regarding the control of the aiming light, embodiments of the present invention utilize a pre-calculated mechanism to establish safe activation time window parameters in order to implement spot blanking.
[0042] See Figure 2 The middle part of the array, taking the commonly used crosshair aiming light spot as an example, has a fixed geometric projection position within the imaging field of view. Based on this geometric position, the entire pixel array is divided into three major regions: the lower layer unaffected by the light spot (let's say it covers the 1st to N1st pixel rows, such as row 150), the middle layer affected by the light spot (let's say it covers the N1+1st to N2-1st pixel rows, such as rows 151 to 874), and the upper layer unaffected by the light spot (let's say it covers the N2nd to the last pixel row, such as rows 875 to 1024).
[0043] For the aiming light module, the overall logic of the light source control module is as follows: when the currently exposed pixel row is in the aforementioned upper or lower unaffected area, the aiming light module is turned on; when it is in the middle affected area, the aiming light module is forcibly turned off, thus ensuring that the center of the captured frame is free of light spot contamination. The corresponding safe opening time window parameter is established as follows (assuming a fixed initial shutter speed of 8µs): Determine the first duration A: the cumulative line shutter duration from the 2nd pixel row to the N2nd pixel row (row 875). That is, (875-2+1)×8=6992µs.
[0044] Determine the first duration C: the cumulative line shutter duration from the 1st pixel row to the N1th pixel row (row 150). That is, (150-1+1)×8=1200µs.
[0045] Determine the first duration E: the sum of the single-line shutter speed and the exposure time. If the current exposure parameter is 5000µs, then the duration is 5008µs.
[0046] Determine the first duration D: the frame period duration minus the durations E and A mentioned above. If operating at 50 frames / second, i.e., the period is 20000µs, then 20000-5008-6992=8000µs.
[0047] The first duration B is determined to be equal to the sum of the first duration D and the first duration C, i.e., 8000 + 1200 = 9200µs.
[0048] When the system triggers an interrupt in the frame synchronization signal, the light source control module starts an internal timer to delay for a first duration A, and then turns on the aiming lamp module via a conductive pin; after this, it maintains a time window of a first duration B, and then turns off the aiming lamp module upon expiration. This mechanism seamlessly spans the photosensitive phase from line 151 to line 874.
[0049] Regarding the control of supplementary lighting, this embodiment of the invention abandons the long lighting mode and constructs a multi-level brightness control system with five zones.
[0050] Because when users scan with handheld devices, the target barcode is generally located in the center of the field of view indicated by the aiming light. (See also...) Figure 2 The left-hand label indicates that, in this embodiment of the invention, the pixel array is subdivided into five preset fill light areas from bottom to top: The first weaker region (including rows 1 to 150); First normal region (including rows 151 to 300); Key area (including rows 301 to 724); The second normal region (containing rows 725 to 874); The second weaker region (containing rows 875 to 1024).
[0051] In order for the fill light module to provide corresponding illumination for each area, the light source control module needs to obtain the current exposure parameters of the image sensor, thereby deriving the temporal boundaries of each area.
[0052] In conventional designs, the host processor needs to continuously distribute exposure parameters to the control terminal via communication, which severely consumes bus resources. (See also...) Figure 3 As shown, the light source control module of this embodiment of the invention has built-in communication ports such as I2C, and executes a pure passive mechanism, that is, extracting information by listening to the control messages sent from the host processor to the image sensor.
[0053] Since the exposure parameters configured by the image sensor consist of 16-bit bytes of data composed of two consecutive address registers (e.g., addresses 0x04 and 0x05), the light source control module intercepts this data using its built-in state machine recognition logic. This state machine recognition logic does not require synchronous response from the host computer and can autonomously perform multi-condition checks, including device address matching, read / write direction, data length, target register location, and stop condition constraints. To eliminate interference, the mechanism also includes rules for read transaction exclusion, error flag exclusion, non-target register exclusion, and duplicate start exclusion. Furthermore, this mechanism is compatible with different manufacturers' drive sequences and supports writing to the two target registers in any order. The light source control module extracts and refreshes the current exposure parameters in its internal cache only when both target registers are successfully configured in a single, uninterrupted, valid write transaction.
[0054] Once the current exposure parameters are obtained, the reference node for brightness control of the fill light module can be calculated. A set of auxiliary "second duration" variables needs to be predefined (again, using a single-line shutter speed of 8µs as an example): Second duration A: The sum of the duration of one frame cycle and the duration of a single shutter speed at the current frame rate (20ms + 0.008ms = 20.008ms at 50 frames per second).
[0055] Second duration B: The row number (724-1) of the pixel row before the end of the key area is multiplied by the single-row shutter duration, which is 5.784ms.
[0056] Second duration C: The number of pixel rows in the second normal area (150) multiplied by the single-row shutter duration, is 1.2ms.
[0057] Second duration D: The number of pixel rows in the second weaker region (150) multiplied by the single-row shutter duration, is 1.2ms.
[0058] Second duration F: The number of pixel rows in the first weaker region (150) multiplied by the single-row shutter duration, is 1.2ms.
[0059] Second duration G: The number of pixel rows in the first normal area (150) multiplied by the single-line shutter duration, is 1.2ms.
[0060] Second duration E: Second duration A minus single-line shutter speed, exposure duration corresponding to the current exposure parameters, second duration B, second duration C, and second duration D. The result is 11.816ms - current exposure duration.
[0061] Based on this, refer to Figure 4 The time nodes for the pulse width modulation (PWM) signal output by the light source control module are as follows (with the frame synchronization signal as the zero reference, the output of the fill light includes the first brightness, the second brightness, the third brightness, etc., corresponding to the maximum duty cycle brightness, normal medium brightness, and weak brightness, respectively): At time T1: The supplementary lighting module is switched to the second brightness (normal brightness). T1 = second duration B = 5.784ms.
[0062] At time T2: The supplementary lighting module is switched to the third brightness level (weaker brightness). T2 = second duration B + second duration C = 6.984ms.
[0063] At time T3: The system enters the blank area outside the array edge, and the fill light module is turned off. T3 = Second duration B + Second duration C + Second duration D = 8.184 ms. Note that the shutdown is only performed when the calculated value of the second duration E is greater than zero; if the second duration E is less than or equal to zero, it indicates that adjacent exposure frame intervals overlap, and the shutdown action is canceled.
[0064] At time T4: The supplementary lighting module is turned on again and outputs a third brightness level (weaker brightness). T4 = T3 + second duration E. Similarly, if the second duration E is less than or equal to zero, the action at time T4 is canceled.
[0065] At time T5: The fill light module is switched to the second brightness (normal brightness). T5 = second duration B + second duration C + second duration D + second duration E + second duration F = 9.384ms + second duration E.
[0066] Time T6: Enter the core area of the key zone and switch the supplementary lighting module to the first brightness (maximum brightness). T6 = T5 + second duration G = 10.584ms + second duration E.
[0067] In addition, since there is an inherent delay in the time from the driver chip receiving the turn-on signal to the LED component outputting the rated illumination, the embodiment of the present invention reads in advance the light-emitting start-up delay of the driver chip (for example, measured as 4ms) when setting the above-mentioned PWM duty cycle output signal, and calculates and removes this delay as a time compensation parameter at the bottom layer of the controller, so as to ensure that the brightness switching edge is strictly aligned with the actual scanning edge of the pixel row.
[0068] As external light dims, the host processor significantly increases the exposure parameters. Based on the above calculation formula, Table 1 lists the fluctuation of the second duration E and the mapping of key moments T5 and T6 as the exposure time gradually increases: Table 1. Demonstration Table of Dynamic Boundary Nodes As shown in Table 1, when the exposure time is 11.816ms, the second duration E decays to 0, and the closing time of T3 (8.184ms) is exactly equal to the opening time of T4, causing the light-off action to be canceled. When the exposure time continues to increase to 13.016ms, causing the second duration E to drop to -1.200ms, the execution point of T5 falls back to 8.184ms, which just hits the original calculated value of T3. If the exposure continues to increase, it will directly destroy the hardware's preset partition structure. Therefore, the light source control module determines that the current 13.016ms is the maximum exposure time parameter allowed by the system. The derivation formula for this value is: Second duration A + Second duration F - Single shutter speed duration - Second duration B - Second duration C - Second duration D.
[0069] In addition to achieving the main objectives of avoiding light spots and reducing lighting heat, the embodiments of the present invention also provide other beneficial effects, specifically: In the image post-processing stage, due to the intentional weakening of the fill light at the top and bottom edges, traditional fixed-threshold binarization image algorithms are prone to losing image details and misclassifying them as black backgrounds. In this embodiment of the invention, the host processor embeds a pre-defined fill light physical model into the binarization algorithm during image binarization, establishing a spatial mapping of dynamic thresholds. That is, based on the physical attenuation of fill light in each region, a binarization threshold that is positively correlated with the fill light intensity is used for compensation.
[0070] See Figure 5 The threshold curve is set according to the following rules: the baseline threshold for the key area is set as T_key, the threshold at the boundary between the normal area and the weaker area is set as T_normal_min, and the threshold at the end edge of the weaker area is set as T_weak_min.
[0071] When the pixel row is in the key region range of [301, 724], T(row) is constant as T_key.
[0072] When the pixel row is in the first normal region [151, 300], T(row) = T_key - (T_key - T_normal_min) × (300 - row) / 150, and decreases linearly.
[0073] When the pixel row is in the second normal region [725, 874], T(row) = T_key - (T_key - T_normal_min) × (row - 724) / 150, which also decreases linearly.
[0074] When the pixel row is in the first weaker region [1, 150], T(row) = T_normal_min - (T_normal_min - T_weak_min) × (150 - row) / 150.
[0075] When the pixel row is in the second weaker region [875, 1024], T(row) = T_normal_min - (T_normal_min - T_weak_min) × (row - 874) / 150.
[0076] This model-driven algorithm, by having prior knowledge of the attenuation slope of illumination intensity, can accurately separate the foreground and background features of the target barcode without expending computational power to perform local illuminance histogram deduction. This significantly reduces computational complexity, greatly expands the decoding depth of field, and improves the decoding success rate.
[0077] Based on the same design concept, this invention also discloses a scanning imaging light source control method based on the exposure timing of a rolling shutter. The method's steps are summarized as follows: a unified time base is established by receiving a frame synchronization signal; hardware exposure parameters are updated in real time using a purely passive eavesdropping state machine; then, the mapping position of the photosensitive integral row on the pixel plane is calculated and deduced. Subsequently, when the area is determined to be in the central core region affected by the aiming light spot, physical blanking and light blocking are implemented, and multi-segment frequency conversion PWM floodlight control is simultaneously implemented to ensure that full-load brightness is provided only in the key identification area, while other segments are reduced and put into sleep mode according to the timing steps; finally, the algorithm layer is implemented as a fallback through dynamic threshold binarization processing by the host computer. The specific logical steps of this method are the same as the detailed description of the device's function above.
[0078] Finally, this embodiment of the invention also provides a terminal device, specifically comprising the aforementioned scanning imaging light source control system and combined with a corresponding processing motherboard and photosensitive lens kit. With the system configuration of this embodiment, such mobile portable devices can maintain excellent hardware performance with low heat generation and long battery life even in continuous high-frequency scanning pipeline operation scenarios.
[0079] While one or more embodiments of the present invention have been described above, those skilled in the art will recognize that the present invention can be implemented in any other form without departing from its spirit and scope. Therefore, the embodiments described above are illustrative and not restrictive, and many modifications and substitutions will be apparent to those skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.
Claims
1. A scanning imaging light source control system based on roller shutter exposure timing, characterized in that, include: An image sensor having a pixel array configured to perform line-by-line exposure operation; An exposure control module is used to control the image sensor to perform the line-by-line exposure operation and to send a frame synchronization signal when the image sensor completes the exposure of the first pixel line. A targeting light module is used to form a targeting light spot within the imaging field of view of the image sensor to indicate the imaging position; A supplementary lighting module is used to provide supplementary lighting for the target area within the imaging field of view; The light source control module is connected to the exposure control module, the aiming light module, and the fill light module, respectively; The light source control module is configured as follows: Receive the frame synchronization signal and obtain the current exposure parameters of the image sensor; Using the frame synchronization signal as a time reference, the physical position of the currently exposed pixel row is calculated based on the current exposure parameters; The aiming light module is switched on and off so that when the currently exposed pixel row is in an area affected by the aiming light spot, the aiming light module is in a closed state, and when the currently exposed pixel row is in an area not affected by the aiming light spot, the aiming light module is in a closed state. Based on the preset fill light area where the physical position of the currently exposed pixel row is located, the fill light module outputs a corresponding brightness control signal to control the fill light module to output different levels of fill light brightness.
2. The scanning imaging light source control system based on the shutter exposure timing according to claim 1, characterized in that, The aiming light module and the fill light module are two independent light-emitting modules; or, the aiming light module and the fill light module are implemented by different light-emitting units in the same light-emitting component; or, the aiming light module and the fill light module are integrated into a composite light source module that can simultaneously form an aiming pattern and provide imaging fill light.
3. The scanning imaging light source control system based on the rolling shutter exposure timing according to claim 1, characterized in that, The aiming light spot divides the pixel array into an upper region unaffected by the light spot, a middle region affected by the light spot, and a lower region unaffected by the light spot based on its own physical position. When the light source control module controls the on / off state of the aiming light module: when the currently exposed pixel row is in the upper layer unaffected by light spots or the lower layer unaffected by light spots, the aiming light module is controlled to be in the on state; when the currently exposed pixel row is in the middle layer affected by light spots, the aiming light module is controlled to be in the off state.
4. The scanning imaging light source control system based on the rolling shutter exposure timing according to claim 3, characterized in that, The starting pixel row of the lower layer unaffected by the light spot is numbered 1 and the ending pixel row is numbered N1. The starting pixel row of the upper layer unaffected by the light spot is numbered N2. The middle layer affected by the light spot includes the N1+1 pixel row to the N2-1 pixel row. The light source control module controls the aiming light module based on a safe activation time window parameter, which is determined in the following way: Determine a first duration A, which is the cumulative line shutter duration of the electronic shutter initialization performed sequentially from the 2nd pixel row to the N2nd pixel row; Determine a first duration C, which is the cumulative line shutter duration of the electronic shutter initialization performed sequentially from the first pixel row to the N1th pixel row; A first duration E is determined, which is the sum of the single-line shutter duration and the exposure duration. The single-line shutter duration is the fixed duration required for the image sensor to initialize each pixel row, and the exposure duration is the duration corresponding to the current exposure parameters. Determine the first duration D, which is the difference between the first duration E and the first duration A after subtracting the preset one-frame period duration; Determine a first duration B, which is equal to the sum of the first duration D and the first duration C; The time corresponding to the first duration A after the frame synchronization signal is triggered is taken as the start time, and the time corresponding to the first duration B after the start time is taken as the end time.
5. The scanning imaging light source control system based on the rolling shutter exposure timing according to claim 1, characterized in that, The preset fill light area divides the pixel array from bottom to top into a first weaker region, a first normal region, a key region, a second normal region, and a second weaker region. When the light source control module outputs a corresponding brightness control signal to the fill light module, it controls the fill light module to output a first brightness when the currently exposed pixel row is located in the key area. When the currently exposed pixel row is located in the first normal region or the second normal region, the fill light module is controlled to output a second brightness; when the currently exposed pixel row is located in the first weak region or the second weak region, the fill light module is controlled to output a third brightness; wherein, the first brightness is greater than the second brightness, and the second brightness is greater than the third brightness.
6. The scanning imaging light source control system based on the rolling shutter exposure timing according to claim 5, characterized in that, The system also includes a host processor, which is used to write the current exposure parameters to the image sensor; The light source control module is configured to passively listen to the bus data between the host processor and the image sensor through a built-in communication port in order to intercept and update the current exposure parameters, thereby avoiding active communication interaction with the host processor.
7. The scanning imaging light source control system based on the rolling shutter exposure timing according to claim 6, characterized in that, The current exposure parameters are stored as combined byte data by two consecutive target registers in the image sensor; The light source control module has a built-in dual-register continuous write event recognition logic, which is configured to perform multi-condition verification on the communication write transactions intercepted by passive monitoring in sequence, including device address, read / write direction, data length, register address, and stop condition. The light source control module confirms the validity of the current exposure parameters and performs an internal update only if both target registers are written in a continuous and uninterrupted valid communication write transaction; wherein, the multi-condition verification mechanism supports writing the two target registers in any order and includes read transaction exclusion, error flag exclusion, non-target register exclusion, and duplicate start exclusion rules.
8. The scanning imaging light source control system based on the rolling shutter exposure timing according to claim 5, characterized in that, The light source control module controls the driver chip in the fill light module by outputting a pulse width modulation signal, thereby adjusting the output brightness of the fill light module; The light source control module obtains the light-emitting start-up delay from when the driver chip receives the start signal to when the fill light module actually lights up. Furthermore, when calculating the output time node of the brightness control signal, the light emission start-up delay is used as a time compensation parameter for advance compensation, so that the brightness change time of the fill light module is aligned with the actual exposure time of the pixel row.
9. The scanning imaging light source control system based on the rolling shutter exposure timing according to claim 5, characterized in that, The light source control module calculates multiple control duration parameters for brightness switching based on the current exposure parameters, single-line shutter speed, and line width of each preset fill light area: Determine the second duration A, which is the sum of the duration of one frame cycle at the current frame rate and the single-line shutter duration; Determine the second duration B, which is the product of the row number of the pixel row before the end of the key area and the single-row shutter duration; Determine the second duration C, which is the product of the number of pixel rows in the second normal region and the single-row shutter duration; Determine the second duration D, which is the product of the number of pixel rows in the second weaker region and the single-row shutter duration; Determine a second duration F, which is the product of the number of pixel rows in the first weaker region and the single-row shutter duration; Determine the second duration G, which is the product of the number of pixel rows in the first normal region and the single-row shutter duration; Determine the second duration E, which is equal to the second duration A minus the single-line shutter duration, the exposure duration corresponding to the current exposure parameters, the second duration B, the second duration C, and the second duration D.
10. The scanning imaging light source control system based on the shutter exposure timing according to claim 9, characterized in that, Taking the trigger time of the frame synchronization signal as the zero time reference, the time nodes for the light source control module to control the brightness switching of the fill light module include: At time T1, the output brightness of the fill light module is switched to the second brightness, and T1 is equal to the second duration B; At time T2, the output brightness of the supplementary light module is switched to the third brightness, and T2 is equal to the sum of the second duration B and the second duration C; At time T3, the supplementary lighting module is controlled to be in the off state; when the second duration E is greater than zero, T3 is equal to the sum of the second duration B, the second duration C and the second duration D; when the second duration E is less than or equal to zero, the control action at time T3 is canceled. At time T4, the output brightness of the fill light module is switched to the third brightness; when the second duration E is greater than zero, T4 is equal to the sum of T3 and the second duration E; when the second duration E is less than or equal to zero, the control action at time T4 is canceled. At time T5, the output brightness of the fill light module is switched to the second brightness. T5 is equal to the sum of the second duration B, the second duration C, the second duration D, the second duration E, and the second duration F. At time T6, the output brightness of the fill light module is switched to the first brightness, and T6 is equal to the sum of T5 and the second duration G.
11. The scanning imaging light source control system based on the rolling shutter exposure timing according to claim 10, characterized in that, When the exposure duration corresponding to the current exposure parameter increases such that the calculated value of the second duration E is less than or equal to zero, the absolute value of the second duration E represents the overlap duration of two adjacent frame regions. When the exposure duration corresponding to the current exposure parameter continues to increase, causing the calculated values at time T3 and time T5 to overlap, the light source control module determines that the current exposure parameter has reached the maximum exposure duration parameter allowed by the system. The calculated value of the maximum exposure duration parameter is: the second duration A plus the second duration F, minus the single-line shutter duration, the second duration B, the second duration C and the second duration D.
12. The scanning imaging light source control system based on the rolling shutter exposure timing according to claim 5, characterized in that, The system also includes an image processing module, which is connected to the image sensor to receive the acquired raw images; The image processing module has a built-in preset supplementary lighting physical model, which is configured to make the binarization threshold used by pixels in each preset supplementary lighting area positively correlated with the theoretical supplementary lighting intensity distribution of the corresponding area when performing a binarization processing algorithm on the original image.
13. The scanning imaging light source control system based on the rolling shutter exposure timing according to claim 12, characterized in that, The threshold mapping relationship used by the image processing module when executing the binarization algorithm is as follows: The baseline threshold within the key area is set as T_key, the threshold at the boundary between the first normal area and the second normal area and the adjacent weaker area is set as T_normal_min, and the threshold at the end edge of the first weaker area and the second weaker area is set as T_weak_min. In the key region, the binarization threshold for each pixel row remains at the value of T_key; In the first normal region and the second normal region, the binarization threshold of each pixel row decreases linearly from T_key to T_normal_min as the pixel row number approaches the upper and lower edges of the image; In the first and second weaker regions, the binarization threshold of each pixel row decreases linearly from T_normal_min to T_weak_min as the pixel row number approaches the upper and lower edges of the image.
14. The scanning imaging light source control system based on the rolling shutter exposure timing according to claim 13, characterized in that, For a pixel array with M pixel rows, the first weaker region includes pixel rows 1 to 150, the first normal region includes pixel rows 151 to 300, the critical region includes pixel rows 301 to 724, the second normal region includes pixel rows 725 to 874, and the second weaker region includes pixel rows 875 to M; where M equals 1024. For any pixel row with row number "row", the corresponding binarization threshold T(row) is calculated using the following formula: When row is in [301, 724], T(row) = T_key; When row is in [151, 300], T(row) = T_key - (T_key - T_normal_min) × (300 - row) / 150; When row is in [725, 874], T(row) = T_key - (T_key - T_normal_min) × (row - 724) / 150; When row is in [1, 150], T(row) = T_normal_min - (T_normal_min - T_weak_min) × (150 - row) / 150; When row is in [875, 1024], T(row) = T_normal_min - (T_normal_min - T_weak_min) × (row - 874) / 150.
15. A scanning imaging light source control method based on roller shutter exposure timing, characterized in that, The method, applied to the scanning imaging light source control system based on the shutter exposure timing as described in any one of claims 1-14, comprises the following steps: Receive the frame synchronization signal sent by the exposure control module when the image sensor completes the exposure of the first pixel row; Obtain the current exposure parameters of the image sensor; Using the frame synchronization signal as a time reference, the physical position of the currently exposed pixel row is calculated based on the current exposure parameters; The aiming light module is switched on and off so that it is turned off when the currently exposed pixel row is in an area affected by the aiming light spot, and turned on when the currently exposed pixel row is in an area not affected by the aiming light spot. Based on the preset fill light area where the physical position of the currently exposed pixel row is located, a corresponding brightness control signal is output to the fill light module to control the fill light module to output different levels of fill light brightness.
16. The scanning imaging light source control method based on the shutter exposure timing according to claim 15, characterized in that, The step of obtaining the current exposure parameters of the image sensor specifically includes: The peripheral interface is used to passively monitor the communication bus through which the host processor writes register data to the image sensor. Run the dual-register continuous write event identification logic to perform multi-condition verification on the intercepted bus write transactions, including device address, read / write direction, data length, register address, and stop condition; Once it is confirmed that both preset target registers have been successfully written in consecutive, non-interference write transactions, the updated current exposure parameters are extracted.
17. The scanning imaging light source control method based on the shutter exposure timing according to claim 15, characterized in that, The step of outputting a corresponding brightness control signal to the fill light module based on the preset fill light area where the physical position of the currently exposed pixel row is located specifically includes: The pixel array of the image sensor is divided from bottom to top into a first weak region, a first normal region, a key region, a second normal region, and a second weak region. During the calculation and determination of the exposure period in the key area, a first pulse width modulation signal is output to enable the fill light module to provide maximum illumination brightness; During the calculation and determination of the exposure period in the first normal region or the second normal region, a second pulse width modulation signal is output to enable the fill light module to provide medium illumination brightness. During the calculation to determine whether to enter the first weaker region or the second weaker region for exposure, a third pulse width modulation signal is output to enable the fill light module to provide weaker illumination or turn off the fill light.
18. The scanning imaging light source control method based on the shutter exposure timing according to claim 17, characterized in that, The method further includes: when determining the timing node for outputting the brightness control signal based on the control duration parameter, adding the pre-determined hardware start-up delay parameter of the fill light module drive circuit to the calculation formula, so that the actual change in light intensity time is aligned with the true integral exposure time of the target pixel row.
19. The scanning imaging light source control method based on the shutter exposure timing according to claim 15, characterized in that, The method also includes the following image post-processing steps: Obtain the original image containing the target barcode; To address the physical characteristic of decreased brightness at the edge of the preset supplementary lighting area, the preset supplementary lighting physical model is directly integrated into the binarization algorithm; A dynamic binarization threshold that linearly decreases as the pixel row number approaches the image edge is used to binarize image pixels in non-key areas, thereby improving the overall image feature extraction accuracy.
20. A terminal device, characterized in that, The device includes a host processor and a scanning imaging light source control system based on the shutter exposure timing as described in any one of claims 1-14, wherein the terminal device is a mobile terminal device that supports alignment scanning function.
