Light sensing chip gain control method and device and computer equipment
By combining the successive approximation method and the linear prediction method for optical sensor chip gain control, the contradiction between response speed and adjustment accuracy and hardware cost in the existing technology is resolved. This achieves fast convergence and high-precision gain adjustment, while reducing chip area and cost.
Patent Information
- Application Number
- CN202511862770.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-02-03
AI Technical Summary
Existing AGC solutions for optical sensors struggle to balance response speed, adjustment accuracy, and hardware area efficiency. This is especially true in area-sensitive applications, where there is a pressing need for fast convergence, high-precision adjustment, and low-cost adjustment methods.
By combining successive approximation and linear prediction methods, the gain control method is selected based on the operating conditions of the photosensitive chip. Through parameter sharing and logic reuse, redundant circuits are reduced, achieving rapid convergence and high-precision adjustment.
It improves the convergence time of the light sensor chip in scenarios with rapidly changing lighting, reduces chip area and hardware cost, and enhances noise immunity.
Smart Images

Figure CN121454291A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of integrated circuit technology, and in particular to a method, apparatus and computer device for gain control of a photosensitive chip. Background Technology
[0002] The core function of a photosensitive chip is to convert optical signals into electrical signals (i.e., ADC sampling values) and adjust the gain with the help of automatic gain control (AGC) to keep the output signal stable within the optimal dynamic range and avoid oversaturation or undersaturation.
[0003] Among related technologies, AGC solutions face significant challenges in performance and efficiency: First, while the successive approximation method (bisection method) adjusts the gain through a binary search approach and possesses stability, its convergence efficiency is low, often requiring multiple frames for verification to lock the gain, making it difficult to handle scenarios with rapidly changing lighting. Simultaneously, this solution relies on independent counters, state machines, and multi-level comparison logic, leading to high hardware costs and increased chip area. Second, the linear prediction method, based on the assumption of a "linear relationship between gain and sampled values," directly calculates the target gain using low-gain sampled values. While it offers a fast response, it is susceptible to nonlinear distortion (such as saturation effects), resulting in insufficient prediction accuracy. Furthermore, single-frame sampling has weak noise immunity, and introducing multi-frame averaging further increases latency.
[0004] Therefore, existing AGC solutions struggle to balance response speed, adjustment accuracy, and hardware area efficiency, especially in area-sensitive photosensitive chip applications. There is an urgent need for an adjustment method that can achieve fast convergence, high-precision adjustment, and low cost. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, and computer device for controlling the gain of a photosensitive chip that can achieve rapid convergence, high-precision adjustment, and low cost, in order to address the above-mentioned technical problems.
[0006] In a first aspect, this application provides a method for controlling the gain of a photosensitive chip, the method comprising:
[0007] Gain conditions for receiving optical sensors;
[0008] The optical signal from the photosensitive chip is converted from analog to digital, and a digital value corresponding to the optical signal is output.
[0009] Based on the operating conditions of the photosensitive chip, the gain control method of the photosensitive chip is determined, and the gain control method includes the successive approximation method and the linear prediction method.
[0010] The gain of the digital quantity is adjusted based on the determined gain control method and the gain conditions.
[0011] In one embodiment, before determining the gain control method for the photosensitive chip based on its operating conditions, the process includes:
[0012] Determine whether the digital quantity exceeds the normal threshold range;
[0013] If the digital quantity does not fall within the normal threshold range, proceed with the next steps.
[0014] In one embodiment, before determining the gain control method for the photosensitive chip based on its operating conditions, the process includes:
[0015] Determine whether the digital quantity exceeds the normal threshold range;
[0016] If the digital value does not exceed the normal threshold range, proceed with the next steps.
[0017] In one embodiment, determining whether the digital quantity exceeds a normal threshold range includes:
[0018] If the digital value exceeds the normal threshold range, a reset logic is triggered.
[0019] In one embodiment, the method for determining the gain control of the photosensitive chip based on its operating conditions includes:
[0020] Determine the rate of change of illumination of the photosensitive chip;
[0021] Based on the rate of change of illumination, the successive approximation method or the linear prediction method is determined to be the gain control method for the photosensitive chip.
[0022] In one embodiment, the method for determining the gain control of the photosensitive chip based on its operating conditions includes:
[0023] Both the successive approximation method and the linear prediction method are used as gain control methods for the photosensitive chip.
[0024] Adjusting the gain of the digital quantity based on the determined gain control method and the gain condition includes:
[0025] The successive approximation method is used as the gain control method for the photosensitive chip to obtain a first gain candidate value;
[0026] The linear prediction method is used as the gain control method for the photosensitive chip to obtain a second gain candidate value;
[0027] The gain of the digital quantity is adjusted based on the first gain candidate value and the second gain candidate value.
[0028] In one embodiment, adjusting the gain of the digital quantity based on the first gain candidate value and the second gain candidate value includes:
[0029] When the difference between the first gain candidate value and the second gain candidate value is less than a predetermined threshold, the average value of the first gain candidate value and the second gain candidate value is taken as the gain of the digital quantity.
[0030] In one embodiment, adjusting the gain of the digital quantity based on the first gain candidate value and the second gain candidate value includes:
[0031] When the difference between the first gain candidate value and the second gain candidate value is greater than or equal to a predetermined threshold, the first gain candidate value is used as the gain of the digital quantity.
[0032] In one embodiment, the gain conditions of the photosensitive chip include at least one of the following: gain boundary, threshold ratio, and frame count.
[0033] Secondly, this application also provides a photosensitive chip gain control device, the device comprising:
[0034] The parameter configuration module is used to receive the gain conditions of the photosensitive chip;
[0035] The analog-to-digital sampling module is used to perform analog-to-digital conversion on the optical signal of the photosensitive chip and output a digital quantity corresponding to the optical signal.
[0036] The mode decision module is used to determine the gain control method of the photosensitive chip based on the operating conditions of the photosensitive chip. The gain control method includes the successive approximation method and the linear prediction method.
[0037] A gain adjustment module is used to adjust the gain of the digital quantity based on the determined gain control method and the gain conditions.
[0038] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0039] Gain conditions for receiving optical sensors;
[0040] The optical signal from the photosensitive chip is converted from analog to digital, and a digital value corresponding to the optical signal is output.
[0041] Based on the operating conditions of the photosensitive chip, the gain control method of the photosensitive chip is determined, and the gain control method includes the successive approximation method and the linear prediction method.
[0042] The gain of the digital quantity is adjusted based on the determined gain control method and the gain conditions.
[0043] The aforementioned photosensitive chip gain control method, device, computer equipment, computer-readable storage medium, and computer program product, firstly, allow users to configure parameters such as gain conditions, gain boundaries, threshold ratios, and frame counts in the photosensitive chip gain control method to adapt to different photosensitive application scenarios (such as cameras, sensors, and industrial inspection). Secondly, the photosensitive chip gain control method selects between successive approximation and linear prediction methods to perform gain adjustment based on the photosensitive chip's operating conditions (current scenario). Successive approximation has better robustness, while linear prediction has the advantage of linear assumptions. This application integrates the two methods to reduce the impact of nonlinear distortion and noise interference. Furthermore, when using the successive approximation method, its rapid adjustment mechanism can shorten the convergence time under sudden changes in illumination (improving by more than 30% compared to traditional prediction methods). Finally, the successive approximation method and linear prediction method can share parameter configurations and intermediate calculation results (such as low-gain sampling values and historical gain values), reducing redundant calculations. Furthermore, this application can reduce redundant circuits and reduce chip area (by 20%-30% compared to the independent dual-mode solution) by sharing parameters and reusing logic (such as sharing ADC sampling interfaces and anomaly detection units). Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a flowchart illustrating the gain control method for the photosensitive chip in the first embodiment;
[0046] Figure 2 This is a flowchart illustrating the photosensitive chip gain control method in the second embodiment;
[0047] Figure 3 This is a schematic diagram of the photosensitive chip gain control system in one embodiment;
[0048] Figure 4 This is a flowchart illustrating the gain control method for the photosensitive chip in the third embodiment;
[0049] Figure 5 This is a flowchart illustrating the gain control method for the photosensitive chip in the fourth embodiment. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] In one embodiment, a method for controlling the gain of a photosensitive chip is provided. This method can be applied to servers, terminals, or systems where servers and terminals interact.
[0052] Please see Figure 1 The gain control method for the optical sensor chip includes the following steps:
[0053] Step S100: Receive the gain conditions of the optical sensor chip.
[0054] Step S200: Determine whether the digital quantity exceeds the normal threshold range.
[0055] If the digital quantity does not fall within a normal threshold range, proceed to step S300.
[0056] Step S300: Perform analog-to-digital conversion on the optical signal of the photosensitive chip and output the digital quantity corresponding to the optical signal.
[0057] Step S400: Based on the operating conditions of the photosensitive chip, determine the gain control method for the photosensitive chip to be used. The gain control method includes successive approximation method and linear prediction method.
[0058] Step S500: Adjust the gain of the digital quantity based on the determined gain control method and gain conditions.
[0059] In step S100, the gain conditions of the photosensitive chip can be configured by the user.
[0060] As an example, the gain conditions of the photosensitive chip may include gain boundary parameters, threshold ratio parameters, frame count parameters, and prediction-specific parameters. Gain boundary parameters may include initial gain and termination gain. Threshold ratio parameters may include upper limit ratio and lower limit ratio. Frame count parameters may include the number of consecutive normal frames used to determine convergence, the maximum number of non-converged frames used to trigger step size adjustment, the number of frames for anomaly detection, and the number of frames for adjusting step size constraints. Prediction-specific parameters may include the ideal output value and low gain sampling level. This embodiment does not limit the specific gain conditions of the photosensitive chip.
[0061] In step S200, it can be determined whether DATA exceeds the normal range (e.g., oversaturation or an abnormally low value). If the digital value does not exceed the normal threshold range, proceed to step S300. If the digital value exceeds the normal threshold range, trigger reset logic (e.g., reset the gain to the default value).
[0062] In step S300, the optical signal of the photosensitive chip can be converted from analog to digital (ADC), and the output terminal outputs the digital quantity (DATA) of each frame as the original input signal for gain adjustment.
[0063] In step S400, gain adjustment can be performed by selecting the successive approximation method (bisection method) or the linear prediction method according to the working condition of the photosensitive chip (current scene).
[0064] As an example, the operating conditions of a photosensitive chip can include the rate of change of light intensity and signal stability.
[0065] In one possible instance, the gain adjustment of a digital quantity can be achieved by choosing between successive approximation (bisection) and linear prediction. In another possible instance, both successive approximation (bisection) and linear prediction can be used simultaneously to adjust the gain of the digital quantity, yielding two candidate gain values. A choice is then made between these two candidate gain values.
[0066] Specifically, the rate of change of illumination for the photosensor chip can be determined first. Based on this rate of change, either the successive approximation method or the linear prediction method can be chosen as the gain control method for the photosensor chip. Specifically, the successive approximation method is preferred in rapidly changing scenarios, while the linear prediction method is preferred in stable scenarios. If both the successive approximation method and the linear prediction method are used as the gain control method for the photosensor chip, the gain value with higher consistency in the adjustment results should be selected.
[0067] For example, the absolute value of the difference between adjacent frame DATA values can be considered as the rate of change in illumination. In this case, if the rate of change is greater than a threshold (e.g., 10% / frame), the successive approximation method is selected. If the rate of change is less than or equal to the threshold, the linear prediction method is selected.
[0068] In step S500, the digital quantity is adjusted according to the selected gain control method and preset gain conditions to keep it stable within the target dynamic range.
[0069] At this time, please refer to Figure 2 If both the successive approximation method and the linear prediction method are used as gain control methods for the photosensitive chip, then using the successive approximation method as the gain control method for the photosensitive chip can obtain the first gain candidate value G1, and using the linear prediction method as the gain control method for the photosensitive chip can obtain the second gain candidate value G2. Then, the gain of the digital quantity can be adjusted based on the first gain candidate value and the second gain candidate value.
[0070] Specifically, the difference |G1-G2| between the first and second gain candidate values can be calculated. If |G1-G2| < the threshold (e.g., level 1), the average of the first and second gain candidate values is used as the gain of the digital quantity. If |G1-G2| ≥ the threshold, the first gain candidate value is used as the gain of the digital quantity, thereby increasing the robustness of the gain result.
[0071] Specifically, the process of adjusting the gain of a digital quantity using the successive approximation method (bisection method) can be as follows: First, the user can configure the gain boundary (such as the initial gain G_min, the termination gain G_max), the threshold ratio (such as the upper limit ratio P_up, the lower limit ratio P_dw), the system calculates the dynamic threshold range (such as threshold × P_up as the upper limit threshold, threshold × P_dw as the lower limit threshold), and initializes the current gain G_mid.
[0072] Secondly, the digital quantity DATA of the optical signal is obtained by sampling the optical signal through an ADC for each frame. At this point, it can be determined whether the DATA exceeds the normal range (such as saturation or abnormal noise).
[0073] If saturation or noise is abnormal, a reset logic is triggered (e.g., resetting the gain to the default value). If saturation or noise is normal, the gain adjustment process begins.
[0074] Next, compare DATA with the dynamic threshold range (upper threshold and lower threshold): If DATA > upper threshold: reduce the gain and adjust the current gain G_mid to the midpoint of the previous gain (e.g., G_mid = G_prev / 2). If DATA < lower threshold: increase the gain and adjust the current gain G_mid to the midpoint of the previous gain (e.g., G_mid = G_prev × 2). If DATA is within the threshold range: lock the current gain G_mid and end the current adjustment.
[0075] Finally, the frequency is constrained and adjusted using a frame counter (such as MAL / MAU) to avoid single-frame randomness: if N consecutive frames (N configured by MAL) meet the threshold range, the gain is locked. If more than M frames (M configured by MU) fail to meet the threshold, the step size is adjusted (e.g., the calculation range of intermediate values is reduced) to accelerate convergence.
[0076] The process of using linear prediction to adjust the gain of digital quantities can be as follows: First, the user can configure the ideal output value (V_ideal), the low gain level (e.g., G0=0.5x), and the threshold ratio (e.g., P_dw). The system then calculates the dynamic threshold at low gain (V_threshold=G0×P_dw).
[0077] Next, N frames are continuously sampled at low gain G0 (N is configured by MAL), and the sampling mean V_avg is calculated: if V_avg is close to 0 (no valid signal), the gain is locked to the maximum value (G_max). If V_avg is valid, the gain prediction process begins.
[0078] Subsequently, based on the assumption of "linear relationship between gain and sampled value", the target gain G_pred = V_ideal × G0 / V_avg.
[0079] If G_pred is lower than the minimum gain level (e.g., G_min), lock it to G_min. If G_pred is higher than the maximum gain level (e.g., G_max), lock it to G_max. Otherwise, adjust the current gain to the discrete level corresponding to G_pred (e.g., through lookup table mapping).
[0080] It is understood that in this embodiment, the successive approximation method and the linear prediction method can share parameters to achieve functional reuse. Specifically, they can share resources such as ADC sampling data, anomaly detection results, and frame counters to avoid redundant calculations. They can also share low-gain sampling values (prediction method) and dynamic threshold range (binary method) to reduce hardware storage requirements.
[0081] In this embodiment, firstly, the gain conditions, gain boundaries, threshold ratios, frame counts, and other parameters in the photosensitive chip gain control method can be configured by the user to adapt to different photosensitive application scenarios (such as cameras, sensors, and industrial inspection). Secondly, the photosensitive chip gain control method selects between successive approximation and linear prediction methods to perform gain adjustment based on the working conditions of the photosensitive chip (current scenario). Successive approximation has better robustness, while linear prediction has the advantage of linear assumptions. This embodiment combines the two methods to reduce the impact of nonlinear distortion and noise interference. Furthermore, when using the successive approximation method, the convergence time under sudden changes in illumination can be shortened (by more than 30% compared to traditional prediction methods) through the rapid adjustment mechanism of the successive approximation method. Finally, the successive approximation method and linear prediction method in this embodiment can share parameter configurations and intermediate calculation results (such as low-gain sampling values and historical gain values), reducing redundant calculations. Furthermore, this embodiment can reduce redundant circuits and reduce chip area (by 20%-30% compared to independent dual-mode solutions) through parameter sharing and logic reuse (such as sharing ADC sampling interfaces and anomaly detection units).
[0082] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0083] Based on the same inventive concept, in one embodiment, a photosensitive chip gain control device is provided.
[0084] The optical sensor gain control device includes:
[0085] The parameter configuration module is used to receive the gain conditions from the optical sensor chip. Specifically, the parameter configuration module can receive user-input parameters such as gain boundaries (e.g., start gain, end gain), threshold ratios (e.g., upper and lower limit ratios), and frame counts (e.g., number of frames for anomaly detection), and store them as registers or lookup tables.
[0086] The analog-to-digital (ADC) sampling module is used to perform analog-to-digital conversion on the optical signal from the photosensitive chip, outputting a digital value corresponding to the optical signal. Specifically, the ADC module can perform analog-to-digital conversion on the optical signal every frame and output a digital value (DATA).
[0087] The mode decision module determines the gain control method for the photosensor chip based on its operating conditions. Gain control methods include successive approximation and linear prediction. Specifically, the mode decision module can select either successive approximation or linear prediction to perform gain adjustment based on the current scenario (such as the rate of change in illumination and signal stability).
[0088] The gain adjustment module is used to adjust the gain of a digital quantity based on a determined gain control method and gain conditions. Specifically, the gain adjustment module can adjust the gain value (GAIN) according to the selected mode and constrain it within the user-configured gain boundaries.
[0089] In addition, the photosensitive chip gain control device may also include an anomaly detection module and a collaborative optimization module. The anomaly detection module can be used to determine whether the data exceeds the normal range (such as saturation or abnormal noise), triggering reset or protection logic. The collaborative optimization module can be used to share parameter configurations and intermediate calculation results (such as low-gain sample values and historical gain values), reducing redundant calculations.
[0090] For further details, please refer to Figure 3 A terminal equipped with a photosensitive chip gain control device may include system input / output, a shared basic module, and an automatic gain control processing module. The system input / output is intended for user-configured parameters. The shared basic module may include an analog-to-digital sampling module (ADC sampling module), an anomaly detection module, and a parameter storage module. The automatic gain control processing module may include a binary search module (successive approximation module), a prediction module (linear prediction module), and a data processing and judgment module. These modules work together to realize the various functions of the photosensitive chip gain control device.
[0091] The following exemplifies the specific execution flow of the photosensitive chip gain control device. It should be understood that the described photosensitive chip gain control method is merely an explanation of this specification and does not affect the scope of protection of this application.
[0092] First, the user configures the following parameters through registers or software interface: gain boundaries: starting gain G_min (e.g., 1x), ending gain G_max (e.g., 8192x).
[0093] Threshold ratios: upper limit ratio P_up (e.g., 12.5%, 25%...100%), lower limit ratio P_dw (e.g., 0%, 12.5%...87.5%).
[0094] Frame count: Frame count MAL for anomaly detection (e.g., 3 frames), and frame count MAU for adjusting step size constraint (e.g., 5 frames).
[0095] Ideal output value V_ideal (for predictive methods only), low gain setting G0 (e.g., 0.5x).
[0096] Next, the analog-to-digital sampling module starts and begins acquiring data for each frame. The anomaly detection module initializes the threshold range (based on G_min×P_dw and G_max×P_up). The mode decision module initializes scene judgment parameters (such as the illumination change rate threshold).
[0097] Please see Figure 4 If the successive approximation method (binary method) is used as the gain control method, its execution flow is as follows: The analog-to-digital sampling module outputs the current frame DATA, and the anomaly detection module determines whether DATA exceeds the normal range (e.g., > G_max × P_up or < G_min × P_dw). If an anomaly is detected, the reset logic is triggered (e.g., resetting the current gain G_mid to G_min). If normal, the gain adjustment process begins.
[0098] Then, the dynamic threshold range can be calculated: [G_mid×P_dw, G_mid×P_up].
[0099] If DATA > G_mid × P_up: the gain needs to be reduced, and G_mid is adjusted to the median value of the gain in the previous round (e.g., G_mid = G_prev / 2). If DATA < G_mid × P_dw: the gain needs to be increased, and G_mid is adjusted to the median value of the gain in the previous round (e.g., G_mid = G_prev × 2). If DATA is within the threshold range: the current gain G_mid is locked, and the current adjustment round ends.
[0100] Furthermore, a counter can be used to record the number of consecutive frames that meet the threshold range. If the MAL frame is reached, the gain is locked. If the threshold is not met even after exceeding the MAU frame, the adjustment step size is reduced (e.g., the intermediate value calculation range is adjusted from ±50% to ±25%) to accelerate convergence.
[0101] Please see Figure 5 If linear prediction is used as the gain control method, its execution flow is as follows: N frames are continuously sampled at a low gain G0 (e.g., 0.5x) (N is configured by MAL), and the average sampling value V_avg is calculated. If V_avg is close to 0 (no valid signal), the gain is locked to G_max. If V_avg is valid (> noise threshold), the prediction process begins.
[0102] Then, based on the linear assumption, the target gain G_pred = V_ideal × G0 / V_avg. G_pred is constrained to the range [G_min, G_max], and if it exceeds this range, the boundary value is taken. G_pred is mapped to discrete gain levels through a lookup table (e.g., G_pred = 2.3x is mapped to 2x).
[0103] The solution provided by the photosensitive chip gain control device is similar to the solution described in the above method. Therefore, the specific limitations of one or more photosensitive chip gain control device embodiments provided in this application can be found in the limitations of the photosensitive chip gain control method described above, and will not be repeated here.
[0104] Each module in the aforementioned photosensitive chip gain control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0105] In an exemplary embodiment, a computer device is provided, which may be a server. The computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is connected to the system bus via the I / O interfaces. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device stores photosensitive chip gain control data. The I / O interfaces of the computer device are used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a photosensitive chip gain control method.
[0106] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement one or more of the steps provided above.
[0107] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs one or more of the steps provided above.
[0108] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, provides one or more of the steps described above.
[0109] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0110] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0111] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0112] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for controlling the gain of a photosensitive chip, characterized in that, The optical sensor chip gain control method includes: Gain conditions for receiving optical sensors; The optical signal from the photosensitive chip is converted from analog to digital, and a digital value corresponding to the optical signal is output. Based on the operating conditions of the photosensitive chip, the gain control method of the photosensitive chip is determined, and the gain control method includes the successive approximation method and the linear prediction method. The gain of the digital quantity is adjusted based on the determined gain control method and the gain conditions.
2. The photosensitive chip gain control method according to claim 1, characterized in that, Before determining the gain control method for the photosensitive chip based on its operating conditions, the process includes: Determine whether the digital quantity exceeds the normal threshold range; If the digital value does not exceed the normal threshold range, proceed with the next steps.
3. The photosensitive chip gain control method according to claim 2, characterized in that, After determining whether the digital quantity exceeds the normal threshold range, the process includes: If the digital value exceeds the normal threshold range, a reset logic is triggered.
4. The photosensitive chip gain control method according to claim 1, characterized in that, The method for determining the gain control of the photosensitive chip based on its operating conditions includes: Determine the rate of change of illumination of the photosensitive chip; Based on the rate of change of illumination, the successive approximation method or the linear prediction method is determined to be the gain control method for the photosensitive chip.
5. The photosensitive chip gain control method according to claim 1, characterized in that, The method for determining the gain control of the photosensitive chip based on its operating conditions includes: Both the successive approximation method and the linear prediction method are used as gain control methods for the photosensitive chip. Adjusting the gain of the digital quantity based on the determined gain control method and the gain condition includes: The successive approximation method is used as the gain control method for the photosensitive chip to obtain a first gain candidate value; The linear prediction method is used as the gain control method for the photosensitive chip to obtain a second gain candidate value; The gain of the digital quantity is adjusted based on the first gain candidate value and the second gain candidate value.
6. The photosensitive chip gain control method according to claim 5, characterized in that, Adjusting the gain of the digital quantity based on the first gain candidate value and the second gain candidate value includes: When the difference between the first gain candidate value and the second gain candidate value is less than a predetermined threshold, the average value of the first gain candidate value and the second gain candidate value is taken as the gain of the digital quantity.
7. The photosensitive chip gain control method according to claim 5, characterized in that, Adjusting the gain of the digital quantity based on the first gain candidate value and the second gain candidate value includes: When the difference between the first gain candidate value and the second gain candidate value is greater than or equal to a predetermined threshold, the first gain candidate value is used as the gain of the digital quantity.
8. The photosensitive chip gain control method according to claim 1, characterized in that, The gain conditions of the optical sensor chip include at least one of the following: gain boundary, threshold ratio, and frame count.
9. A photosensitive chip gain control device, characterized in that, The device includes: The parameter configuration module is used to receive the gain conditions of the photosensitive chip; The analog-to-digital sampling module is used to perform analog-to-digital conversion on the optical signal of the photosensitive chip and output a digital quantity corresponding to the optical signal. The mode decision module is used to determine the gain control method of the photosensitive chip based on the operating conditions of the photosensitive chip. The gain control method includes the successive approximation method and the linear prediction method. A gain adjustment module is used to adjust the gain of the digital quantity based on the determined gain control method and the gain conditions.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.