CN113256872A - Image sensor parameter configuration method and device, computer equipment and storage medium - Google Patents

Image sensor parameter configuration method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113256872A
CN113256872A CN202011634398.6A CN202011634398A CN113256872A CN 113256872 A CN113256872 A CN 113256872A CN 202011634398 A CN202011634398 A CN 202011634398A CN 113256872 A CN113256872 A CN 113256872A
Authority
CN
China
Prior art keywords
image sensor
value
parameter
image
medium
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011634398.6A
Other languages
Chinese (zh)
Other versions
CN113256872B (en
Inventor
赖伟
陈骏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Yihua Information Technology Co ltd
Shenzhen Yihua Financial Equipment Manufacturing Co ltd
Shenzhen Yihua Computer Co Ltd
Original Assignee
Nanjing Yihua Information Technology Co ltd
Shenzhen Yihua Financial Equipment Manufacturing Co ltd
Shenzhen Yihua Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Yihua Information Technology Co ltd, Shenzhen Yihua Financial Equipment Manufacturing Co ltd, Shenzhen Yihua Computer Co Ltd filed Critical Nanjing Yihua Information Technology Co ltd
Priority to CN202011634398.6A priority Critical patent/CN113256872B/en
Publication of CN113256872A publication Critical patent/CN113256872A/en
Application granted granted Critical
Publication of CN113256872B publication Critical patent/CN113256872B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/20Testing patterns thereon
    • G07D7/2075Setting acceptance levels or parameters

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Image Input (AREA)

Abstract

The embodiment of the invention discloses a method and a device for configuring parameters of an image sensor, computer equipment and a storage medium, wherein the method comprises the following steps: adjusting the working parameters of the image sensor until the working parameters meet preset conditions; acquiring dark data acquired by the image sensor under the adjusted working parameters, bright data corresponding to a correction medium and a test image corresponding to a test medium; correcting the test image according to the dark data, the bright data and the test image corresponding to the test medium to obtain a corrected target image of the test medium; if the correction is determined to be successful according to the target image, determining the adjusted working parameters as final working parameters; and if the correction is determined to fail according to the target image, returning to the step of adjusting the configured working parameters of the image sensor until the working parameters meet the preset conditions. By adopting the embodiment of the invention, the accuracy of the correction process and the quality of the image acquired by the image sensor are improved.

Description

Image sensor parameter configuration method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for configuring parameters of an image sensor, a computer device, and a storage medium.
Background
When the identification module in the financial machine tool in the prior art identifies the bank notes, the identification module mainly depends on the image sensor, so the quality of image data acquired by the image sensor has important influence on the identification result.
The image sensor itself is composed of a plurality of photosensitive elements, and there are individual differences between the photosensitive elements; the brightness difference of the light source exists between different image sensors; there is also a difference in mounting size in the structure. These all lead to a degradation of the quality of the acquired image. Therefore, after the recognition module is mounted, the image sensor must be corrected.
Disclosure of Invention
In view of the above, it is necessary to provide a parameter configuration method for an image sensor, aiming at improving the quality of the banknote image captured by the image sensor.
The invention adopts a technical means as follows: the image sensor parameter configuration method comprises the following steps:
adjusting the working parameters of the image sensor until the working parameters meet preset conditions;
acquiring dark data acquired by the image sensor under the adjusted working parameters, bright data corresponding to a correction medium and a test image corresponding to a test medium;
correcting the test image according to the dark data, the bright data and the test image corresponding to the test medium to obtain a corrected target image of the test medium;
if the correction is determined to be successful according to the target image, determining the adjusted working parameter as a final working parameter;
and if the correction is determined to fail according to the target image, returning to the step of adjusting the configured working parameters of the image sensor until the working parameters meet preset conditions.
In one embodiment, the method further comprises:
calculating row consistency and column gradient according to pixel values of pixel points contained in the target image;
determining that the correction is successful when the row consistency meets a first verification threshold while the column gradient meets a second verification threshold;
determining that correction failed when the row consistency does not satisfy the first verification threshold, and/or the column gradient does not satisfy a second verification threshold.
In one embodiment, if the operating parameter includes a constant current source parameter, adjusting the configured operating parameter of the image sensor until the operating parameter satisfies a preset condition, including:
acquiring an nth white reference data mean value acquired by the image sensor under the current working parameters;
when the absolute value of the difference between the nth white reference data mean value and a preset first target pixel value is smaller than or equal to a preset first threshold value, determining that the nth constant current source parameter in the current working parameters meets a preset first condition;
and when the absolute value of the difference between the nth white reference data mean value and a preset first target pixel value is greater than the preset first threshold value, calculating an adjusted (n + 1) th constant current source parameter by using the nth constant current source parameter and the nth white reference data mean value, enabling n to be n +1, and returning to execute the step of obtaining the nth white reference data mean value acquired by the image sensor under the current working parameter.
In one embodiment, if the working parameter includes an AD parameter, adjusting the configured working parameter of the image sensor until the working parameter satisfies a preset condition, including:
acquiring an nth dark data mean value acquired by the image sensor under the current working parameters;
when the absolute value of the difference between the nth dark data mean value and a preset second target pixel value is smaller than or equal to a preset second threshold value, determining that the nth AD parameter in the current working parameters meets a preset second condition;
and when the absolute value of the difference between the nth dark data mean value and a preset second target pixel value is greater than the preset second threshold value, calculating an adjusted (n + 1) th AD parameter by using the nth AD parameter and the nth dark data mean value, enabling n to be n +1, and returning to execute the step of obtaining the nth dark data mean value acquired by the image sensor under the current working parameter.
In one embodiment, the corrected target image of the test medium is obtained by the following formula,
Figure BDA0002875871110000031
wherein y is a target image after the test medium is corrected under different light sources, X is a test image of the test medium, P is the bright data of the correction medium under different current light sources, and d is the dark data of the image sensor based on current working parameters.
In one embodiment, the row uniformity is a row mobility, calculated by the following formula:
Figure BDA0002875871110000032
wherein σ2Is the traveling wave velocity, y is the corrected target image of the test medium under different light sources, yμThe pixel mean value of a plurality of pixel points of the target image is obtained, and N is the total number of the pixel points in each row.
In one embodiment, the column gradient is a gray scale deviation ratio, calculated by the following formula:
Figure BDA0002875871110000033
wherein alpha is2Is the ratio of the gray scale deviation, S1Is the pixel mean value, S, of the pixels of a plurality of consecutive lines with a gray value of 82Is the pixel mean value, S, of the pixels of a plurality of consecutive lines with a gray value of 83Is the pixel mean value, S, of the pixels of a plurality of consecutive lines with a gray value of 164Is the pixel mean value, S, of the pixels of a plurality of consecutive lines with a gray value of 325Is the pixel mean value, S, of the pixels of a plurality of consecutive lines with a gray value of 646Is the pixel average value of the pixel points of a plurality of continuous lines with the gray value of 128.
The present invention also provides an image recognition apparatus comprising:
the banknote digging module is used for accommodating a correction medium and a test medium and digging the correction medium and the test medium into the transmission module;
the transmission module is used for transmitting the correction medium and the test medium dug into the money digging module to the storage module;
the identification module is used for acquiring dark data, bright data corresponding to the correction medium in the transmission process of the transmission module and a test image corresponding to the test medium;
and the receiving module is used for receiving the correction medium and the test medium which are transmitted by the transmission module.
The present invention also provides a computer device storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
adjusting the working parameters of the image sensor until the working parameters meet preset conditions;
acquiring dark data acquired by the image sensor under the adjusted working parameters, bright data corresponding to a correction medium and a test image corresponding to a test medium;
correcting the test image according to the dark data, the bright data and the test image corresponding to the test medium to obtain a corrected target image of the test medium;
if the correction is determined to be successful according to the target image, determining the adjusted working parameter as a final working parameter;
and if the correction is determined to fail according to the target image, returning to the step of adjusting the configured working parameters of the image sensor until the working parameters meet preset conditions.
The present invention also provides a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
adjusting the working parameters of the image sensor until the working parameters meet preset conditions;
acquiring dark data acquired by the image sensor under the adjusted working parameters, bright data corresponding to a correction medium and a test image corresponding to a test medium;
correcting the test image according to the dark data, the bright data and the test image corresponding to the test medium to obtain a corrected target image of the test medium;
if the correction is determined to be successful according to the target image, determining the adjusted working parameter as a final working parameter;
and if the correction is determined to fail according to the target image, returning to the step of adjusting the configured working parameters of the image sensor until the working parameters meet preset conditions.
The embodiment of the invention has the following beneficial effects:
the method comprises the steps of setting adjusted working parameters for an image sensor, collecting bright data of a correction medium and a test medium through the image sensor, calculating a pixel value of the test medium by combining dark data collected by the image sensor based on the working parameters, and verifying the pixel value of the test medium.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
FIG. 1 is a flow chart illustrating a method for configuring parameters of an image sensor according to an embodiment;
FIG. 2 is a schematic flow chart illustrating a process for determining whether the adjusted operating parameters are successful according to an embodiment;
FIG. 3 is a flow diagram illustrating the constant current source parameter correction process in one embodiment;
FIG. 4 is a flow chart illustrating an AD parameter calibration process according to an embodiment;
fig. 5 is a schematic structural diagram of an image recognition apparatus according to an embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the embodiment, an image sensor parameter configuration method is particularly proposed, and the implementation of the method depends on a computer program, which may be an application program for calculating and verifying a target image, and the application program may be run on a computer device such as a mobile phone, a personal computer, a tablet computer, a server, and the like.
In this embodiment, the computer device running the image sensor parameter configuration method is a computer device connected to the image recognition device, for example, a controller connected to the image recognition device (the controller may be a computer device such as a mobile phone, a personal computer, a tablet computer, and a server); in a practical embodiment, the image sensor parameter configuration method may further be an image recognition device, and a processor is disposed on the image recognition device, and the processor executes the image sensor parameter configuration method.
As shown in fig. 1, in one embodiment, there is provided an image sensor parameter configuration method, including the steps of:
step 101: adjusting the working parameters of the image sensor until the working parameters meet preset conditions;
firstly, setting working parameters of the image sensor in an initialization state of the image sensor, enabling all the parameters to meet preset conditions, and enabling the image sensor to execute the next step under the condition that the working parameters are set.
Step 102: acquiring dark data acquired by the image sensor under the adjusted working parameters, bright data corresponding to a correction medium and a test image corresponding to a test medium;
under the condition of working parameters based on the satisfaction of preset conditions, the image sensor collects the background noise, namely dark data, output by the image sensor when no light or medium exists, and under a specific light source, the bright data of the corresponding correction medium and the test image of the test medium.
Step 103: correcting the test image according to the dark data, the bright data and the test image corresponding to the test medium to obtain a corrected target image of the test medium;
and correcting the test image through the dark data, the bright data and the test image to obtain a corrected target image.
Step 104: if the correction is determined to be successful according to the target image, determining the adjusted working parameter as a final working parameter;
step 105: and if the correction is determined to fail according to the target image, returning to the step of adjusting the configured working parameters of the image sensor until the working parameters meet preset conditions.
Further, verification of success or failure of correction is performed on the corrected target image to determine final operating parameters of the image sensor.
In one embodiment, as shown in fig. 2, the image sensor parameter configuration method further includes:
step 101a 1: calculating row consistency and column gradient according to pixel values of pixel points contained in the target image;
step 101a 2: determining that the correction is successful when the row consistency meets a first verification threshold while the column gradient meets a second verification threshold;
step 101a 3: determining that correction failed when the row consistency does not satisfy the first verification threshold, and/or the column gradient does not satisfy a second verification threshold.
In the embodiment, a plurality of rows and columns of photosensitive elements are distributed on an image sensor, the photosensitive elements can emit light mapped on test paper, a plurality of rows of light spots mapped on the test paper are distributed according to the ascending sequence of the gray value of the test paper, and row consistency and column gradient calculation are performed on pixel values corresponding to a target image, when the row consistency meets a first verification threshold value and the column gradient meets a second verification threshold value, the current working parameter is the final working parameter; determining that correction failed when the row consistency does not satisfy the first verification threshold, and/or the column gradient does not satisfy a second verification threshold.
In one embodiment, as shown in fig. 3, if the operating parameter includes a constant current source parameter, adjusting the configured operating parameter of the image sensor until the operating parameter satisfies a preset condition includes:
step 101B 1: acquiring an nth white reference data mean value acquired by the image sensor under the current working parameters;
step 101B 2: when the absolute value of the difference between the nth white reference data mean value and a preset first target pixel value is smaller than or equal to a preset first threshold value, determining that the nth constant current source parameter in the current working parameters meets a preset first condition;
step 101B 3: and when the absolute value of the difference between the nth white reference data mean value and a preset first target pixel value is greater than the preset first threshold value, calculating an adjusted (n + 1) th constant current source parameter by using the nth constant current source parameter and the nth white reference data mean value, enabling n to be n +1, and returning to execute the step of obtaining the nth white reference data mean value acquired by the image sensor under the current working parameter.
In this embodiment, the nth white reference data mean value is subtracted from a preset first target pixel value to obtain a first difference value, the first difference value is multiplied by a preset first characteristic curve slope to obtain a first multiplier value, and the first multiplier value is added to the nth constant current source parameter to obtain an n +1 th constant current source parameter as the adjusted constant current source parameter.
The constant current source parameters are obtained by calculation through the following formula:
Yn+1=Yn+(Pn-A)*K1 (1)
wherein, YnFor the nth constant current source parameter, PnIs the nth white reference data mean value, A is the preset first target pixel value, K1Is the slope of the first characteristic curve, Yn+1Is the (n + 1) th constant current source parameter.
When n is 1, the first constant current source parameter is an initial constant current source parameter that is initially configured, and in order for the constant current source parameter to satisfy a preset second condition, it is necessary to calculate a white reference data mean value starting from n is 2, where the white reference data mean value is obtained by collecting a plurality of white reference data and performing averaging calculation.
The constant current source parameter in the initial state of the image sensor is Y1Mean value of white reference data corresponding to this state is P1At this time, judging whether the difference value between the P1 and a preset first condition, namely the preset first target pixel value a, is within a first threshold value, the first threshold value being-5- +5, if so, the current constant current source parameter is the adjusted constant current source parameter; if not, the second constant current source parameter Y2Calculated by the formula (1)To, correspond to at Y2Mean value of white reference data in the state of P2At this time, D is judged2Whether the difference value with the first target pixel value A is within a first threshold value or not, and if so, the current second constant current source parameter is the adjusted constant current source parameter; if the difference value is not within the range, the adjustment is continued until the difference value between the last white reference data mean value and the first target pixel value A is within the first threshold value.
The constant current source parameter in this embodiment is the exposure time, and may also be the light source luminous current, and the specific adjustment manner is the same, and all the adjustment is performed by using the above formula (1).
In one embodiment, as shown in fig. 4, if the working parameter includes an AD parameter, adjusting the configured working parameter of the image sensor until the working parameter satisfies a preset condition includes:
step 101C 1: acquiring an nth dark data mean value acquired by the image sensor under the current working parameters;
step 101C 2: when the absolute value of the difference between the nth dark data mean value and a preset second target pixel value is smaller than or equal to a preset second threshold value, determining that the nth AD parameter in the current working parameters meets a preset second condition;
step 101C 3: and when the absolute value of the difference between the nth dark data mean value and a preset second target pixel value is greater than the preset second threshold value, calculating an adjusted (n + 1) th AD parameter by using the nth AD parameter and the nth dark data mean value, enabling n to be n +1, and returning to execute the step of obtaining the nth dark data mean value acquired by the image sensor under the current working parameter.
In this case, the nth dark data mean value and a preset second target pixel value are subtracted to obtain a second difference value, the second difference value is multiplied by a preset second characteristic curve slope to obtain a second multiplier value, and the second multiplier value and the nth AD parameter are added to obtain an n +1 th AD parameter serving as the adjusted AD parameter.
AD parameters were calculated by the following formula:
Xn+1=Xn+(Dn-B)*K2 (2)
wherein, XnFor the nth AD parameter, DnIs the nth dark data mean value, B is the preset second target pixel value, K2Is the slope of the second characteristic curve; xn+1Is the (n + 1) th AD parameter.
When n is 1, the first AD parameter is an initial AD parameter that is initially configured, and in order to make the AD parameter satisfy a preset second condition, it is necessary to calculate a dark data average value starting from n is 2, where the dark data average value is obtained by collecting a plurality of dark data and performing an averaging calculation.
The AD parameter of the image sensor in the initial state is X1Mean value of dark data corresponding to this state is D1At this time, D is judged1And a preset second condition, namely whether the difference value of a preset second target pixel value B is within a second threshold value, wherein the second threshold value is-5- +5, and if the difference value is within the range, the current AD parameter is the adjusted AD parameter; if not, a second AD parameter X2Calculated by the formula (2) and corresponding to X2Mean dark data in state D2At this time, D is judged2Whether the difference value with the second target pixel value B is within a second threshold value or not, and if so, the current second AD parameter is the adjusted AD parameter; if the difference value is not within the range, the adjustment is continued until the difference value between the last dark data mean value and the second target pixel value A is within a second threshold value.
The AD parameter in this embodiment is a bias or a gain, and the specific adjustment manner is the same, and the AD parameter is adjusted by using the above formula (2).
The adjustment of the working parameters in the present embodiment complies with the prior adjustment of the AD parameters, and then adjusts the constant current source parameters, so as to improve the quality of the image acquired by the image sensor.
In one embodiment, the corrected target image of the test medium is obtained by the following formula,
Figure BDA0002875871110000101
wherein y is a target image after the test medium is corrected under different light sources, X is a test image of the test medium, P is the bright data of the correction medium under different current light sources, and d is the dark data of the image sensor based on current working parameters.
In this example, the light source used at least comprises: visible light, UV light and infrared light; wherein the correction medium includes: white paper, UV paper and translucent paper corresponding to the light source; the test medium was grey paper.
Under the three light sources and the determined working parameters, respectively, obtaining bright data corresponding to the correction medium, a test image of the gray paper (i.e. pixel values of the gray paper) and dark data under the determined working parameters only under the condition of no light source, calculating to obtain target images (i.e. pixel values of the gray paper) corrected by the gray paper under different light sources through the formula (3), and verifying the target images corrected by the gray paper under each light source as follows.
In one embodiment, the row uniformity is a row mobility, calculated by the following formula:
Figure BDA0002875871110000102
wherein σ2Is the traveling wave velocity, y is the corrected target image of the test medium under different light sources, yμThe pixel mean value of a plurality of pixel points of the target image is obtained, and N is the total number of the pixel points in each row.
In this case, a plurality of rows and columns of photosensitive elements are distributed on the image sensor, the photosensitive elements can emit light mapped onto the test paper, a plurality of rows of light spots mapped on the test paper are arranged according to the ascending sequence of the gray value of the test paper, the number of the photosensitive elements can be known through the self property of the image sensor, the total number N of pixel points in each row can be known, and similarly, the pixel mean value y of a plurality of pixel points of the target imageμThe course is solved and then calculated in the formula (3) to obtainThe target image after the gray scale paper correction under each light source is substituted into the above formula (4), and the traveling wave rate σ obtained by calculation is judged2Whether a first verification threshold value is met or not is judged, the first verification threshold value is 0-0.1, and when the traveling wave motion rate is within the range, the target image corrected by the gray paper is proved to be qualified, namely the current working parameters are accurately adjusted; and if the traveling wave mobility is not within the range, returning to the initial working parameter adjustment step for readjusting.
In one embodiment, the column gradient is a gray scale deviation ratio, calculated by the following formula:
Figure BDA0002875871110000111
wherein alpha is2Is the ratio of the gray scale deviation, S1Is the pixel mean value, S, of the pixels of a plurality of consecutive lines with a gray value of 82Is the pixel mean value, S, of the pixels of a plurality of consecutive lines with a gray value of 83Is the pixel mean value, S, of the pixels of a plurality of consecutive lines with a gray value of 164Is the pixel mean value, S, of the pixels of a plurality of consecutive lines with a gray value of 325Is the pixel mean value, S, of the pixels of a plurality of consecutive lines with a gray value of 646Is the pixel average value of the pixel points of a plurality of continuous lines with the gray value of 128.
In this case, a plurality of rows and a plurality of columns of photosensitive elements are distributed on the image sensor, the photosensitive elements can emit light mapped on the test paper, a plurality of rows of light spots mapped on the test paper are arranged according to the ascending sequence of the gray value of the test paper, the light spots are sequentially divided into reserved areas according to different gray values, the gray deviation rate is calculated by calculating the pixel mean value of continuous rows of pixel points of each area and substituting the pixel mean value of the reserved area into the formula (5), and the calculated gray deviation rate alpha is judged2Whether a second verification threshold value is met or not is judged, the second verification threshold value is 0-0.1, and when the gray level deviation rate is within the range, the target image corrected by the gray level paper is proved to be qualified, namely the current working parameters are accurately adjusted; if the line gray scale deviation ratio is not in the range, returning to the initial step of adjusting the working parameters, and repeating the stepsAnd (6) adjusting.
As shown in fig. 5, the present invention also provides an image recognition apparatus, comprising:
the banknote digging module 10 is used for accommodating a correction medium and a test medium and digging the correction medium and the test medium into the transmission module;
the transmission module 20 is used for transmitting the correction medium and the test medium dug into the money digging module to the storage module;
the recognition module 30 is used for collecting dark data, bright data corresponding to the correction medium in the transmission process of the transmission module and a test image corresponding to the test medium;
and the receiving module 40 is used for receiving the correcting medium and the testing medium which are transmitted by the transmission module.
In this embodiment, the image recognition device may be another image recognition device such as a banknote validator, and the positive medium and the test medium are stacked in the banknote digging module 10, wherein the test medium is located at the lowest position, but when the banknote digging module 10 digs the test medium into the transmission module 20, the test medium firstly enters the transmission module 20, and in the process that the correction medium and the test medium are transmitted by the transmission module 20, the recognition module 30 collects dark data, bright data corresponding to the correction medium in the transmission process by the transmission module 20, and a test image corresponding to the test medium. Finally, the receiving module 40 receives the correcting medium and the testing medium which are transmitted by the transmission module 20, and the positions of the correcting medium and the testing medium in the receiving module 40 are the same as the positions of the correcting medium and the testing medium in the banknote digging module 10, so that the correcting medium and the testing medium can be taken for use next time.
The present invention also provides a computer device storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
adjusting the working parameters of the image sensor until the working parameters meet preset conditions;
acquiring dark data acquired by the image sensor under the adjusted working parameters, bright data corresponding to a correction medium and a test image corresponding to a test medium;
correcting the test image according to the dark data, the bright data and the test image corresponding to the test medium to obtain a corrected target image of the test medium;
if the correction is determined to be successful according to the target image, determining the adjusted working parameter as a final working parameter;
and if the correction is determined to fail according to the target image, returning to the step of adjusting the configured working parameters of the image sensor until the working parameters meet preset conditions.
The present invention also provides a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
adjusting the working parameters of the image sensor until the working parameters meet preset conditions;
acquiring dark data acquired by the image sensor under the adjusted working parameters, bright data corresponding to a correction medium and a test image corresponding to a test medium;
correcting the test image according to the dark data, the bright data and the test image corresponding to the test medium to obtain a corrected target image of the test medium;
if the correction is determined to be successful according to the target image, determining the adjusted working parameter as a final working parameter;
and if the correction is determined to fail according to the target image, returning to the step of adjusting the configured working parameters of the image sensor until the working parameters meet preset conditions.
The embodiment of the invention has the following beneficial effects:
the method comprises the steps of setting adjusted working parameters for an image sensor, collecting bright data of a correction medium and a test medium through the image sensor, calculating a pixel value of the test medium by combining dark data collected by the image sensor based on the working parameters, and verifying the pixel value of the test medium.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (10)

1. An image sensor parameter configuration method is characterized by comprising the following steps:
adjusting the working parameters of the image sensor until the working parameters meet preset conditions;
acquiring dark data acquired by the image sensor under the adjusted working parameters, bright data corresponding to a correction medium and a test image corresponding to a test medium;
correcting the test image according to the dark data, the bright data and the test image corresponding to the test medium to obtain a corrected target image of the test medium;
if the correction is determined to be successful according to the target image, determining the adjusted working parameter as a final working parameter;
and if the correction is determined to fail according to the target image, returning to the step of adjusting the configured working parameters of the image sensor until the working parameters meet preset conditions.
2. The method of claim 1, further comprising:
calculating row consistency and column gradient according to pixel values of pixel points contained in the target image;
determining that the correction is successful when the row consistency meets a first verification threshold while the column gradient meets a second verification threshold;
determining that correction failed when the row consistency does not satisfy the first verification threshold, and/or the column gradient does not satisfy a second verification threshold.
3. The method of claim 1, wherein if the operating parameters include constant current source parameters, adjusting the configured operating parameters of the image sensor until the operating parameters satisfy a predetermined condition includes:
acquiring an nth white reference data mean value acquired by the image sensor under the current working parameters;
when the absolute value of the difference between the nth white reference data mean value and a preset first target pixel value is smaller than or equal to a preset first threshold value, determining that the nth constant current source parameter in the current working parameters meets a preset first condition;
and when the absolute value of the difference between the nth white reference data mean value and a preset first target pixel value is greater than the preset first threshold value, calculating an adjusted (n + 1) th constant current source parameter by using the nth constant current source parameter and the nth white reference data mean value, enabling n to be n +1, and returning to execute the step of obtaining the nth white reference data mean value acquired by the image sensor under the current working parameter.
4. The method of claim 1, wherein if the working parameter includes an AD parameter, adjusting the configured working parameter of the image sensor until the working parameter satisfies a preset condition includes:
acquiring an nth dark data mean value acquired by the image sensor under the current working parameters;
when the absolute value of the difference between the nth dark data mean value and a preset second target pixel value is smaller than or equal to a preset second threshold value, determining that the nth AD parameter in the current working parameters meets a preset second condition;
and when the absolute value of the difference between the nth dark data mean value and a preset second target pixel value is greater than the preset second threshold value, calculating an adjusted (n + 1) th AD parameter by using the nth AD parameter and the nth dark data mean value, enabling n to be n +1, and returning to execute the step of obtaining the nth dark data mean value acquired by the image sensor under the current working parameter.
5. The image sensor parameter configuration method according to claim 1, wherein the corrected target image of the test medium is obtained by the following formula,
Figure FDA0002875871100000021
wherein y is a target image after the test medium is corrected under different light sources, X is a test image of the test medium, P is the bright data of the correction medium under different current light sources, and d is the dark data of the image sensor based on current working parameters.
6. The image sensor parameter configuration method according to claim 2,
the row consistency is a traveling wave mobility, which is calculated by the following formula:
Figure FDA0002875871100000022
wherein σ2Is the traveling wave velocity, y is the pixel value after the test medium is corrected under different light sources, yμThe pixel mean value of a plurality of pixel points in a row where y is located, and N is the total number of the pixel points in each row.
7. The image sensor parameter configuration method according to claim 2,
the column gradient is a gray scale deviation ratio, and is calculated by the following formula:
Figure FDA0002875871100000031
wherein alpha is2Is the ratio of the gray scale deviation, S1Is the pixel mean value, S, of the pixels of a plurality of consecutive lines with a gray value of 82Is the pixel mean value, S, of the pixels of a plurality of consecutive lines with a gray value of 83Is the pixel mean value, S, of the pixels of a plurality of consecutive lines with a gray value of 164Is the pixel mean value, S, of the pixels of a plurality of consecutive lines with a gray value of 325Is the pixel mean value, S, of the pixels of a plurality of consecutive lines with a gray value of 646Is the pixel average value of the pixel points of a plurality of continuous lines with the gray value of 128.
8. An image recognition apparatus, comprising:
the banknote digging module is used for accommodating a correction medium and a test medium and digging the correction medium and the test medium into the transmission module;
the transmission module is used for transmitting the correction medium and the test medium dug into the money digging module to the storage module;
the identification module is used for acquiring dark data, bright data corresponding to the correction medium in the transmission process of the transmission module and a test image corresponding to the test medium;
and the receiving module is used for receiving the correction medium and the test medium which are transmitted by the transmission module.
9. A computer device, comprising:
a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the method steps of any of claims 1-7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, causes the processor to carry out the method steps according to any one of claims 1-7.
CN202011634398.6A 2020-12-31 2020-12-31 Image sensor parameter configuration method, device, computer equipment and storage medium Active CN113256872B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011634398.6A CN113256872B (en) 2020-12-31 2020-12-31 Image sensor parameter configuration method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011634398.6A CN113256872B (en) 2020-12-31 2020-12-31 Image sensor parameter configuration method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113256872A true CN113256872A (en) 2021-08-13
CN113256872B CN113256872B (en) 2024-02-02

Family

ID=77181406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011634398.6A Active CN113256872B (en) 2020-12-31 2020-12-31 Image sensor parameter configuration method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113256872B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115278058A (en) * 2022-06-24 2022-11-01 维沃移动通信有限公司 Image acquisition method and device, electronic equipment and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6241069B1 (en) * 1990-02-05 2001-06-05 Cummins-Allison Corp. Intelligent currency handling system
JP2005316554A (en) * 2004-04-27 2005-11-10 Matsushita Electric Ind Co Ltd Pattern identifying device
CN101405772A (en) * 2006-03-16 2009-04-08 阿鲁策株式会社 Bank note authenticating method and bank note authenticating device
JP2009294541A (en) * 2008-06-06 2009-12-17 Canon Inc Image forming apparatus and control method for the same
CN101799434A (en) * 2010-03-15 2010-08-11 深圳市中钞科信金融科技有限公司 Printing image defect detection method
CN102547162A (en) * 2010-09-30 2012-07-04 苹果公司 Image signal processor line buffer configuration for processing raw image data
CN102956195A (en) * 2006-12-19 2013-03-06 日亚化学工业株式会社 Illumination apparatus
CN104202543A (en) * 2004-07-16 2014-12-10 索尼株式会社 Data processing method, data processing apparatus, semiconductor device for detecting physical quantity distribution, and electronic equipment
CN104680489A (en) * 2015-02-11 2015-06-03 深圳怡化电脑股份有限公司 Image correcting method and system
US20180150058A1 (en) * 2016-11-25 2018-05-31 Glowforge Inc. Fabrication with image tracing
CN108353128A (en) * 2015-10-27 2018-07-31 富士胶片株式会社 Camera system and object test equipment and its working method
CN108737815A (en) * 2018-04-13 2018-11-02 深圳怡化电脑股份有限公司 A kind of quality determining method and system of imaging sensor

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6241069B1 (en) * 1990-02-05 2001-06-05 Cummins-Allison Corp. Intelligent currency handling system
JP2005316554A (en) * 2004-04-27 2005-11-10 Matsushita Electric Ind Co Ltd Pattern identifying device
CN104202543A (en) * 2004-07-16 2014-12-10 索尼株式会社 Data processing method, data processing apparatus, semiconductor device for detecting physical quantity distribution, and electronic equipment
CN101405772A (en) * 2006-03-16 2009-04-08 阿鲁策株式会社 Bank note authenticating method and bank note authenticating device
CN102956195A (en) * 2006-12-19 2013-03-06 日亚化学工业株式会社 Illumination apparatus
JP2009294541A (en) * 2008-06-06 2009-12-17 Canon Inc Image forming apparatus and control method for the same
CN101799434A (en) * 2010-03-15 2010-08-11 深圳市中钞科信金融科技有限公司 Printing image defect detection method
CN102547162A (en) * 2010-09-30 2012-07-04 苹果公司 Image signal processor line buffer configuration for processing raw image data
CN104680489A (en) * 2015-02-11 2015-06-03 深圳怡化电脑股份有限公司 Image correcting method and system
CN108353128A (en) * 2015-10-27 2018-07-31 富士胶片株式会社 Camera system and object test equipment and its working method
US20180150058A1 (en) * 2016-11-25 2018-05-31 Glowforge Inc. Fabrication with image tracing
CN108737815A (en) * 2018-04-13 2018-11-02 深圳怡化电脑股份有限公司 A kind of quality determining method and system of imaging sensor

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
金湘亮 等: "基于CMOS工艺的图像传感技术研究与进展", 《半导体技术》, pages 5 - 9 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115278058A (en) * 2022-06-24 2022-11-01 维沃移动通信有限公司 Image acquisition method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113256872B (en) 2024-02-02

Similar Documents

Publication Publication Date Title
CN107068037B (en) Gray scale correction method and gray scale correction device of display panel
CN106898082B (en) A kind of image is stained the method and device of judgement
KR20090101356A (en) Defect detecting device, and defect detecting method
US8644625B2 (en) Object detection device, method and program
CN113256872B (en) Image sensor parameter configuration method, device, computer equipment and storage medium
CN111653249B (en) Display control method and device of display panel and electronic equipment
EP2373048B1 (en) Method for detecting and correcting bad pixels in image sensor
CN110942067A (en) Text recognition method and device, computer equipment and storage medium
CN112347998A (en) Question judging method, device, equipment and storage medium
CN112070682A (en) Method and device for compensating image brightness
US20190302004A1 (en) Adaptive Method for a Light Source
RU2690716C1 (en) Self-adaptive identification method and device for identifying security document
CN114283170B (en) Light spot extraction method
CN116612355A (en) Training method and device for face fake recognition model, face recognition method and device
CN110738606A (en) Image correction method, device, terminal and storage medium for multi-light source system
CN109559707A (en) Gamma value processing method and device of display panel and display equipment
TW201715472A (en) Image segmentation determining method, gesture determining method, image sensing system and gesture determining system
CN112184698B (en) Bamboo strip defect detection method based on auxiliary learning network
CN114998194A (en) Product defect detection method, system and storage medium
CN110672631B (en) Panel defect photographing method and panel defect photographing device
JP6182024B2 (en) Unevenness measuring method and unevenness measuring apparatus
CN108627467B (en) Method and device for detecting linearity of image sensor
CN112417951A (en) Fingerprint image calibration method and device, electronic equipment and storage medium
CN117315683B (en) Wafer conveying method, system, equipment and storage medium in ultra-clean environment
US11947737B2 (en) Image quality improving method, optical navigation device control method, and optical navigation device using the methods

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant