Calibration Method, Device, Medium and Financial Machine of CIS Image Sensor

By adjusting the sensor parameters and light source exposure time of the CIS image sensor on financial equipment, combining the bright and dark level parameters, the inhomogeneity problem of CIS image sensor is solved, and high-quality correction effect is achieved, avoiding the dependence of special fixtures and logistics costs.

CN115696072BActive Publication Date: 2025-07-25SHENZHEN YIHUA TIME TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110876418.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-29
Publication Date
2025-07-25
Estimated Expiration
2041-07-29

AI Technical Summary

Technical Problem

The existing CIS image sensors have non-uniformity problems in financial equipment, resulting in poor imaging quality. The correction process requires special fixtures, which increases logistics cost and complexity. At the same time, the impact of the light source on the brightness of the backlight side is not considered, resulting in large differences in brightness between the upper and lower sides of the corrected image.

Method used

By adjusting the sensor parameters of the CIS image sensor, the bright level image of the collected correction paper meets the preset conditions, obtain the adjustment coefficient and light source influence factor, adjust the exposure time of the upper and lower light sources, collect the target bright level image, calculate the bright level and dark level parameters, and finally correct the sensor based on these parameters.

Benefits of technology

The correction is achieved on financial equipment, saving logistics costs for returning to the factory, reducing the complexity of the correction process, and reducing the brightness difference between the upper and lower sides of the corrected image by introducing compensation adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115696072B_ABST
    Figure CN115696072B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of image sensors for financial machines, and discloses a calibration method for a CIS image sensor, including: adjusting sensor parameters to make the bright-level image of the calibration paper collected meet preset conditions; obtaining adjustment coefficients and influence factors; adjusting the exposure duration of the upper and lower light sources according to the adjustment coefficients and influence factors, and collecting the target bright-level image of the calibration paper; calculating bright-level parameters based on the target bright-level image; obtaining dark-level parameters; and calibrating the CIS image sensor according to the adjustment coefficients, dark-level parameters, and bright-level parameters. By completing calibration on financial machines, this solution breaks away from the bondage of relying on special fixtures for calibration, saving the logistics cost of returning to the factory; and introduces influence factors to compensate and adjust the exposure duration of the upper and lower light sources, making the calibrated image output by the CIS image sensor after calibration more accurate. In addition, a calibration device, medium, and financial machine for a CIS image sensor are also disclosed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image sensors for financial instruments, and particularly to a calibration method, device, medium and financial instrument for a CIS image sensor. Background Art

[0002] A CIS (Contact Image Sensor) is a contact image sensor, which is mainly used for collecting banknote discrimination images in the field of financial instruments. The non-uniformity of a CIS image sensor is manifested as irregular vertical stripes in the original CIS image, and the non-uniformity seriously affects the imaging quality. Therefore, non-uniformity correction has become one of the key technologies in CIS image processing.

[0003] To meet different customer requirements or new national standards, or when new technologies emerge that can improve the quality of corrected image signals, the calibration parameters may need to be changed, that is, there is a situation where the CIS image sensor in a financial instrument needs to be recalibrated after leaving the factory, so that the CIS image sensor can output a higher-quality calibrated image.

[0004] In general methods, calibrating a CIS image sensor requires using a special fixture. Through the fixture, the overbank image data of the calibration paper is collected in the form of overbanking for calibration. When calibrating a CIS image sensor using general methods, the financial instrument needs to be returned to the manufacturer for calibration using a special fixture, which will incur additional logistics costs and the process is complex; in addition, in general methods, simultaneous lighting is used on both the upper and lower sides during calibration, without considering the influence of the light source on the brightness of the backlight side, which is likely to cause a large difference in brightness between the upper and lower sides of the calibrated image output by the calibrated CIS image sensor. Summary of the Invention

[0005] Based on this, it is necessary to propose a simple and efficient calibration method, device, medium and financial instrument for a CIS image sensor in view of the above problems.

[0006] A calibration method for a CIS image sensor, the method comprising:

[0007] Adjust the sensor parameters of the CIS image sensor so that the bright-level image of the calibration paper collected meets a preset condition, and use the exposure duration in the adjusted sensor parameters as the initial exposure duration;

[0008] Obtain an adjustment coefficient and an influence factor, where the influence factor refers to the influence factor generated by the light source;

[0009] Adjust the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influence factor to obtain the target exposure duration of the upper and lower light sources;

[0010] Collect the target bright-level image of the calibration paper at the target exposure duration;

[0011] Calculate the bright-level parameter based on the target bright-level image;

[0012] Obtain the dark-level parameter corresponding to the target dark-level image of the calibration paper collected;

[0013] Calibrate the CIS image sensor according to the adjustment coefficient, the dark-level parameter, and the bright-level parameter.

[0014] A calibration device for a CIS image sensor, the device includes:

[0015] A first adjustment module, configured to adjust the sensor parameters of the CIS image sensor so that the bright-level image of the calibration paper collected meets a preset condition, and use the exposure duration in the adjusted sensor parameters as the initial exposure duration;

[0016] A first acquisition module, configured to acquire an adjustment coefficient and an influencing factor, where the influencing factor refers to the influencing factor generated by the light source;

[0017] A second adjustment module, configured to adjust the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influencing factor to obtain the target exposure duration of the upper and lower light sources;

[0018] An acquisition module, configured to collect the target bright-level image of the calibration paper at the target exposure duration;

[0019] A calculation module, configured to calculate the bright-level parameter based on the target bright-level image;

[0020] A second acquisition module, configured to obtain the dark-level parameter corresponding to the target dark-level image of the calibration paper collected;

[0021] A calibration module, configured to calibrate the CIS image sensor according to the adjustment coefficient, the dark-level parameter, and the bright-level parameter.

[0022] A financial appliance, including a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:

[0023] Adjust the sensor parameters of the CIS image sensor so that the bright-level image of the calibration paper collected meets a preset condition, and use the exposure duration in the adjusted sensor parameters as the initial exposure duration;

[0024] Obtain an adjustment coefficient and an influencing factor, where the influencing factor refers to the influencing factor generated by the light source;

[0025] Adjust the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influence factor to obtain the target exposure duration of the upper and lower light sources;

[0026] Collect the target bright-level image of the calibration paper at the target exposure duration;

[0027] Calculate the bright-level parameter based on the target bright-level image;

[0028] Obtain the dark-level parameter corresponding to the target dark-level image of the calibration paper collected;

[0029] Calibrate the CIS image sensor according to the adjustment coefficient, the dark-level parameter, and the bright-level parameter.

[0030] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor performs the following steps:

[0031] Adjust the sensor parameters of the CIS image sensor so that the bright-level image of the calibration paper collected meets a preset condition, and use the exposure duration in the adjusted sensor parameters as the initial exposure duration;

[0032] Obtain an adjustment coefficient and an influence factor, where the influence factor refers to the influence factor generated by the light source;

[0033] Adjust the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influence factor to obtain the target exposure duration of the upper and lower light sources;

[0034] Collect the target bright-level image of the calibration paper at the target exposure duration;

[0035] Calculate the bright-level parameter based on the target bright-level image;

[0036] Obtain the dark-level parameter corresponding to the target dark-level image of the calibration paper collected;

[0037] Calibrate the CIS image sensor according to the adjustment coefficient, the dark-level parameter, and the bright-level parameter.

[0038] The calibration method, device, medium and financial appliance of the above-mentioned CIS image sensor first adjust the sensor parameters of the CIS image sensor so that the bright-level image of the calibration paper collected conforms to the preset conditions, and use the exposure duration in the adjusted sensor parameters as the initial exposure duration; then obtain the adjustment coefficient and the influencing factor, where the influencing factor refers to the influencing factor generated by the light source; adjust the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influencing factor to obtain the target exposure duration of the upper and lower light sources; then collect the target bright-level image of the calibration paper at the target exposure duration; calculate the bright-level parameter according to the target bright-level image; then obtain the dark-level parameter corresponding to the target dark-level image of the calibration paper collected; finally, calibrate the CIS image sensor according to the adjustment coefficient, the dark-level parameter, and the bright-level parameter. This solution completes the calibration of the CIS image sensor by directly collecting data, adjusting parameters, calculating parameters, etc. on the financial appliance, breaking away from the bondage of relying on special jigs for calibration, and saving the logistics cost of the financial appliance returning to the factory; and an influencing factor is introduced during the calibration process, and the exposure duration of the upper and lower light sources is compensated and adjusted according to the influencing factor, so that the brightness difference between the upper and lower sides of the calibrated image output by the CIS image sensor is within an acceptable range. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to these drawings.

[0040] Among them:

[0041] Figure 1 is the implementation flowchart of the calibration method of the CIS image sensor in an embodiment;

[0042] Figure 2 is the structural block diagram of the calibration device of the CIS image sensor in an embodiment;

[0043] Figure 3 is the structural block diagram of a financial appliance in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0045] As Figure 1 shown, a calibration method for a CIS image sensor is proposed, and the method includes:

[0046] Step 102, adjusting the sensor parameters of the CIS image sensor so that the bright-level image of the calibration paper collected conforms to a preset condition, and taking the exposure duration in the adjusted sensor parameters as the initial exposure duration.

[0047] Among them, the sensor parameters refer to the adjustable parameters provided by the current application mode of the CIS image sensor, including gain parameters, bias parameters, exposure duration, and current parameters. Different image data can be collected by adjusting the above sensor parameters; the initial exposure duration refers to the exposure duration when it is detected that the bright-level image of the calibration paper collected conforms to the preset condition.

[0048] Among them, the bright-level image refers to the image collected when both the exposure duration and the current parameter in the sensor parameters are not 0.

[0049] Among them, the calibration paper is a special calibration paper. When calibrating the CIS image sensor, different special calibration papers are used for the relevant calibrations of different lights, so as to output a stable calibration image when collecting images under different lights; the different lights include: visible light, ultraviolet light, infrared light, and transmitted light. In one embodiment, the visible light calibration paper is statically covered on the CIS image sensor of the financial appliance in advance, and the visible light calibration parameters are calibrated according to the image data of the visible light calibration paper collected; after the visible light calibration parameters are calibrated, the special calibration paper corresponding to ultraviolet light is replaced, and the calibration process of the ultraviolet light calibration parameters is carried out.

[0050] By collecting the image data of the calibration paper statically covering the CIS image sensor of the financial instrument, the calibration of the CIS image sensor can be completed, which simplifies the calibration process. There is no need to return to the factory and rely on special fixtures for calibration, saving the logistics cost of transporting the financial instrument. At the same time, the form of static data collection is simpler and faster than the banknote passing collection in the general method. It will not cause calculation result deviation due to factors such as creases, unevenness, and skew during banknote passing of the calibration paper, and also reduces the loss of the calibration paper. In addition, when collecting data by passing banknotes, it is also necessary to keep the passing parts of the fixture and the calibration paper clean. If the calibration paper is contaminated during the banknote passing process, it will affect the calibration effect. When collecting statically, it is only necessary to ensure that the surface of the CIS image sensor and the calibration paper are clean, and the conditions are easier to achieve.

[0051] Step 104, obtain the adjustment coefficient and the influence factor, where the influence factor refers to the influence factor generated by the light source.

[0052] Among them, the adjustment coefficient is a coefficient used to adjust the exposure duration and calibration calculation. There is an approximately linear relationship between the exposure duration and the brightness of the collected image, and the adjustment coefficient is the slope value in this linear relationship.

[0053] Among them, the influence factor is calculated based on the image brightness data on the backlight side collected when the light source performs single-sided lighting, representing the degree of influence of the light source on the brightness of the backlight side. Introducing the influence factor to calculate the calibration parameters, the obtained calibration parameters can well reduce the brightness difference between the two sides of the calibrated image and are more applicable.

[0054] Step 106, adjust the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influence factor to obtain the target exposure duration of the upper and lower light sources.

[0055] Among them, the CIS image sensor device in the financial instrument is generally composed of two CIS image sensor parts, which are installed in an up-and-down relative manner. Each CIS image sensor part has its own light source. After installation, the light sources of the upper and lower parts are symmetrical, and the sensor parameters of the upper and lower parts can be adjusted separately.

[0056] Among them, after collecting the bright level image that meets the preset conditions, the bright level image is still not the final target bright level image. It is necessary to further adjust the exposure duration according to the influence factor and the adjustment coefficient to obtain the target bright level image, so that the calibration parameters calculated based on the target bright level image can effectively reduce the brightness difference between the two sides of the calibrated image.

[0057] Furthermore, to reduce the brightness difference between the two sides of the calibrated image, it is necessary to adjust the initial exposure duration of the upper and lower light sources separately according to the influence factors corresponding to each light source, and finally obtain the target exposure duration of the upper and lower light sources.

[0058] Step 108: Collect the target bright-level image of the calibration paper at the target exposure duration.

[0059] The target bright-level image refers to a bright-level image whose brightness mean value and pixel values of the image both meet preset conditions and is collected by further adjusting the exposure duration according to influencing factors.

[0060] Step 110: Calculate the bright-level parameter based on the target bright-level image.

[0061] The bright-level parameter is an important parameter required for the calibration of the CIS image sensor. It can be data such as pixel values, brightness values, row and column brightness means of the target bright-level image, and is saved in the CIS image sensor in the form of an array.

[0062] The row and column brightness means refer to when the CIS image sensor collects data row by row or column by column, the brightness data of each row or column is collected, and the row and column brightness means are obtained by calculating the brightness data.

[0063] In one embodiment, both the bright-level parameter and the dark-level parameter are arrays composed of column brightness means, corresponding to the column-by-column acquisition method of the CIS image sensor. The brightness means of all columns in the target bright-level image form an array and are saved as the bright-level parameter; the brightness means of all columns in the target dark-level image form an array and are saved as the dark-level parameter.

[0064] Step 112: Obtain the dark-level parameter corresponding to the target dark-level image of the calibration paper collected.

[0065] The dark-level image refers to an image collected when the exposure duration and current parameter of the CIS image sensor are both set to 0, and the target dark-level image refers to a dark-level image that meets another preset condition.

[0066] The dark-level parameter is an important parameter required for the calibration of the CIS image sensor. It can be data such as pixel values, brightness values, row and column brightness means of the target dark-level image, and is saved in the CIS image sensor in the form of an array. It can be understood that the data types of the dark-level parameter should correspond to those of the bright-level parameter.

[0067] Step 114: Calibrate the CIS image sensor according to the adjustment coefficient, the dark-level parameter, and the bright-level parameter.

[0068] There is a preset calibration formula in the CIS image sensor. After calculating the adjustment coefficient, the dark-level parameter, and the bright-level parameter, the above parameters are updated and set into the formula to complete the calibration.

[0069] In one embodiment, the preset calibration formula in the CIS image sensor is as follows:

[0070] y = ((xi - di) / (wi - di)) * k

[0071] Where y is the calibrated image data, xi is the original data collected by the CIS image sensor, di is the dark level parameter, wi is the bright level parameter, and k is the adjustment coefficient.

[0072] It can be understood that the sensor parameters when the target bright level image is collected are saved as calibration parameters at the same time to ensure the accuracy of calibration. In one embodiment, after the visible light related calibration of the CIS image sensor is completed, the sensor parameters when the target bright level image is collected are saved and called during the subsequent calibration work of the visible light image to ensure the calibration accuracy of the visible light image.

[0073] For the above calibration method of the CIS image sensor, first, adjust the sensor parameters of the CIS image sensor so that the bright level image of the calibration paper collected meets the preset conditions, and use the exposure duration in the adjusted sensor parameters as the initial exposure duration; then obtain the adjustment coefficient and the influencing factor, where the influencing factor refers to the influencing factor generated by the light source; adjust the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influencing factor to obtain the target exposure duration of the upper and lower light sources; then collect the target bright level image of the calibration paper at the target exposure duration; calculate the bright level parameter according to the target bright level image; then obtain the dark level parameter corresponding to the target dark level image of the calibration paper collected; finally, calibrate the CIS image sensor according to the adjustment coefficient, the dark level parameter, and the bright level parameter. This solution completes the calibration of the CIS image sensor by directly collecting data, adjusting parameters, calculating parameters, etc. in the financial instrument, breaking away from the bondage of relying on special jigs for calibration, saving the logistics cost of the financial instrument returning to the factory; and introducing the influencing factor during the calibration process, compensating and adjusting the exposure duration of the upper and lower light sources according to the influencing factor, so that the brightness difference between the upper and lower sides of the calibrated image output by the CIS image sensor is within an acceptable range.

[0074] In one embodiment, the CIS image sensor includes a plurality of upper and lower symmetric light sources, where two upper and lower symmetric light sources are a group; before obtaining the adjustment coefficient and the influencing factor, it further includes: each light source irradiates the calibration paper unidirectionally in a time-sharing manner, collects the image data of the corresponding backlight surface, and calculates the influencing factor corresponding to each light source according to the image data of the backlight surface.

[0075] Among them, each light source in the CIS image sensor irradiates the calibration paper unidirectionally in sequence, and image data of the backlight surface corresponding to each light source's unidirectional irradiation is collected. In one embodiment, the brightness average value of the backlight surface is calculated based on the image data of the backlight surface, and the brightness average value is used as the influence factor of the light source to represent the light transmission brightness of the light source.

[0076] By means of time-sharing light irradiation, interference from other light sources can be excluded, and the influence factor of each light source on the brightness of the backlight side can be obtained more accurately, and the calculated calibration parameters are also more effective.

[0077] In one embodiment, when each light source performs unidirectional irradiation to calculate the influence factor, the exposure duration of the light sources on the same side is set to one-half of the maximum exposure duration for time-sharing irradiation; the exposure duration of the light sources on the other side is set to 0. According to the data in actual application, the influence factor calculated by setting the exposure duration to one-half of the maximum exposure duration is more accurate.

[0078] In one embodiment, adjusting the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influence factor to obtain the target exposure duration of the upper and lower light sources includes: calculating the difference between the two influence factors of each group of light sources in the CIS image sensor, and determining the number of groups where the difference is greater than a preset threshold; when the number of groups where the difference is greater than the preset threshold is N, adjusting the initial exposure duration of the upper and lower light sources N times according to the adjustment coefficient and the influence factor, where N is an integer greater than or equal to 0, to obtain the target exposure duration of the upper and lower light sources.

[0079] Among them, when the CIS image sensor collects data, it is basically light-irradiated simultaneously from above and below. Therefore, when considering the influence of light transmission brightness, the two symmetric upper and lower light sources should be considered as a group simultaneously, and the two influence factors corresponding to a group of light sources should also be calculated together when calculating the influence factor.

[0080] Furthermore, the purpose of introducing the influence factor to calculate the calibration parameter is to control the brightness difference between the upper and lower parts of the calibrated image within an acceptable range. Therefore, when the difference between the two influence factors in a group of light sources is less than the preset threshold, it can be considered that the influence of the light transmission brightness of the two light sources in the current group is relatively small and will not affect the brightness difference between the upper and lower parts of the calibrated image; when the difference between the two influence factors in a group of light sources is greater than the preset threshold, the initial exposure duration of the upper and lower light sources needs to be adjusted once to control the brightness of the upper and lower images. In one embodiment, the preset threshold is 5.

[0081] It is worth mentioning that before adjusting the exposure duration of the upper and lower light sources, the image data collected under the initial exposure duration condition already meets the preset conditions of the brightness value and the pixel value. Adjusting the exposure duration of the upper and lower light sources slightly according to the influence factor and the adjustment coefficient is a trade-off relationship and will not have a great impact on the average brightness of the image.

[0082] By jointly introducing the influence factors of the symmetric upper and lower light sources into the calculation of the correction parameters, the brightness difference of the corrected image can be controlled more precisely; by respectively increasing and decreasing the compensation adjustment of the exposure duration of the upper and lower light sources, the influence of the light source on the backlit surface can be reduced without having a great impact on the average brightness of the image.

[0083] In one embodiment, adjusting the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influence factor to obtain the target exposure duration of the upper and lower light sources includes: obtaining the magnitudes of the two influence factors in the group where the difference is greater than the preset threshold, taking the light source with the larger influence factor as the first light source, and taking the light source with the smaller influence factor as the second light source; reducing the exposure duration of the first light source and the light sources on the same side as the first light source by a first amplitude, and increasing the exposure duration of the second light source and the light sources on the same side as the second light source by a second amplitude, where the first amplitude and the second amplitude are determined by the difference and the adjustment coefficient.

[0084] Among them, in order to control the upper and lower brightness difference of the corrected image within an acceptable range, the exposure duration of the light source with a large influence factor is reduced, and the exposure duration of the light source with a small influence factor is increased for compensation adjustment. The direct brightness and the transmitted light brightness of the collected images increase and decrease respectively, and the brightness difference between the upper and lower images is reduced.

[0085] Among them, the first amplitude is less than the second amplitude. In actual tests, when compensating and adjusting the exposure duration of the upper and lower light sources, a smaller reduction amplitude than the increase amplitude can obtain a better adjustment effect, and the final brightness difference between the upper and lower images is smaller.

[0086] In one embodiment, the influence factor of the first light source is A1, the influence factor of the second light source is A2, the difference of the influence factors dif = |A1 - A2|, the light source with the larger influence factor is the upper light source, and the exposure duration of all upper light sources is reduced and adjusted specifically as gs1’ = gs1 - k * dif / 2; the light source with the smaller influence factor is the lower light source, and the exposure duration of all lower light sources is increased and adjusted specifically as gs2’ = gs2 + k * dif; where gs is the exposure duration and k is the adjustment coefficient.

[0087] In one embodiment, before obtaining the dark level parameter corresponding to the target dark level image of the calibration paper obtained by acquisition, it includes: initializing the sensor parameters, acquiring the dark level image of the calibration paper; when the dark level image of the calibration paper does not meet the first preset condition, adjusting the bias parameter in the sensor parameters until the dark level image of the calibration paper meets the first preset condition; using the dark level image of the calibration paper that meets the first preset condition as the target dark level image of the calibration paper, and calculating the dark level parameter based on the target dark level image.

[0088] Among them, when acquiring the dark level image, the exposure duration and current parameters of the CIS image sensor need to be set to 0. In one embodiment, initialize the sensor parameters, adjust the gain parameter and the bias parameter to preset values, adjust the exposure duration and current parameters to 0, and then acquire the dark level image of the calibration value.

[0089] By adjusting the bias parameter to obtain a representative target dark level image whose pixel values meet the first preset condition, more accurate dark level parameters can be calculated based on the target dark level image, and thus the image quality corrected according to the dark level parameters is better.

[0090] In one embodiment, calculate the mean value of the image pixel values in the 6-section bias offset area of the acquired dark level image. When the calculated mean value is less than 40 and there is no pixel value less than or equal to 0, it is regarded as meeting the first preset condition, and use the dark level image that meets the first preset condition as the target dark level image to calculate the dark level parameter.

[0091] In one embodiment, adjusting the sensor parameters of the CIS image sensor to make the acquired bright level image of the calibration paper meet the preset condition includes: obtaining the first preset exposure duration and preset current parameters, acquiring the bright level image of the calibration paper according to the first preset exposure duration and the preset current parameters; when the bright level image of the calibration paper does not meet the second preset condition, adjusting the exposure duration according to the adjustment coefficient until the bright level image of the calibration paper meets the second preset condition; when adjusting the exposure duration cannot make the bright level image meet the second preset condition, then adjust the current parameter once, and restore the exposure duration to the first preset exposure duration, and acquire the bright level image of the calibration paper; enter the step of when the bright level image of the calibration paper does not meet the second preset condition, adjusting the exposure duration according to the adjustment coefficient until the bright level image of the calibration paper meets the second preset condition.

[0092] Among them, the two sensor parameters of exposure duration and current parameter can be adjusted to make the acquired bright-level image meet the second preset condition; the exposure duration is preferentially adjusted, and when the adjustment of the exposure duration fails to achieve the purpose, the current parameter is adjusted once, and then the adjustment of the exposure duration is continued until a bright-level image that meets the second preset condition is acquired.

[0093] Similarly to the dark-level parameter, a representative target bright-level image with a brightness mean value meeting the preset standard is obtained through the preset limit condition, and thus the calculated bright-level parameter is more accurate and the corrected image quality is better.

[0094] In one embodiment, the brightness mean value of the acquired bright-level image of the calibration paper is calculated. When the calculated brightness mean value is greater than 180 and there is no pixel value greater than or equal to 255, it is regarded as meeting the first preset condition.

[0095] In one embodiment, the target brightness mean value of the first preset condition is 175 - 185, and the formula for adjusting the exposure duration is gs’ = gs + k * (mean - 180), where gs is the exposure duration, k is the adjustment coefficient, and mean is the brightness mean value of the image acquired at the current exposure duration.

[0096] In one embodiment, before obtaining the adjustment coefficient and the influence factor, it further includes: obtaining a second preset exposure duration and a third preset exposure duration; acquiring the image data of the calibration paper according to the first preset exposure duration, and calculating a first image brightness mean value according to the image data; acquiring the image data of the calibration paper according to the third preset exposure duration, and calculating a second image brightness mean value according to the image data; calculating the adjustment coefficient according to the second preset exposure duration, the third preset exposure duration, the first image brightness mean value, and the second image brightness mean value.

[0097] Among them, there is an approximately linear relationship between the exposure duration of the CIS image sensor and the brightness mean value of the acquired image. Therefore, by acquiring two brightness mean values at two exposure durations, the slope value of the linear relationship can be calculated, and the slope value is used as the adjustment coefficient for adjusting the exposure duration.

[0098] Using the slope value of the linear relationship between the exposure duration and the image brightness mean value as the adjustment coefficient can effectively control the brightness mean value of the image by adjusting the exposure duration, and thus obtain an image with a brightness mean value meeting the requirements.

[0099] As Figure 2 shown, a calibration device for a CIS image sensor is proposed, and the device includes:

[0100] The first adjustment module 10 is configured to adjust the sensor parameters of the CIS image sensor so that the bright-level image of the calibration paper collected meets a preset condition, and use the exposure duration in the adjusted sensor parameters as the initial exposure duration;

[0101] The first acquisition module 20 is configured to acquire an adjustment coefficient and an influence factor, where the influence factor refers to the influence factor generated by the light source;

[0102] The second adjustment module 30 is configured to adjust the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influence factor to obtain the target exposure duration of the upper and lower light sources;

[0103] The acquisition module 40 is configured to acquire the target bright-level image of the calibration paper at the target exposure duration;

[0104] The calculation module 50 is configured to calculate a bright-level parameter according to the target bright-level image;

[0105] The second acquisition module 60 is configured to acquire a dark-level parameter corresponding to the target dark-level image of the calibration paper collected;

[0106] The calibration module 70 is configured to calibrate the CIS image sensor according to the adjustment coefficient, the dark-level parameter, and the bright-level parameter.

[0107] In one embodiment, the CIS image sensor includes a plurality of symmetrically arranged upper and lower light sources, where two symmetrically arranged upper and lower light sources form a group; before acquiring the adjustment coefficient and the influence factor, it further includes: each light source irradiates the calibration paper unidirectionally in a time-sharing manner, acquires image data of the corresponding backlight surface, and calculates the influence factor corresponding to each light source according to the image data of the backlight surface.

[0108] In one embodiment, the adjusting the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influence factor to obtain the target exposure duration of the upper and lower light sources includes: calculating the difference between the two influence factors of each group of light sources in the CIS image sensor, and determining the number of groups where the difference is greater than the preset threshold; when the number of groups where the difference is greater than the preset threshold is N, adjusting the initial exposure duration of the upper and lower light sources N times according to the adjustment coefficient and the influence factor, where N is an integer greater than or equal to 0, to obtain the target exposure duration of the upper and lower light sources.

[0109] In one embodiment, adjusting the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influence factor to obtain the target exposure duration of the upper and lower light sources includes: obtaining the magnitudes of two influence factors in the group where the difference is greater than a preset threshold, taking the light source with the larger influence factor as the first light source, and taking the light source with the smaller influence factor as the second light source; reducing the exposure duration of the first light source and the light sources on the same side as the first light source by a first amplitude, and increasing the exposure duration of the second light source and the light sources on the same side as the second light source by a second amplitude, where the first amplitude and the second amplitude are determined by the difference and the adjustment coefficient.

[0110] In one embodiment, before obtaining the dark level parameter corresponding to the target dark level image of the calibration paper collected, it includes: initializing the sensor parameters, and collecting the dark level image of the calibration paper; when the dark level image of the calibration paper does not meet the first preset condition, adjusting the bias parameter in the sensor parameters until the dark level image of the calibration paper meets the first preset condition; taking the dark level image of the calibration paper that meets the first preset condition as the target dark level image of the calibration paper, and calculating the dark level parameter according to the target dark level image.

[0111] In one embodiment, adjusting the sensor parameters of the CIS image sensor to make the bright level image of the calibration paper collected meet the preset condition includes: obtaining a first preset exposure duration and a preset current parameter, and collecting the bright level image of the calibration paper according to the first preset exposure duration and the preset current parameter; when the bright level image of the calibration paper does not meet the second preset condition, adjusting the exposure duration according to the adjustment coefficient until the bright level image of the calibration paper meets the second preset condition; when adjusting the exposure duration cannot make the bright level image meet the second preset condition, adjusting the current parameter once, and restoring the exposure duration to the first preset exposure duration, and collecting the bright level image of the calibration paper; entering the step of when the bright level image of the calibration paper does not meet the second preset condition, adjusting the exposure duration according to the adjustment coefficient until the bright level image of the calibration paper meets the second preset condition.

[0112] In one embodiment, before obtaining the adjustment coefficient and the influence factor, the method further includes: obtaining a second preset exposure duration and a third preset exposure duration; collecting image data of the calibration paper according to the first preset exposure duration, and calculating a first image brightness average value according to the image data; collecting image data of the calibration paper according to the third preset exposure duration, and calculating a second image brightness average value according to the image data; calculating the adjustment coefficient according to the second preset exposure duration, the third preset exposure duration, the first image brightness average value, and the second image brightness average value.

[0113] Figure 3 FIG. shows an internal structure diagram of a financial machine in one embodiment. As Figure 3 shown, the financial machine includes a processor, a memory, and a network interface connected through a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the financial machine stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement a calibration method for a CIS image sensor. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can execute the calibration method for the CIS image sensor. Those skilled in the art can understand that Figure 3 the structure shown in is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the financial machine to which the solution of the present application is applied. The specific financial machine may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0114] In one embodiment, a financial machine is provided, including a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor performs the following steps:

[0115] Adjust the sensor parameters of the CIS image sensor so that the bright-level image of the calibration paper collected meets a preset condition, and use the exposure duration in the adjusted sensor parameters as the initial exposure duration; obtain an adjustment coefficient and an influence factor, where the influence factor refers to the influence factor generated by the light source; adjust the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influence factor to obtain the target exposure duration of the upper and lower light sources; collect the target bright-level image of the calibration paper at the target exposure duration; calculate a bright-level parameter according to the target bright-level image; obtain the dark-level parameter corresponding to the target dark-level image of the calibration paper collected; calibrate the CIS image sensor according to the adjustment coefficient, the dark-level parameter, and the bright-level parameter.

[0116] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which when executed by a processor, causes the processor to perform the following steps:

[0117] Adjust the sensor parameters of the CIS image sensor so that the bright-level image of the calibration paper collected conforms to a preset condition, and use the exposure duration in the adjusted sensor parameters as the initial exposure duration; obtain an adjustment coefficient and an influence factor, where the influence factor refers to the influence factor generated by the light source; adjust the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influence factor to obtain the target exposure duration of the upper and lower light sources; collect the target bright-level image of the calibration paper at the target exposure duration; calculate the bright-level parameter according to the target bright-level image; obtain the dark-level parameter corresponding to the target dark-level image of the collected calibration paper; and calibrate the CIS image sensor according to the adjustment coefficient, the dark-level parameter, and the bright-level parameter.

[0118] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The 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. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0119] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as the scope recorded in this specification.

[0120] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.

Claims

1. A calibration method for a CIS image sensor, the method comprising: Obtaining a second preset exposure duration and a third preset exposure duration; Collecting image data of a calibration paper according to the second preset exposure duration, and calculating a first image brightness average value according to the image data; Collecting image data of the calibration paper according to the third preset exposure duration, and calculating a second image brightness average value according to the image data; Calculating an adjustment coefficient according to the second preset exposure duration, the third preset exposure duration, the first image brightness average value, and the second image brightness average value; Adjusting the sensor parameters of the CIS image sensor so that the bright-level image of the calibration paper collected meets a preset condition, and taking the exposure duration in the adjusted sensor parameters as the initial exposure duration; Obtaining an adjustment coefficient and an influence factor, where the influence factor refers to the influence factor generated by a light source; Adjusting the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influence factor to obtain the target exposure duration of the upper and lower light sources; Collecting a target bright-level image of the calibration paper at the target exposure duration; Calculating a bright-level parameter according to the target bright-level image; Initializing the sensor parameters, and obtaining a dark-level parameter corresponding to the target dark-level image of the calibration paper collected; Calibrating the CIS image sensor according to the adjustment coefficient, the dark-level parameter, and the bright-level parameter.

2. The calibration method of the CIS image sensor according to claim 1, wherein The CIS image sensor includes a plurality of symmetrically arranged upper and lower light sources, where two symmetrically arranged upper and lower light sources are a group; before obtaining the adjustment coefficient and the influence factor, it further includes: Each light source irradiates the calibration paper unidirectionally in a time-sharing manner, collecting image data of the corresponding backlight surface, and calculating the influence factor corresponding to each light source according to the image data of the backlight surface.

3. The calibration method of the CIS image sensor according to claim 2, characterized in that, The adjusting the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influence factor to obtain the target exposure duration of the upper and lower light sources includes: Calculating the difference between the two influence factors of each group of light sources in the CIS image sensor, and determining the number of groups where the difference is greater than a preset threshold; When the number of groups where the difference is greater than the preset threshold is N, adjusting the initial exposure duration of the upper and lower light sources N times according to the adjustment coefficient and the influence factor, where N is an integer greater than or equal to 0, to obtain the target exposure duration of the upper and lower light sources.

4. The calibration method of the CIS image sensor according to claim 3, characterized in that, The adjusting the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influence factor to obtain the target exposure duration of the upper and lower light sources includes: Obtaining the magnitudes of the two influence factors in the group where the difference is greater than the preset threshold, taking the light source with the larger influence factor as the first light source, and taking the light source with the smaller influence factor as the second light source; Reducing and adjusting the exposure duration of the first light source and the light sources on the same side as the first light source by a first amplitude, and increasing and adjusting the exposure duration of the second light source and the light sources on the same side as the second light source by a second amplitude, where the first amplitude and the second amplitude are determined by the difference and the adjustment coefficient.

5. The calibration method of the CIS image sensor according to claim 1, wherein Before obtaining the dark level parameter corresponding to the target dark level image of the calibration paper obtained by acquisition, it includes: Initializing the sensor parameters and acquiring the dark level image of the calibration paper; When the dark level image of the calibration paper does not meet the first preset condition, adjusting the bias parameter in the sensor parameters until the dark level image of the calibration paper meets the first preset condition; Taking the dark level image of the calibration paper that meets the first preset condition as the target dark level image of the calibration paper, and calculating the dark level parameter according to the target dark level image.

6. The calibration method of the CIS image sensor according to claim 1, characterized in that, Adjusting the sensor parameters of the CIS image sensor so that the bright level image of the calibration paper acquired meets the preset condition, including: Obtaining a first preset exposure duration and a preset current parameter, and acquiring the bright level image of the calibration paper according to the first preset exposure duration and the preset current parameter; When the bright level image of the calibration paper does not meet the second preset condition, adjusting the exposure duration according to the adjustment coefficient until the bright level image of the calibration paper meets the second preset condition; When adjusting the exposure duration cannot make the bright level image meet the second preset condition, adjusting the current parameter once and restoring the exposure duration to the first preset exposure duration, and acquiring the bright level image of the calibration paper; Entering the step of when the bright level image of the calibration paper does not meet the second preset condition, adjusting the exposure duration according to the adjustment coefficient until the bright level image of the calibration paper meets the second preset condition.

7. A calibration device for a CIS image sensor, characterized in that, The device includes: An adjustment coefficient calculation module, configured to obtain a second preset exposure duration and a third preset exposure duration; Acquiring the image data of the calibration paper according to the second preset exposure duration, and calculating a first image brightness average value according to the image data; Acquiring the image data of the calibration paper according to the third preset exposure duration, and calculating a second image brightness average value according to the image data; Calculating an adjustment coefficient according to the second preset exposure duration, the third preset exposure duration, the first image brightness average value and the second image brightness average value; A first adjustment module, configured to adjust the sensor parameters of the CIS image sensor so that the bright level image of the calibration paper acquired meets the preset condition, and taking the exposure duration in the adjusted sensor parameters as the initial exposure duration; A first acquisition module, configured to acquire an adjustment coefficient and an influence factor, where the influence factor refers to the influence factor generated by the light source; A second adjustment module, configured to adjust the initial exposure duration of the upper and lower light sources according to the adjustment coefficient and the influence factor to obtain the target exposure duration of the upper and lower light sources; An acquisition module, configured to acquire the target bright level image of the calibration paper at the target exposure duration; A calculation module, configured to calculate a bright level parameter according to the target bright level image; A second acquisition module, initializing the sensor parameters, configured to obtain the dark level parameter corresponding to the target dark level image of the calibration paper acquired. A calibration module, configured to calibrate the CIS image sensor according to the adjustment coefficient, the dark level parameter, and the bright level parameter.

8. A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method according to any one of claims 1 to 6.

9. A financial machine, comprising a memory and a processor, the memory storing a computer program, which, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Calibration of defective image sensor elements

    CN108028895A

  • Image calibration method and device

    US20160198066A1