An image sensor correction method, system, and medium
Patent Information
- Application Number
- CN202410108834.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-26
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2044-01-26
AI Technical Summary
[0005]因此本发明为了解决控制信号跳变沿读出的数据出错的问题,提供了一种图像传感器校正方法、系统及介质
[0016]本发明第三方面还提供一种计算机可读存储介质,包括计算机程序,所述计算机程序被处理器执行时实现上述校正方法。本发明的有益效果是:
Smart Images

Figure CN117880648B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image sensors, and particularly relates to an image sensor calibration method, system, and medium. Background Technology
[0002] Image sensors convert light signals acquired by a lens into electrical signals that are easy to store, transmit, and process. Based on the pixel arrangement structure in a solid-state image sensor chip, image sensors can be divided into area array image sensors and linear array image sensors. Area array image sensors directly capture two-dimensional images of objects using pixels arranged in a two-dimensional area array, while linear array image sensors acquire two-dimensional image information by scanning and capturing objects using a one-dimensional linear array of pixels.
[0003] Whether it is an area array or a linear array sensor, they all rely on external signal control to achieve different integration times, different line frequencies or frame rates. After the sensor completes the integration operation, it begins to output pixel values. The integration operation and the pixel reading each require a certain amount of time. When the sum of the two times is greater than the interval between two lines or two frames of images, overlap will occur. At this time, the data read out on the control signal transition edge is likely to be incorrect.
[0004] To avoid this situation, the sum of integration time and readout time can be limited to the line interval or frame interval, thus preventing overlapping settings. This is because the readout time is usually fixed and only at the microsecond level, so it is not a problem at low frequency or low frame rate. However, at some high line frequency or high frame rate, overlapping is often unavoidable. Otherwise, it is necessary to reduce the line frequency or frame rate or use it directly regardless of the image loss caused by the conflict.
[0005] Therefore, in order to solve the problem of data read from the transition edge of the control signal, the present invention provides an image sensor calibration method, system and medium. Summary of the Invention
[0006] The purpose of this invention is to overcome the above-mentioned problems in the prior art and to provide an image sensor calibration method, system and medium.
[0007] To achieve the above-mentioned technical objectives and effects, the present invention is implemented through the following technical solution: An image sensor calibration method, comprising: Set the sensor operating parameters and collect the corresponding collision point pixel values and pixel correction target values; Construct a mapping relationship between the pixel correction target value and the pixel values of the conflict points to obtain the pixel correction parameters; Select any conflict point location as the conflict reference point location to provide location reference; The real-time operating parameters of the sensors are collected, compared with the reference position of the collision point, and the real-time collision point position is calculated. Obtain the pixel value corresponding to the real-time collision point location, and output the corrected pixel value of the real-time collision point location based on the pixel correction parameters.
[0008] Furthermore, the pixel correction target value acquisition method includes: Control the operation of the sensor; Get the pixel values of adjacent positions of conflict points in each row; Calculate the mean of pixel values at all adjacent locations of conflict points, and output it as the pixel correction target value.
[0009] Furthermore, conflict point identification methods include: Extract the integration time, readout time, and line interval / frame interval from the sensor's operating parameters; Calculate the sum of integration time and readout time; If the sum of the integration time and the readout time is greater than the line interval time / frame interval time, then a conflict point is determined to exist; If the sum of the integration time and the readout time is less than or equal to the line interval time / frame interval time, then it is determined that there is no conflict point.
[0010] Furthermore, methods for determining the location of conflict points include: Calculate the difference between the line interval time / frame interval time and the integration time; The system receives the sensor data output signal command and outputs the collision point position signal after the clock cycle corresponding to the above difference.
[0011] Furthermore, the specific methods for selecting the location of conflict reference points include: Set the minimum line interval time / frame interval time, that is, set the sensor to the maximum line frequency / frame rate; Set the maximum points time; Obtain the location of the conflict point as the reference point for the conflict.
[0012] Furthermore, the calculated real-time conflict point locations include: Calculate the difference between the line interval time / frame interval time and the integration time corresponding to the conflict reference point position, and output the first constant. Calculate the difference between the actual line interval time / frame interval time and the integration time during actual use, and output it as the second constant; Collect the first constant and the second constant, calculate the difference between the second constant and the first constant, and output the difference clock count; Obtain the number of data output channels, calculate the deviation between the real-time collision point location and the collision reference point location, and output the real-time collision point location.
[0013] A second aspect of the present invention also provides an image sensor calibration system, comprising: Pixel correction module: used to collect the corresponding conflict point pixel values and pixel correction target values, and calculate the pixel correction parameters; Conflict point selection module: Used to select any conflict point location as the conflict reference point location to provide location reference; Position calculation module: used to collect the real-time operating parameters of the sensor, compare them with the reference position of the conflict point, and calculate the real-time position of the conflict point; Pixel output module: Used to obtain the pixel value corresponding to the real-time collision point position, and output the pixel value after real-time collision point position correction according to the pixel correction parameters.
[0014] Furthermore, it also includes a conflict point detection module, which is used to extract the integration time, readout time, and line interval / frame interval time from the sensor's operating parameters to determine whether a conflict point exists.
[0015] Furthermore, it also includes a conflict point location determination module, which is used to calculate the difference between the line interval time / frame interval time and the integration time, and output the conflict point location signal.
[0016] A third aspect of the present invention also provides a computer-readable storage medium, including a computer program, which, when executed by a processor, implements the above-described correction method. The beneficial effects of the present invention are: (1) The present invention can realize pixel data correction under the use of any high line frequency or high frame rate of the sensor without reducing the line frequency or frame rate, thus avoiding image loss caused by edge collision. (2) By setting the position of the conflict reference point, the present invention can quickly determine the position of the real-time conflict point according to the real-time operating parameters when multiple channels of data are output together, so as to obtain the pixel value at the corresponding position and realize the dynamic correction of pixel value. (3) The present invention can quickly determine whether there is a conflict point and the location of the conflict point by calculating the sensor operating parameters; (4) This invention can accurately correct the pixel values of conflict points by fitting the mapping relationship between conflict point pixel values and pixel correction target values; (5) Through the modular design of the calibration system, the present invention can automatically realize pixel calibration of image sensor and improve calibration efficiency. Attached Figure Description
[0017] 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 1This is an example diagram of the control timing when there is no jump delay conflict in this invention; Figure 2 This is an example diagram of the control timing when there is a jump delay conflict in this invention; Figure 3 This is a flowchart of the correction method in this invention; Figure 4 This is a structural block diagram of the correction system in this invention. Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] A sensor typically includes at least CLK (clock signal), an integration signal, and a readout signal. The high-level width of the integration signal represents the integration time. Generally, the readout signal is sent after integration is complete, and the sensor data output channel will start outputting data. The data output takes a certain amount of time.
[0020] like Figure 1 As shown in the figure, this is an example of the control timing when there is no jump delay conflict. DATA0 to DATAX are multiple output channels for one row of pixels. It can be seen that, since the row interval time is large enough, the data is completely read out before the next integration begins, and there is no conflict between the reading and integration control timing.
[0021] However, as the line frequency increases, the line interval becomes increasingly shorter. At a certain point, a situation may arise where integral control has restarted but the data has not been fully read. This leads to a transition edge conflict, and the data read on that transition edge will be incorrect. Figure 2 As shown in the figure, this is an example of control timing when there is a jump delay conflict.
[0022] like Figure 3 As shown, to address data readout errors caused by jump delay conflicts, this embodiment first provides an image sensor correction method, which includes the following steps: S1: Set the sensor operating parameters and collect the corresponding collision point pixel values and pixel correction target values.
[0023] Sensor operating parameters include line frequency / frame rate, integration time, and readout time. By changing these parameters, the pixel values at collision points and the pixel correction target values can be altered.
[0024] S2: Construct a mapping relationship between the pixel correction target value and the pixel value of the conflict point to obtain the pixel correction parameters.
[0025] The conflict point pixel value is the abnormal pixel value extracted from the jump-delay conflict point, while the pixel correction target value is the target value after correcting the conflict point pixel value, which can be obtained by statistically analyzing the pixel values of normal points around the jump-delay conflict point. By combining multiple sets of statistical data of conflict point pixel values and pixel correction target values, a corresponding mapping relationship can be fitted to obtain the specific pixel correction parameters.
[0026] S3: Select any conflict point location as the conflict reference point location to provide a location reference.
[0027] In order to quickly determine the real-time location of the conflict point during calibration, it is necessary to select a conflict point location in advance as the conflict reference point location.
[0028] S4: Collect the real-time operating parameters of the sensor, compare them with the reference position of the conflict point, and calculate the real-time conflict point position.
[0029] When the sensor is actually running, by collecting real-time line frequency / frame rate, integration time, and readout time, the positional deviation between the real-time collision point position and the collision reference point position can be calculated, thereby obtaining the real-time collision point position.
[0030] S5: Obtain the pixel value corresponding to the real-time collision point location, and output the pixel value after real-time collision point location correction according to the pixel correction parameters.
[0031] Based on the obtained real-time conflict point location, the corresponding pixel value at that location can be obtained, and the pixel value after real-time conflict point location correction can be obtained based on the mapping relationship between the pixel correction target value and the conflict point pixel value and the pixel correction parameters.
[0032] The present invention solves the problem of data errors read from the control signal transition edge without reducing the line frequency or frame rate of the image sensor through the above solution. By calculating the real-time collision point position and cooperating with pixel correction parameters, the pixel value error caused by the transition edge collision can be dynamically corrected, so that the image sensor can maintain image quality even when running at high line frequency or high frame rate.
[0033] To acquire the target pixel correction value, as a preferred implementation method, the specific steps are as follows: S101: Set the sensor operating parameters and control the sensor operation.
[0034] S102: Obtain the pixel values of adjacent positions of conflict points in each row; S103: Calculate the mean of pixel values at all adjacent positions of conflict points, and output it as the pixel correction target value.
[0035] Generally speaking, for the same sensor operating parameter, abnormal points in each row of readout data will be located at the same column position. Therefore, statistics can be performed on the data of two adjacent columns of the column where the abnormal point is located, and the average values of the data of the two adjacent columns are obtained respectively, and then the average value of the two average results is obtained again to obtain the pixel correction target value.
[0036] As a first embodiment of steps S1 and S2, it specifically includes the following methods: Setting a plurality of different integration times x1 to make the output pixels of the sensor change from dark to bright, so as to obtain conflict point pixel values y1 and pixel correction target values Y1; If y1<Y1, calculate the pixel difference z=Y1-y1; If y1>Y1, calculate the pixel difference z=y1-Y1; Fitting the curve of integration time and pixel difference by the least square method to obtain the mapping relationship between the two, which is z=k1x1+b1; The pixel correction target value Y1 is obtained as: when y1<Y1, Y1=y1+k1x1+b1; when y1>Y1, Y1=y1-k1x1-b1.
[0037] As a second embodiment of steps S1 and S2, it specifically includes the following methods: Setting a plurality of different integration times x2 to make the output pixels of the sensor change from dark to bright, so as to obtain conflict point pixel values y2 and pixel correction target values Y2; Fitting the curve of integration time, conflict point pixel value and pixel correction target value by the least square method to obtain the mapping relationship Y2=ay2+k2x2+b2, wherein k1, k2, b1, b2 and a are all fitting coefficients, and pixel correction parameters are obtained by calculating the fitting coefficients.
[0038] In order to quickly judge whether a conflict point exists and improve correction efficiency, the conflict point judgment method specifically includes the following steps: S201: Extract integration time, readout time, row interval time / frame interval time from the sensor operating parameters; S202: Calculate the sum of integration time and readout time; S203: If the sum of integration time and readout time is greater than the row interval time / frame interval time, it is determined that a conflict point exists; If the sum of integration time and readout time is less than or equal to the row interval time / frame interval time, it is determined that no conflict point exists.
[0039] If the sum of integration time and readout time is greater than the row interval time / frame interval time, as shown in Figure 2 , it means that the readout time and the integration time overlap, that is, there is an edge conflict.
[0040] For cases where conflict points have been confirmed, the method for determining the location of conflict points specifically includes the following steps: S301: Calculate the difference between line interval time / frame interval time and integration time; S302: Receives the sensor data output signal command, and after the clock cycle corresponding to the above difference, outputs the collision point position signal.
[0041] After the sensor completes the integration operation, it begins to output pixel values. Therefore, the number of clock cycles from receiving the sensor data output signal command to the collision of the transition edge is equal to the difference between the line interval time / frame interval time and the integration time. This allows for the rapid identification and confirmation of collision points under any sensor operating parameters.
[0042] To facilitate the calculation of conflict point locations when outputting multi-channel data simultaneously, the following settings can be used to select the corresponding conflict reference point location as a better method. The specific selection method includes the following steps: S401: Set the minimum line interval time / frame interval time, that is, set the sensor to the maximum line frequency / frame rate; S402: Set the maximum integration time; S403: Obtain the location of the conflict point as the reference point location for the conflict.
[0043] like Figure 2 As shown, when the line interval time / frame interval time is the smallest and the integration time is the largest, a minimum conflict point position will be obtained, which is the initial position closest to the data output, so that the subsequent difference calculation can be positive.
[0044] Based on the actual operating parameters of the image sensor, the real-time collision point location can be calculated, specifically including the following steps: S501: Calculate the difference between the line interval time / frame interval time and the integration time corresponding to the conflict reference point position, and output the first constant A; S502: Calculate the difference between the actual line interval time / frame interval time P and the integration time E during actual use, and output the second constant. S503: Acquires the first constant and the second constant, calculates the difference between the second constant and the first constant (PEA), and outputs the number of differential clocks; S504: Obtain the number of data output channels X, calculate the deviation X (PEA) between the real-time collision point position and the collision reference point position. If the collision reference point position is S, then the real-time collision point position can be obtained as S+X (PEA).
[0045] By combining the output of the real-time collision point location with the calculation results of the pixel correction parameters mentioned above, the corrected pixel value can be obtained based on the collision point pixel value corresponding to the real-time collision point location.
[0046] like Figure 4 As shown, a second aspect of the present invention also provides an image sensor calibration system, comprising: Pixel correction module: used to collect the corresponding conflict point pixel values and pixel correction target values, and calculate the pixel correction parameters; combined with the first or second implementation method of the above steps S1 and S2, the pixel correction parameters can be obtained and sent to the pixel output module.
[0047] Conflict point selection module: Used to select any conflict point location as the conflict reference point location to provide location reference.
[0048] Position calculation module: It is used to collect the real-time operating parameters of the sensor, compare them with the reference position of the conflict point, that is, the real-time line frequency / frame rate, integration time, and readout time of the sensor. Combined with the position of the conflict reference point, the deviation between the real-time conflict point position and the conflict reference point position can be calculated, and finally the real-time conflict point position can be calculated. Pixel output module: Used to obtain the pixel value corresponding to the real-time collision point position, and output the pixel value after real-time collision point position correction according to the pixel correction parameters.
[0049] The correction system of the present invention also includes a conflict point judgment module, which is used to extract the integration time, readout time, line interval time / frame interval time from the sensor operating parameters, and determine whether there is a conflict point in combination with steps S201-S203.
[0050] The correction system of the present invention also includes a conflict point location determination module, which is used to calculate the difference between the line interval time / frame interval time and the integration time, output the conflict point location signal, and the conflict point location can be calculated by combining steps S301-S302.
[0051] A third aspect of the present invention also provides a computer-readable storage medium including a computer program that, when executed by a processor, implements the above-described correction method.
[0052] In practical applications, a computer-readable storage medium can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. Examples of computer-readable storage media include, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0053] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0054] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0055] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0056] In the description of this specification, references to terms such as "an embodiment," "example," and "specific example" indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0057] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.
Claims
1. An image sensor calibration method, characterized in that, include: Set the sensor operating parameters and collect the corresponding collision point pixel values and pixel correction target values; Construct a mapping relationship between the pixel correction target value and the pixel values of the conflict points to obtain the pixel correction parameters; Select any conflict point location as the conflict reference point location to provide location reference; The real-time operating parameters of the sensors are collected, compared with the reference position of the collision point, and the real-time collision point position is calculated. Obtain the pixel value corresponding to the real-time collision point location, and output the corrected pixel value of the real-time collision point location based on the pixel correction parameters. Methods for identifying conflict points include: Extract the integration time, readout time, and line interval / frame interval from the sensor's operating parameters; Calculate the sum of integration time and readout time; If the sum of the integration time and the readout time is greater than the line interval time / frame interval time, then a conflict point is determined to exist; If the sum of the integration time and the readout time is less than or equal to the line interval time / frame interval time, then it is determined that there is no conflict point; Methods for determining the location of conflict points include: Calculate the difference between the line interval time / frame interval time and the integration time; Receive sensor data output signal command, and after the number of clock cycles corresponding to the above difference, output collision point position signal; The calculated real-time conflict point locations include: Calculate the difference between the line interval time / frame interval time and the integration time corresponding to the conflict reference point position, and output the first constant. Calculate the difference between the actual line interval time / frame interval time and the integration time, and output it as the second constant. Collect the first constant and the second constant, calculate the difference between the second constant and the first constant, and output the difference clock count; Obtain the number of data output channels, calculate the deviation between the real-time collision point location and the collision reference point location, and output the real-time collision point location.
2. The image sensor calibration method according to claim 1, characterized in that, Pixel correction target value acquisition methods include: Control the operation of the sensor; Get the pixel values of adjacent positions of conflict points in each row; Calculate the mean of pixel values at all adjacent locations of conflict points, and output it as the pixel correction target value.
3. The image sensor calibration method according to claim 1, characterized in that, The specific methods for selecting conflict reference points include: Set the minimum line interval time / frame interval time, that is, set the sensor to the maximum line frequency / frame rate; Set the maximum points time; Obtain the location of the conflict point as the reference point for the conflict.
4. An image sensor calibration system, characterized in that, include: Pixel correction module: used to collect the corresponding conflict point pixel values and pixel correction target values, and calculate the pixel correction parameters; Conflict point selection module: Used to select any conflict point location as the conflict reference point location to provide location reference; Position calculation module: used to collect the real-time operating parameters of the sensor, compare them with the reference position of the conflict point, and calculate the real-time position of the conflict point; Pixel output module: used to obtain the pixel value corresponding to the real-time collision point position, and output the pixel value after real-time collision point position correction according to the pixel correction parameters; Methods for identifying conflict points include: Extract the integration time, readout time, and line interval / frame interval from the sensor's operating parameters; Calculate the sum of integration time and readout time; If the sum of the integration time and the readout time is greater than the line interval time / frame interval time, then a conflict point is determined to exist; If the sum of the integration time and the readout time is less than or equal to the line interval time / frame interval time, then it is determined that there is no conflict point; Methods for determining the location of conflict points include: Calculate the difference between the line interval time / frame interval time and the integration time; Receive sensor data output signal command, and after the number of clock cycles corresponding to the above difference, output collision point position signal; The calculated real-time conflict point locations include: Calculate the difference between the line interval time / frame interval time and the integration time corresponding to the conflict reference point position, and output the first constant. Calculate the difference between the actual line interval time / frame interval time and the integration time, and output it as the second constant. Collect the first constant and the second constant, calculate the difference between the second constant and the first constant, and output the difference clock count; Obtain the number of data output channels, calculate the deviation between the real-time collision point location and the collision reference point location, and output the real-time collision point location.
5. The image sensor calibration system according to claim 4, characterized in that, It also includes a conflict point detection module, which is used to extract the integration time, readout time, line interval time / frame interval time from the sensor operating parameters to determine whether there are conflict points.
6. The image sensor calibration system according to claim 4, characterized in that, It also includes a collision point location determination module, which is used to calculate the difference between the line interval time / frame interval time and the integration time, and output the collision point location signal.
7. A computer-readable storage medium comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the correction method as described in any one of claims 1-3.
Citation Information
Patent Citations
Control method, control device, electronic equipment and medium
CN115022548A
High dynamic range image sensor
CN116233636A