A sampling point acquisition method, system, electronic device and storage medium
By obtaining the average pixel value under different delay phases in the analog front-end circuit, filtering out the maximum value in the stable range, and adjusting the sampling points to achieve high-quality sampling of the image sensor, the image quality problem caused by the difference in sampling points of the analog front-end circuit is solved, and the image acquisition effect of the image sensor is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEFEI I TEK OPTOELECTRONICS CO LTD
- Filing Date
- 2026-04-02
- Publication Date
- 2026-05-26
AI Technical Summary
The optimal sampling point of the analog front-end circuit varies during the image generation process of the image sensor, resulting in a decrease in image quality. Existing technologies struggle to efficiently adjust the sampling point to adapt to different application scenarios.
By acquiring the pixel mean value under different delay phases, a curve is formed and the maximum value of the stable range is selected. The delay phase corresponding to the maximum value is selected as the best sampling point, and the phase alignment between the sampling signal and the clock signal is finely adjusted using a hybrid mode clock manager.
It improves the image acquisition quality of the image sensor, ensures the stability of sampling points under different factors, and optimizes the analog-to-digital conversion effect.
Smart Images

Figure CN122093552A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of signal processing, and particularly relates to a sampling point acquisition method, system, electronic device, and storage medium. Background Technology
[0002] Some image sensors (such as contact sensors) output analog voltage signals, which need to be converted into digital signals by analog front-end circuits to serve as pixel values, thereby obtaining an image.
[0003] Due to variations in their own characteristics, operating temperature, and the use of horizontal frequency or front-end analog gain, the optimal sampling point of an analog front-end circuit can differ. If the sampling signal and clock signal in the analog front-end circuit fail to align to the optimal sampling point during image generation by the image sensor, the pixel quality of the generated image will be reduced.
[0004] Therefore, there is an urgent need for a sampling point acquisition scheme for analog front-end circuits to improve the image acquisition quality of image sensors. Summary of the Invention
[0005] This application proposes a sampling point acquisition method, system, electronic device, and storage medium for improving the image acquisition quality of an image sensor.
[0006] To achieve the above objectives, this application proposes the following technical solutions: In a first aspect of this application, a sampling point acquisition method is provided, applied to an analog front-end circuit, the method comprising: The average pixel value is obtained under different delay phases; where different delay phases are formed by increasing a fixed delay step size; the average pixel value under any delay phase is obtained by calculating the average pixel value of multiple images generated by the image sensor under the current delay phase; during the image generation process of the image sensor, the analog front-end circuit is used to convert the analog signal generated by the image sensor into a digital signal; each image is obtained by the image sensor taking a picture of a uniform calibration plate under uniform light source, and there are no overexposed pixels in the image; According to the order of delay phase from low to high, all pixel mean values are connected sequentially to form a curve, and the maximum value of the curve is obtained as the initial maximum value; The initial maximum values whose width exceeds a first preset threshold are selected as candidate maximum values; wherein, the phase interval represents a continuous delayed phase interval with the maximum value as a reference point and the relative change amplitude does not exceed a second preset threshold; the first preset threshold is determined based on the length of the delay step and the period length of the analog signal; the second preset threshold is a positive number less than 1. From all the candidate maxima, select the delay phase corresponding to the maximum maxima as the optimal sampling point.
[0007] Optionally, after selecting the maximum maximum from all candidate maxima, the method further includes: Reduce the length of the delay step and rescan the phase interval corresponding to the maximum value based on the reduced delay step to obtain the pixel mean value under each delay phase; The delayed phase corresponding to the highest pixel mean is selected as the optimal sampling point.
[0008] Optionally, after obtaining the maximum value of the curve as the initial maximum value, the method further includes: Determine whether the width of the phase interval corresponding to the maximum initial maximum value exceeds a first preset threshold; if yes, select the delayed phase corresponding to the maximum initial maximum value as the best sampling point; if no, determine whether the width of the phase interval corresponding to the initial maximum value exceeds the first preset threshold in descending order, until an initial maximum value whose phase interval width exceeds the first preset threshold is selected, and the delayed phase corresponding to the selected initial maximum value is selected as the best sampling point.
[0009] Optionally, after selecting the delay phase corresponding to the largest candidate maximum as the optimal sampling point, the method further includes: The clock signal or sampling signal of the analog front-end circuit is delayed according to the delay phase corresponding to the optimal sampling point.
[0010] Optionally, if there are multiple analog front-end circuits, after obtaining the optimal sampling point for each analog front-end circuit, the method further includes: Based on the delay phase at the optimal sampling point of different analog front-end circuits, the sampled signals in each analog front-end circuit are delayed respectively.
[0011] Optionally, if there are multiple analog front-end circuits, and the analog front-end circuits share a single clock signal, then after obtaining the phase intervals of all candidate maxima, the method further includes: Determine whether there is an intersection between the phase intervals of the candidate maxima in all analog front-end circuits; if so, select the center point of the intersection with the longest delay phase range as the optimal sampling point, and delay the clock signal of the analog front-end circuit based on the delay phase corresponding to the optimal sampling point; if not, for each analog front-end circuit, select the delay phase corresponding to the largest candidate maxima as its own optimal sampling point, and delay the sampling signal of each analog front-end circuit based on the delay phase corresponding to the optimal sampling point; wherein, if there are parallel intersections with the longest delay phase ranges, arbitrarily select one from the parallel longest intersections, and take the center point of the selected intersection as the optimal sampling point.
[0012] Optionally, before obtaining the initial maximum value, the method further includes: Obtain the total pixel value under different delay phases, connect all the total pixel values in order of delay phase from low to high to form a curve, and obtain the maximum value of the curve as the initial maximum value.
[0013] In a second aspect of this application, a sampling point acquisition system is provided for use in an analog front-end circuit, the system comprising: The pixel mean value acquisition module is used to acquire the pixel mean value under different delay phases. The different delay phases are formed by increasing a fixed delay step size. The pixel mean value under any delay phase is obtained by calculating the mean value of pixels in multiple images generated by the image sensor under the current delay phase. During the image generation process of the image sensor, the analog front-end circuit is used to convert the analog signal generated by the image sensor into a digital signal. Each image is obtained by the image sensor taking a picture of a uniform calibration plate under uniform light source, and there are no overexposed pixels in the image. The initial maximum value acquisition module is used to sequentially connect all pixel mean values in order of increasing delay phase to form a curve, and obtain the maximum value of the curve as the initial maximum value; The candidate maximum filtering module is used to filter out initial maximum values whose phase interval width exceeds a first preset threshold as candidate maximum values; wherein, the phase interval represents a continuous delayed phase interval with the maximum value as a reference point and the relative change amplitude does not exceed a second preset threshold; the first preset threshold is determined based on the length of the delay step and the period length of the analog signal; the second preset threshold is a positive number less than 1. The optimal sampling point acquisition module is used to select the delay phase corresponding to the maximum maximum value from all candidate maxima as the optimal sampling point.
[0014] In a third aspect of this application, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the sampling point acquisition method described in any one of the first aspects.
[0015] In a fourth aspect of this application, a computer-readable storage medium is provided, wherein a computer program is stored within the computer-readable storage medium, and when executed by a processor, the computer program implements the sampling point acquisition method described in any one of the first aspects. The beneficial effects of this application are as follows: This application provides a sampling point acquisition method applied to analog front-end circuits, the method comprising: The average pixel value is obtained under different delay phases; where different delay phases are formed by increasing a fixed delay step size; the average pixel value under any delay phase is obtained by calculating the average pixel value of multiple images generated by the image sensor under the current delay phase; during the image generation process of the image sensor, the analog front-end circuit is used to convert the analog signal generated by the image sensor into a digital signal; each image is obtained by the image sensor taking a picture of a uniform calibration plate under uniform light source, and there are no overexposed pixels in the image.
[0016] Following the order of increasing delayed phase, the average values of all pixels are sequentially connected to form a curve, and the maximum value of the curve is obtained as the initial maximum value. Initial maximum values whose phase interval width exceeds a first preset threshold are selected as candidate maxima. Here, the phase interval represents a continuous delayed phase interval with the maximum value as a reference point, and the relative change amplitude does not exceed a second preset threshold. From all candidate maxima, the delayed phase corresponding to the largest maximum value is selected as the optimal sampling point.
[0017] Considering that the function of the analog front-end circuit is to convert the analog signal generated by the image sensor into a digital signal, the magnitude of the pixel mean value in this application can be used to judge the quality of the sampling points in the front-end circuit under different delay phases, and the delay phase corresponding to the initial maximum value can be used as a candidate sampling point.
[0018] Since the sampling points change with factors such as operating temperature, sampling line frequency, and front-end analog gain, the obtained sampling points need to be stable. Based on the aforementioned processing, this application filters out phase intervals whose variation amplitude does not exceed a second preset threshold, which correspond to the stable interval of the sampling point corresponding to each candidate maximum. Furthermore, by judging whether the width of the phase interval exceeds a first preset threshold, candidate maximums whose stable interval range meets the requirements are selected. Finally, the delayed phase corresponding to the largest maximum is selected from the candidate maximums as the optimal sampling point. This ensures that the optimal sampling point, while having a certain stable interval, provides the best analog-to-digital conversion effect, thereby improving the image acquisition quality of the image sensor. Attached Figure Description
[0019] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a flowchart illustrating a sampling point acquisition method provided in this application; Figure 2 This is a schematic diagram of the structure of an image acquisition system provided in this application; Figure 3 This is a schematic diagram of a signal provided in this application; Figure 4 This is a flowchart illustrating another sampling point acquisition method provided in this application; Figure 5 This is a graph provided in this application; Figure 6 This is a schematic diagram of the structure of a sampling point acquisition system provided in this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this application, but not all embodiments.
[0021] Some image sensors output analog voltage signals, which need to be converted into digital signals using a corresponding AFE (Analog Front End) circuit before an image can be generated. Therefore, the sampling points at different delay phases in the analog front-end circuit will directly affect the quality of the image generated by the image sensor.
[0022] Taking a CIS camera as an example, this camera has a modular structure and typically includes several sensor units. Each sensor unit corresponds to an AFE chip, which is the analog front-end circuit of this application. Due to individual differences in image sensors and AFE chips, the optimal sampling points of different AFE chips vary. Furthermore, the optimal sampling points of each AFE chip differ with changes in operating temperature, sampling line frequency, and front-end analog gain. Therefore, it is necessary to adjust the sampling points of the analog front-end circuit to obtain the optimal sampling points.
[0023] Current methods for acquiring sampling points typically involve manually scanning the sampling points of the analog front-end circuit at the camera's factory and selecting the optimal delay phase based on the sampling results. However, this method is inefficient, difficult to modify in a timely manner when the application scenario changes, and the phase scanning process is rather coarse, easily missing the best sampling point.
[0024] Therefore, there is an urgent need for a sampling point acquisition scheme for analog front-end circuits to improve the image acquisition quality of image sensors.
[0025] To address the aforementioned problems, this application proposes a sampling point acquisition method, which is applied to analog front-end circuits, such as... Figure 1 As shown, the method includes the following steps: S1. Obtain the average pixel value under different delay phases. Different delay phases are formed by increasing a fixed delay step size. The average pixel value under any delay phase is obtained by calculating the average pixel value of multiple test images generated by the image sensor at the current delay phase. During the image generation process, the analog front-end circuit converts the analog signal generated by the image sensor into a digital signal. Each image is obtained by the image sensor taking a picture of a uniform calibration plate under uniform light, and there are no overexposed pixels in the image.
[0026] S2. Connect all pixel averages sequentially in order of increasing delay phase to form a curve, and obtain the maximum value of the curve as the initial maximum value.
[0027] S3. Select initial maxima whose width exceeds the first preset threshold as candidate maxima. Here, the phase interval refers to a continuous delayed phase interval with the maxima as a reference point, where the relative change amplitude does not exceed the second preset threshold; the first preset threshold is determined based on the length of the delay step and the period length of the analog signal; the second preset threshold is a positive number less than 1.
[0028] S4. From all the candidate maxima, select the delay phase corresponding to the maximum maxima as the optimal sampling point.
[0029] Considering that the function of the analog front-end circuit is to convert the analog signal generated by the image sensor into a digital signal, the magnitude of the pixel mean value in this application can be used to judge the quality of the sampling points in the front-end circuit under different delay phases, and the delay phase corresponding to the initial maximum value can be used as a candidate sampling point.
[0030] Considering that sampling points can change with factors such as operating temperature, sampling line frequency, and front-end analog gain, the obtained sampling points need to have a certain degree of stability. Based on the aforementioned processing, this application filters out phase intervals whose variation amplitude does not exceed a second preset threshold, which correspond to the stable interval of the sampling point corresponding to each candidate maximum. Furthermore, by judging whether the width of the phase interval exceeds a first preset threshold, candidate maximums whose stable interval range meets the requirements are selected. Finally, the delayed phase corresponding to the largest maximum value is selected from the candidate maximums as the optimal sampling point. This ensures that the optimal sampling point, while having a certain stable interval, provides the best analog-to-digital conversion effect, thereby improving the image acquisition quality of the image sensor.
[0031] Regarding step S1, the image sensor in this application is typically a CIS (Contact Image Sensor), used to convert light signals into electrical signals, and then into digital signals through an analog front-end circuit. In practice, the images acquired by the contact sensor are often line images. The analog front-end circuit of this application can simultaneously acquire analog signals output by several (3, 6, 9, etc.) image sensors. The image used in this application to calculate the average pixel value or the total pixel value is represented by a single analog front-end circuit, indicating the images generated by all image sensors connected to that circuit, rather than images generated by a single image sensor.
[0032] This application provides a schematic diagram of the structure of a test image generation system, such as... Figure 2 As shown, the system includes a sensor (i.e., the image sensor of this application), a uniform light source A, and a uniform calibration plate, which is a calibration plate with uniform light reflection and the same color on its surface, typically a pure white plate. Taking a CIS camera as an example, by placing the uniform calibration plate at the focal point below the camera, a uniform image can be captured under a uniform light source. The uniform calibration plate can be fixed to a specific position on the camera via positioning holes and magnetic blocks, facilitating installation and removal.
[0033] It is important to note that during the acquisition of test images, it is necessary to set reasonable light source brightness and exposure time to avoid overexposed pixels in the acquired test images.
[0034] In some embodiments, step S1 includes the following: S101. For analog front-end circuits, at the initial phase between the sampling signal and the clock signal, acquire multiple test images, calculate the average value of the images at the current delay phase, and store it in the average value buffer sequence.
[0035] S102. Based on a fixed delay step, the sampling signal or clock signal is incrementally delayed to acquire multiple test images under each delay phase, and the average value of the images under the corresponding delay phase is calculated and stored in the average value buffer sequence until the delay phase is one clock cycle. The number of test images acquired under different delay phases is the same.
[0036] The acquisition timing of the AFE chip is as follows: Figure 3 As shown, the SAMPLE signal is the sampling signal, indicating that the AFE chip starts sampling the analog signal output by the sensor; the HOLD signal is the hold signal, indicating that the AFE chip has completed sampling and begins analog-to-digital conversion of the sampled signal.
[0037] The input clock frequency of the AFE chip is the clock frequency of the output pixels of the image sensor. In this application, the sampling signal consists of a SAMPLE signal and a HOLD signal. Specifically, the sampling process of the sampling signal can be described as follows: when the rising edge of the SAMPLE signal arrives, the AFE chip begins to acquire the analog signal output by the image sensor; when the rising edge of the HOLD signal arrives, the AFE chip completes the acquisition of the analog signal and begins analog-to-digital conversion.
[0038] In existing technologies, AFE chips can typically coarsely adjust the phase of the sampled signal to... Figure 3 For example, the AFE chip can delay the sampled signal with a delay step of 1 / 4 of the input clock cycle. Taking a 32MHz clock signal as an example, SAMPLE2 is delayed by 7.8125ns relative to SAMPLE1; HOLD2 is delayed by 7.8125ns relative to HOLD1. It can be seen that for a single clock cycle, the above adjustment method has a small number of delay steps, resulting in low accuracy of the delay phase and poor operability.
[0039] To address the aforementioned issues, this application specifies that the sampling point acquisition method is executed by an FPGA (Field-Programmable Gate Array). The FPGA includes a mixed-mode clock manager used to control the delay step length based on a preset modulation signal and the period of a voltage-controlled oscillator; the modulation signal includes information on the phase shift direction and the number of phase shifts.
[0040] by Figure 3 Taking the 32MHz clock signal as an example, an MMCM (Mixed-Mode Clock Manager) is established in the FPGA to simultaneously generate a 32M pixel clock and a 128M control clock. The phase of the 128M control clock is adjustable. The phase adjustment accuracy of the MMCM output clock can reach 1 / 56 of the VCO (Voltage Controlled Oscillator) period, corresponding to a delay step size of 22.3214ps. It is evident that 1400 delay steps are needed to complete a delay scan for one clock cycle.
[0041] Furthermore, the specific implementation process of controlling the delay step size through the hybrid mode clock manager can be found in Chinese patent CN118590013A.
[0042] For step S2, before connecting the curves, some outliers in the pixel mean set can be filtered out in advance. Specific methods can include standard deviation method, BSCAN clustering and K-Means clustering followed by filtering, etc., which are not specifically limited here.
[0043] During curve concatenation, pixel mean values are typically concatenated in ascending order of delay phase. After the curves are completed, Gaussian smoothing, low-pass filtering, and local weighted regression can be used to smooth the concatenated curves.
[0044] In step S3, the second preset threshold is a positive number less than 1, used to limit the relative change magnitude corresponding to the stable interval. The larger the value of the second preset threshold, the larger the relative change magnitude corresponding to the stable interval; conversely, the smaller the value of the second preset threshold, the smaller the relative change magnitude corresponding to the stable interval. In practice, the second preset threshold is usually set to 5%.
[0045] In step S3, the first preset threshold is a positive number, used to limit the minimum width of the stable interval. A larger first preset threshold results in a larger minimum width of the stable interval and a higher selection criterion for the potential maximum value. The first preset threshold is determined based on the length of the delay step and the period length of the analog signal.
[0046] For step S3, if an initial maximum value whose width exceeds the first preset threshold cannot be found, the pixel mean value under different delay phases needs to be re-acquired to re-execute the sampling point acquisition method. During the re-execution of the sampling point acquisition method, the difficulty of selecting the candidate maximum value can be reduced by decreasing the first preset threshold. If no candidate maximum value is subsequently found, it indicates a circuit problem in the analog front-end circuit; the current solution should then be stopped, and an error should be reported.
[0047] In some embodiments, such as Figure 4 As shown, after step S2, the acquisition method provided in this application further includes the following steps: S5. Determine whether the width of the phase interval corresponding to the maximum initial maximum value exceeds the first preset threshold; if yes, proceed to step S6; if no, proceed to step S7.
[0048] S6. Select the delayed phase corresponding to the maximum initial maximum value as the optimal sampling point.
[0049] S7. In descending order, determine whether the width of the phase interval corresponding to the initial maximum value exceeds the first preset threshold, until the initial maximum value whose phase interval width exceeds the first preset threshold is selected, and take the delayed phase corresponding to the selected initial maximum value as the best sampling point.
[0050] Based on the above processing, after obtaining all the initial maxima, this application sequentially selects the maxima points that meet the requirements of the stable interval in descending order. Under normal circumstances, it is not necessary to construct the phase interval of all initial maxima, which improves the efficiency of obtaining sampling points.
[0051] In some embodiments, after step S4, the sampling point acquisition method provided in this application further includes the following steps: S8. Based on the delay phase corresponding to the optimal sampling point, delay the input clock signal or sampling signal of the analog front-end circuit. This achieves phase alignment between the sampling signal and the clock signal. The delay of the input clock signal or sampling signal can be implemented using methods such as a mixed-mode clock manager, tapped delay chains, and phase-locked loops.
[0052] In some embodiments, the sampling point acquisition method provided in this application can also replace the pixel mean with the total number of pixels to filter out the best sampling points. Specifically, before step S2, the sampling point acquisition method provided in this application may further include the following: Obtain the total pixel value under different delay phases, connect all the total pixel values in order of delay phase from low to high to form a curve, and obtain the maximum value of the curve as the initial maximum value.
[0053] In some embodiments, in the sampling point acquisition method provided in this application, if there are multiple analog front-end circuits, after obtaining the optimal sampling point for each analog front-end circuit, the sampling point acquisition method further includes the following steps: S9. Based on the delay phase at the optimal sampling point of different analog front-end circuits, delay the sampling signals in their respective analog front-end circuits.
[0054] In some embodiments, in the sampling point acquisition method provided in this application, if there are multiple analog front-end circuits and the analog front-end circuits share a common clock signal, then after obtaining the phase intervals of all candidate maxima, the method further includes: S10. Determine whether there is an intersection between the phase intervals of the candidate maxima in all analog front-end circuits; if yes, proceed to step S11; if no, proceed to step S12.
[0055] S11. Select the center point of the intersection with the longest delay phase range as the optimal sampling point, and delay the clock signal of the analog front-end circuit based on the delay phase corresponding to the optimal sampling point. If there are multiple longest intersections, the center point of any one of them can be selected as the optimal sampling point.
[0056] S12. For each analog front-end circuit, select the delay phase corresponding to the maximum candidate maximum value as its own optimal sampling point, and delay the sampling signal of each analog front-end circuit based on the delay phase corresponding to the optimal sampling point.
[0057] In practical applications, taking a 32MHz clock signal with a delay step of 22.3214ps as an example, the sampling point acquisition method provided in this application includes the following: Step a: Install the uniform calibration plate and the side uniform light.
[0058] Step b: Set the initial phase to 0, that is, the initial phases of the 32M clock and the 128M clock are aligned. Continuously acquire 2000 rows of images, obtain the image mean, and store it in the image mean buffer sequence.
[0059] Step c: Sequentially increase the phase of the 128MHz clock by 128MHz. After each phase increase, continuously acquire 2000 rows of images, obtain the image mean, and store it in the image mean buffer sequence. Taking the above parameters as an example, after increasing the phase 1400 times, a complete sampling window scan can be completed.
[0060] Step d: Process the obtained image mean buffer sequence, find all image mean maxima, and obtain a maxima sequence. Using a fixed percentage (e.g., 5%) of each maxima as a second preset threshold for amplitude variation, calculate the width of the flat region near each maxima, and delete maxima with a flat region width less than a certain value (e.g., 50), obtaining an initial maxima sequence. Take the maximum value in the candidate maxima sequence; its corresponding sampling point is the optimal sampling point.
[0061] The result of a single window scan is as follows Figure 5 As shown, after data processing, the maximum sampling point is the sampling point corresponding to the maximum value 1, with a phase delay of 480 times (i.e., the delay step size is 480).
[0062] In some embodiments, this application provides a sampling point acquisition system applied to analog front-end circuits, such as... Figure 6 As shown, the system includes: The pixel mean value acquisition module 601 is used to acquire the pixel mean value under different delay phases; wherein, different delay phases are formed by increasing a fixed delay step size; the pixel mean value under any delay phase is obtained by calculating the mean value of pixels in multiple images generated by the image sensor under the current delay phase; during the image generation process of the image sensor, the analog front-end circuit is used to convert the analog signal generated by the image sensor into a digital signal; each image is obtained by the image sensor taking a picture of a uniform calibration plate under a uniform light source, and there are no overexposed pixels in the image.
[0063] The initial maximum value acquisition module 602 is used to sequentially connect all pixel averages in order of increasing delay phase to form a curve, and acquire the maximum value of the curve as the initial maximum value.
[0064] The candidate maximum filtering module 603 is used to filter out initial maximum values whose phase interval width exceeds a first preset threshold as candidate maximum values. The phase interval refers to a continuous delayed phase interval with the maximum value as a reference point, where the relative change amplitude does not exceed a second preset threshold; the first preset threshold is determined based on the length of the delay step and the period length of the analog signal; the second preset threshold is a positive number less than 1.
[0065] The optimal sampling point acquisition module 604 is used to select the delay phase corresponding to the maximum maximum value from all candidate maxima as the optimal sampling point.
[0066] This application also provides an electronic device, such as... Figure 7 As shown, it includes a processor 701, a communication interface 702, a memory 703, and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704. Memory 703 is used to store computer programs; The processor 701, when executing the program stored in the memory 703, implements any of the above sampling point acquisition methods.
[0067] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0068] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0069] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0070] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0071] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described sampling point acquisition methods.
[0072] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the steps of any of the sampling point acquisition methods in the above embodiments.
[0073] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A sampling point acquisition method, applied to analog front-end circuits, characterized in that, The method includes: The average pixel value is obtained under different delay phases; where different delay phases are formed by increasing a fixed delay step size; the average pixel value under any delay phase is obtained by calculating the average pixel value of multiple images generated by the image sensor under the current delay phase; during the image generation process of the image sensor, the analog front-end circuit is used to convert the analog signal generated by the image sensor into a digital signal; each image is obtained by the image sensor taking a picture of a uniform calibration plate under uniform light source, and there are no overexposed pixels in the image; According to the order of delay phase from low to high, all pixel mean values are connected sequentially to form a curve, and the maximum value of the curve is obtained as the initial maximum value; The initial maximum values whose width exceeds a first preset threshold are selected as candidate maximum values; wherein, the phase interval represents a continuous delayed phase interval with the maximum value as a reference point and the relative change amplitude does not exceed a second preset threshold; the first preset threshold is determined based on the length of the delay step and the period length of the analog signal; the second preset threshold is a positive number less than 1. From all the candidate maxima, select the delay phase corresponding to the maximum maxima as the optimal sampling point.
2. The sampling point acquisition method according to claim 1, characterized in that, After selecting the maximum maximum from all candidate maxima, the method further includes: Reduce the length of the delay step and rescan the phase interval corresponding to the maximum value based on the reduced delay step to obtain the pixel mean value under each delay phase; The delayed phase corresponding to the highest pixel mean is selected as the optimal sampling point.
3. The sampling point acquisition method according to claim 1, characterized in that, After obtaining the maximum value of the curve as the initial maximum value, the method further includes: Determine whether the width of the phase interval corresponding to the maximum initial maximum value exceeds a first preset threshold; if yes, select the delayed phase corresponding to the maximum initial maximum value as the best sampling point; if no, determine whether the width of the phase interval corresponding to the initial maximum value exceeds the first preset threshold in descending order, until an initial maximum value whose phase interval width exceeds the first preset threshold is selected, and the delayed phase corresponding to the selected initial maximum value is selected as the best sampling point.
4. The sampling point acquisition method according to any one of claims 1 to 3, characterized in that, After selecting the delay phase corresponding to the largest candidate maximum as the optimal sampling point, the method further includes: The clock signal or sampling signal of the analog front-end circuit is delayed according to the delay phase corresponding to the optimal sampling point.
5. The sampling point acquisition method according to claim 1, characterized in that, If there are multiple analog front-end circuits, after obtaining the optimal sampling point for each analog front-end circuit, the method further includes: Based on the delay phase at the optimal sampling point of different analog front-end circuits, the sampled signals in each analog front-end circuit are delayed respectively.
6. The sampling point acquisition method according to claim 1, characterized in that, If there are multiple analog front-end circuits, and these circuits share a single clock signal, then after obtaining the phase intervals of all candidate maxima, the method further includes: Determine whether there is an intersection between the phase intervals of the candidate maxima in all analog front-end circuits; if so, select the center point of the intersection with the longest delay phase range as the optimal sampling point, and delay the clock signal of the analog front-end circuit based on the delay phase corresponding to the optimal sampling point; if not, for each analog front-end circuit, select the delay phase corresponding to the largest candidate maxima as its own optimal sampling point, and delay the sampling signal of each analog front-end circuit based on the delay phase corresponding to the optimal sampling point; wherein, if there are parallel intersections with the longest delay phase ranges, arbitrarily select one from the parallel longest intersections, and take the center point of the selected intersection as the optimal sampling point.
7. The sampling point acquisition method according to claim 1, characterized in that, Before obtaining the initial maximum value, the method further includes: Obtain the total pixel value under different delay phases, connect all the total pixel values in order of delay phase from low to high to form a curve, and obtain the maximum value of the curve as the initial maximum value.
8. A sampling point acquisition system, applied to analog front-end circuits, characterized in that, The system includes: The pixel mean value acquisition module is used to acquire the pixel mean value under different delay phases. The different delay phases are formed by increasing a fixed delay step size. The pixel mean value under any delay phase is obtained by calculating the mean value of pixels in multiple images generated by the image sensor under the current delay phase. During the image generation process of the image sensor, the analog front-end circuit is used to convert the analog signal generated by the image sensor into a digital signal. Each image is obtained by the image sensor taking a picture of a uniform calibration plate under uniform light source, and there are no overexposed pixels in the image. The initial maximum value acquisition module is used to sequentially connect all pixel mean values in order of increasing delay phase to form a curve, and obtain the maximum value of the curve as the initial maximum value; The candidate maximum filtering module is used to filter out initial maximum values whose phase interval width exceeds a first preset threshold as candidate maximum values; wherein, the phase interval represents a continuous delayed phase interval with the maximum value as a reference point and the relative change amplitude does not exceed a second preset threshold; the first preset threshold is determined based on the length of the delay step and the period length of the analog signal; the second preset threshold is a positive number less than 1. The optimal sampling point acquisition module is used to select the delay phase corresponding to the maximum maximum value from all candidate maxima as the optimal sampling point.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the sampling point acquisition method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program that, when executed by a processor, implements the sampling point acquisition method according to any one of claims 1-7.