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

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

Info

Publication number
CN113256872B
CN113256872B CN202011634398.6A CN202011634398A CN113256872B CN 113256872 B CN113256872 B CN 113256872B CN 202011634398 A CN202011634398 A CN 202011634398A CN 113256872 B CN113256872 B CN 113256872B
Authority
CN
China
Prior art keywords
value
image sensor
parameter
nth
image
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.)
Active
Application number
CN202011634398.6A
Other languages
Chinese (zh)
Other versions
CN113256872A (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

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 an image sensor parameter configuration method, an image sensor parameter configuration device, 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 an 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 target image corrected by 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 fails according to the target image, returning to the step of executing the adjustment of 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, 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 apparatus for configuring parameters of an image sensor, a computer device, and a storage medium.
Background
When the identification module in the financial machine in the prior art is used for identifying the bank note, the image sensor is mainly relied on, so that the quality of image data acquired by the image sensor plays an important role in the identification result.
The image sensor itself is composed of a plurality of photosensitive elements, there being individual differences between the photosensitive elements; light source brightness difference exists among different image sensors; there are also differences in mounting dimensions in construction. These can lead to degradation of the quality of the acquired image. Therefore, after the identification module is mounted, correction must be made to the image sensor.
Disclosure of Invention
Based on this, it is necessary to provide an image sensor parameter configuration method aiming at the above problems and aiming at improving the quality of the banknote image acquired by the image sensor.
The invention adopts the technical means that: there is provided an image sensor parameter configuration method including the steps of:
adjusting the working parameters of the image sensor until the working parameters meet preset conditions;
acquiring dark data collected 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 target image corrected by the test medium;
if the correction is determined to be successful according to the target image, determining that the adjusted working parameter is a final working parameter;
and if the correction fails according to the target image, returning to the step of executing the adjustment on the working parameters configured by the image sensor until the working parameters meet the preset conditions.
In one embodiment, the method further comprises:
performing row consistency and column gradient calculation according to pixel values of pixel points contained in the target image;
when the row consistency meets a first verification threshold and the column gradient meets a second verification threshold, determining that correction is successful;
a correction failure is determined when the row consistency does not meet the first verification threshold and/or the column gradient does not meet a second verification threshold.
In one embodiment, the operating parameter includes a constant current source parameter, and adjusting the configured operating parameter of the image sensor until the operating parameter meets a preset condition includes:
acquiring an nth white reference data average 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 the 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;
when the absolute value of the difference between the nth white reference data average value and the preset first target pixel value is larger than the preset first threshold value, calculating the adjusted nth+1th constant current source parameter by using the nth constant current source parameter and the nth white reference data average value, enabling n=n+1, and returning to execute the step of acquiring the nth white reference data average value acquired by the image sensor under the current working parameters.
In one embodiment, the adjusting the configured working parameter of the image sensor until the working parameter meets a preset condition includes:
acquiring an nth dark data average value acquired by the image sensor under the current working parameters;
when the absolute value of the difference between the nth dark data average value and the 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;
when the absolute value of the difference between the nth dark data average value and the preset second target pixel value is larger than the preset second threshold value, calculating the adjusted nth+1th AD parameter by using the nth AD parameter and the nth dark data average value, enabling n=n+1, and returning to execute the step of acquiring the nth dark data average value acquired by the image sensor under the current working parameters.
In one embodiment, the test media corrected target image is obtained by the following formula,
wherein y is a target image corrected by the test medium under different light sources, X is a test image of the test medium, P is the bright data of the correction medium under the current different light sources, and d is the dark data of the image sensor based on the current working parameters.
In one embodiment, the row consistency is the traveling wave rate, calculated by the following formula:
wherein sigma 2 For the travelling wave rate, y is the target image corrected by the test medium under different light sources, y μ The pixel mean value of a plurality of pixels of the target image is obtained, and N is the total number of pixels in each row.
In one embodiment, the column gradient is a gray scale deviation ratio calculated by the following formula:
wherein alpha is 2 Is the gray level deviation rate, S 1 A pixel mean value S of pixel points of a continuous plurality of rows with gray value of 8 2 A pixel mean value S of pixel points of a continuous plurality of rows with gray value of 8 3 A pixel mean value S of pixel points of continuous rows with gray values of 16 4 A pixel mean value S of pixel points of a plurality of continuous rows with gray value of 32 5 A pixel mean value S of pixel points of a plurality of continuous rows with the gray value of 64 6 Is the pixel mean value of the pixel points of the continuous rows with the gray value of 128.
The invention also provides an image recognition device, comprising:
the banknote digging module is used for accommodating the correction medium and the 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 in by the banknote digging module to the storage module;
the identification module is used for acquiring dark data, bright data corresponding to the correction medium and a test image corresponding to the test medium in the transmission process of the transmission module;
and the storage module is used for receiving the correction medium and the test medium which are transmitted by the transmission module.
The 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 collected 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 target image corrected by the test medium;
if the correction is determined to be successful according to the target image, determining that the adjusted working parameter is a final working parameter;
and if the correction fails according to the target image, returning to the step of executing the adjustment on the working parameters configured by the image sensor until the working parameters meet the 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 collected 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 target image corrected by the test medium;
if the correction is determined to be successful according to the target image, determining that the adjusted working parameter is a final working parameter;
and if the correction fails according to the target image, returning to the step of executing the adjustment on the working parameters configured by the image sensor until the working parameters meet the preset conditions.
The implementation of the embodiment of the invention has the following beneficial effects:
the method comprises the steps of setting the adjusted working parameters for the image sensor, collecting bright data of the correction medium and the test medium through the image sensor, calculating the pixel value of the test medium by combining the image sensor based on dark data collected under the working parameters, and verifying the pixel value of the test medium.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Wherein:
FIG. 1 is a flow chart of a method for configuring parameters of an image sensor according to an embodiment;
FIG. 2 is a flow chart of determining whether the adjusted operating parameters are successful in one embodiment;
FIG. 3 is a flow chart of a constant current source parameter correction process in one embodiment;
FIG. 4 is a flow chart of an AD parameter correction process in one embodiment;
fig. 5 is a schematic structural diagram of an image recognition device in an embodiment.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In this embodiment, a method for configuring parameters of an image sensor is specifically proposed, and the implementation of the method depends on a computer program, which may be an application program for calculating a target image and verifying the target image, and the application program may be run on a computer device such as a mobile phone, a personal computer, a tablet computer, and a server.
It should be noted that, in this embodiment, the computer device running the above-mentioned 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, or a server); in the embodiment of the present invention, the image sensor parameter configuration method may further be an image recognition device, and the image recognition device may be provided with a processor, and the image sensor parameter configuration method may be executed by the processor.
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, in an image sensor initialization state, setting working parameters of the image sensor, enabling all 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 collected 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 working parameters meeting the preset conditions, the image sensor collects 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 medium and the test image of the test medium are correspondingly corrected.
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 target image corrected by 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 that the adjusted working parameter is a final working parameter;
step 105: and if the correction fails according to the target image, returning to the step of executing the adjustment on the working parameters configured by the image sensor until the working parameters meet the preset conditions.
Further, verification of success or failure of correction is performed on the corrected target image to determine final working parameters of the image sensor.
In one embodiment, as shown in fig. 2, the image sensor parameter configuration method further includes:
step 101A1: performing row consistency and column gradient calculation according to pixel values of pixel points contained in the target image;
step 101A2: when the row consistency meets a first verification threshold and the column gradient meets a second verification threshold, determining that correction is successful;
step 101A3: a correction failure is determined when the row consistency does not meet the first verification threshold and/or the column gradient does not meet a second verification threshold.
In this embodiment, 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 onto the test paper are arranged in an increasing order 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, and 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 a final working parameter; a correction failure is determined when the row consistency does not meet the first verification threshold and/or the column gradient does not meet a second verification threshold.
In one embodiment, as shown in fig. 3, if the operating parameter includes a constant current source parameter, the adjusting the configured operating parameter of the image sensor until the operating parameter meets a preset condition includes:
step 101B1: acquiring an nth white reference data average value acquired by the image sensor under the current working parameters;
step 101B2: when the absolute value of the difference between the nth white reference data mean value and the 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 101B3: when the absolute value of the difference between the nth white reference data average value and the preset first target pixel value is larger than the preset first threshold value, calculating the adjusted nth+1th constant current source parameter by using the nth constant current source parameter and the nth white reference data average value, enabling n=n+1, and returning to execute the step of acquiring the nth white reference data average value acquired by the image sensor under the current working parameters.
In this embodiment, the nth white reference data average 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 with the nth constant current source parameter to obtain an n+1th constant current source parameter as an adjusted constant current source parameter.
The constant current source parameters are calculated by the following formula:
Y n+1 =Y n +(P n -A)*K 1 (1)
wherein Y is n For the nth constant current source parameter, P n For the nth white reference data mean value, A is a preset first target pixel value, K 1 For the slope of the first characteristic curve, Y n+1 Is the n+1th constant current source parameter.
When n=1, the first constant current source parameter is an initial constant current source parameter that is configured initially, and in order to make the constant current source parameter meet a preset second condition, it is necessary to calculate a white reference data average value from n=2, where the white reference data average value is obtained by collecting a plurality of white reference data and performing an average calculation.
The constant current source parameter of the initial state of the image sensor is Y 1 The mean value of the white reference data corresponding to the state is P 1 At this time, judging whether the difference between the P1 and the preset first condition, namely, the preset first target pixel value A is within a first threshold, wherein the first threshold is-5 to +5, and if so, the current constant current source parameter is the adjusted constant current source parameter; if it is not within the range, the second constant current source parameter Y 2 Calculated by the formula (1), corresponds to Y 2 The mean value of the white reference data in the state is P 2 At this time judge D 2 Whether the difference value between the current constant current source parameter and 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 final white reference data average value and the first target pixel value A is within a first threshold value.
The constant current source parameter in this embodiment is exposure time, or may be light source light emitting current, and the specific adjustment modes are the same, and all the adjustment is performed by adopting the above formula (1).
In one embodiment, as shown in fig. 4, if the working parameters include an AD parameter, the adjusting the working parameters configured by the image sensor until the working parameters meet a preset condition includes:
step 101C1: acquiring an nth dark data average value acquired by the image sensor under the current working parameters;
step 101C2: when the absolute value of the difference between the nth dark data average value and the 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 101C3: when the absolute value of the difference between the nth dark data average value and the preset second target pixel value is larger than the preset second threshold value, calculating the adjusted nth+1th AD parameter by using the nth AD parameter and the nth dark data average value, enabling n=n+1, and returning to execute the step of acquiring the nth dark data average value acquired by the image sensor under the current working parameters.
In this example, the n-th dark data average value is subtracted from a preset second target pixel value 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 is added with the n-th AD parameter to obtain an n+1th AD parameter as an adjusted AD parameter.
The AD parameters were calculated by the following formula:
X n+1 =X n +(D n -B)*K 2 (2)
wherein X is n For the nth AD parameter, D n A second target pixel value preset for the nth dark data average value, K 2 Is the slope of the second characteristic curve; x is X n+1 Is the n+1th AD parameter.
It should be noted that, when n=1, the first AD parameter is an initial AD parameter that is configured initially, in order to make the AD parameter meet a preset second condition, it is necessary to perform calculation from n=2, and calculate a dark data average value, where the dark data average value is obtained by collecting a plurality of dark data and performing an average calculation.
The AD parameter of the initial state of the image sensor is X 1 The mean value of the dark data corresponding to the state is D 1 At this time, judge D 1 If the difference value between the preset second condition and the preset second target pixel value B is within a second threshold value, the second threshold value is-5 to +5, and if the difference value is within the range, the current AD parameter is the adjusted AD parameter; if it is not within the range, the second AD parameter X 2 Calculated by the formula (2), corresponds to X 2 The mean value of dark data in the state is D 2 At this time judge D 2 Whether the difference value between the current second AD parameter and 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 final dark data average value and the second target pixel value A is within a second threshold value.
The AD parameter in this embodiment is bias, or may be gain, and the specific adjustment modes are the same, and all the adjustment is performed by using the above formula (2).
The adjustment of the operating parameters in this example, adhering to the preferential adjustment of the AD parameters, then the constant current source parameters, improves the quality of the image acquired by the image sensor.
In one embodiment, the test media corrected target image is obtained by the following formula,
wherein y is a target image corrected by the test medium under different light sources, X is a test image of the test medium, P is the bright data of the correction medium under the current different light sources, and d is the dark data of the image sensor based on the current working parameters.
In this example, the light source used includes at least: visible light, UV light, and infrared light; wherein the correction medium comprises: white paper, UV paper and translucent paper corresponding to the light source; the test medium is grey paper.
Respectively under the three light sources and the determined working parameters, obtaining bright data corresponding to the correction medium, a test image of gray paper (namely, pixel values of gray paper) and dark data only under the determined working parameters under the condition of no light source, calculating to obtain target images (namely, pixel values after gray paper correction) after gray paper correction under different light sources through the formula (3), and performing the following verification on the target images after gray paper correction under each light source.
In one embodiment, the row consistency is the traveling wave rate, calculated by the following formula:
wherein sigma 2 For the travelling wave rate, y is the target image corrected by the test medium under different light sources, y μ The pixel mean value of a plurality of pixels of the target image is obtained, and N is the total number of pixels in each row.
In this example, the image sensor is distributed with a plurality of rows and columns of photosensitive elements, the photosensitive elements can emit light mapped onto the test paper, a plurality of rows of light spots mapped onto the test paper are arranged in order of increasing gray values of the test paper, the number of the photosensitive elements can be known by the self-property of the image sensor, namely the total number N of the pixel spots of each row, and the pixel mean value y of a plurality of pixel spots of the target image can be known μ Solving, substituting the target image obtained by correcting gray paper under each light source calculated in the formula (3) into the formula (4), and judging the calculated travelling wave rate sigma 2 Whether a first verification threshold is met or not, wherein the first verification threshold is 0-0.1, and when the travelling wave rate is within the range, the target image corrected by the gray paper is proved to be qualified, namely the current working parameter is accurately adjusted; and if the traveling wave rate is not in the range, returning to the initial step of adjusting the working parameters, and readjusting.
In one embodiment, the column gradient is a gray scale deviation ratio calculated by the following formula:
wherein alpha is 2 Is the gray level deviation rate, S 1 A pixel mean value S of pixel points of a continuous plurality of rows with gray value of 8 2 A pixel mean value S of pixel points of a continuous plurality of rows with gray value of 8 3 A pixel mean value S of pixel points of continuous rows with gray values of 16 4 A pixel mean value S of pixel points of a plurality of continuous rows with gray value of 32 5 A pixel mean value S of pixel points of a plurality of continuous rows with the gray value of 64 6 Is the pixel mean value of the pixel points of the continuous rows with the gray value of 128.
In this example, 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 onto the test paper are arranged in an increasing order according to the gray value of the test paper, the test paper is sequentially divided into reserved areas according to different gray values, the pixel mean value of the pixel spots of the continuous rows of each area is calculated, the pixel mean value of the reserved areas is substituted into the formula (5) to calculate the gray deviation rate, and the calculated gray deviation rate alpha is judged 2 Whether a second verification threshold is met or not, wherein the second verification threshold 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 parameter is accurately adjusted; if the line gray level deviation rate is not in the range, returning to the initial step of working parameter adjustment, and readjusting.
As shown in fig. 5, the present invention further provides an image recognition apparatus, including:
the banknote digging module 10 is used for accommodating the correction medium and the 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 in by the banknote digging module to the storage module;
the identification module 30 is used for collecting dark data, bright data corresponding to the correction medium and a test image corresponding to the test medium in the transmission process of the transmission module;
a receiving module 40 for receiving the calibration medium and the test medium transferred by the transmission module.
In this embodiment, the image recognition device may be other image recognition devices such as a banknote validator, and the positive medium and the test medium are stacked in the banknote digging module 10, where the test medium is located at the lowest position, but when the banknote digging module 10 digs the banknote digging module into the transmission module 20, the test medium first 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 and test images corresponding to the test medium in the transmission process of the transmission module 20. Finally, the storage module 40 receives the correction medium and the test medium transferred by the transmission module 20, and at this time, the positions of the correction medium and the test medium in the storage module 40 are the same as the initial positions in the banknote digging module 10, so that the correction medium and the test medium are convenient to take next time.
The 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 collected 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 target image corrected by the test medium;
if the correction is determined to be successful according to the target image, determining that the adjusted working parameter is a final working parameter;
and if the correction fails according to the target image, returning to the step of executing the adjustment on the working parameters configured by the image sensor until the working parameters meet the 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 collected 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 target image corrected by the test medium;
if the correction is determined to be successful according to the target image, determining that the adjusted working parameter is a final working parameter;
and if the correction fails according to the target image, returning to the step of executing the adjustment on the working parameters configured by the image sensor until the working parameters meet the preset conditions.
The implementation of the embodiment of the invention has the following beneficial effects:
the method comprises the steps of setting the adjusted working parameters to an image sensor, collecting bright data of a correction medium and a test medium through the image sensor, calculating the pixel value of the test medium by combining the image sensor based on dark data collected under the working parameters, and verifying the pixel value of the test medium.
The foregoing disclosure is illustrative of the present invention and is not to be construed as limiting the scope of the invention, which is defined by the appended claims.

Claims (6)

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 collected 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 target image corrected by the test medium;
if the correction is determined to be successful according to the target image, determining that the adjusted working parameter is a final working parameter;
if the correction fails according to the target image, returning to the step of executing the adjustment on the working parameters configured by the image sensor until the working parameters meet the preset conditions;
performing row consistency and column gradient calculation according to pixel values of pixel points contained in the target image;
when the row consistency meets a first verification threshold and the column gradient meets a second verification threshold, determining that correction is successful;
determining that correction fails when the row consistency does not meet the first verification threshold and/or the column gradient does not meet a second verification threshold;
the row consistency is the travelling wave rate and is calculated by the following formula:
wherein sigma 2 For the travelling wave rate, y is the pixel value corrected by the test medium under different light sources, y μ The average value of pixels in a plurality of rows of y is given, and N is the total number of pixels in each row;
the column gradient is a gray scale deviation rate, which is calculated by the following formula:
wherein alpha is 2 Is the gray level deviation rate, S 1 A pixel mean value S of pixel points of a continuous plurality of rows with gray value of 8 2 A pixel mean value S of pixel points of a continuous plurality of rows with gray value of 8 3 A pixel mean value S of pixel points of continuous rows with gray values of 16 4 A pixel mean value S of pixel points of a plurality of continuous rows with gray value of 32 5 A pixel mean value S of pixel points of a plurality of continuous rows with the gray value of 64 6 A pixel mean value of pixel points of a plurality of continuous rows with the gray value of 128;
wherein the correction medium comprises: white paper, UV paper, and translucent paper; the working parameters of the test medium which is gray paper comprise constant current source parameters and AD parameters, wherein the constant current source parameters are exposure time, light source luminous current can be obtained, and the AD parameters are bias and gain.
2. The image sensor parameter configuration method according to claim 1, wherein the operating parameter includes a constant current source parameter, and adjusting the configured operating parameter of the image sensor until the operating parameter satisfies a preset condition includes:
acquiring an nth white reference data average 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 the 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;
when the absolute value of the difference between the nth white reference data average value and the preset first target pixel value is larger than the preset first threshold value, calculating the adjusted nth+1th constant current source parameter by using the nth constant current source parameter and the nth white reference data average value, enabling n=n+1, and returning to execute the step of acquiring the nth white reference data average value acquired by the image sensor under the current working parameters.
3. The image sensor parameter configuration method according to claim 1, wherein the operating parameter includes an AD parameter, and adjusting the operating parameter configured by the image sensor until the operating parameter satisfies a preset condition includes:
acquiring an nth dark data average value acquired by the image sensor under the current working parameters;
when the absolute value of the difference between the nth dark data average value and the 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;
when the absolute value of the difference between the nth dark data average value and the preset second target pixel value is larger than the preset second threshold value, calculating the adjusted nth+1th AD parameter by using the nth AD parameter and the nth dark data average value, enabling n=n+1, and returning to execute the step of acquiring the nth dark data average value acquired by the image sensor under the current working parameters.
4. The method of claim 1, wherein the test medium corrected target image is obtained by the following formula,
wherein y is a target image corrected by the test medium under different light sources, X is a test image of the test medium, P is the bright data of the correction medium under the current different light sources, and d is the dark data of the image sensor based on the current working parameters.
5. 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-4.
6. A computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the method steps of any of claims 1-4.
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 CN113256872A (en) 2021-08-13
CN113256872B true 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)

Families Citing this family (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 (11)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110226137A (en) * 2016-11-25 2019-09-10 格罗弗治公司 It is manufactured by image trace

Patent Citations (11)

* 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
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工艺的图像传感技术研究与进展;金湘亮 等;《半导体技术》;5-9 *

Also Published As

Publication number Publication date
CN113256872A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
CN107068037B (en) Gray scale correction method and gray scale correction device of display panel
US7865033B2 (en) Method and apparatus for controlling contrast
CN112906529B (en) Face recognition light supplementing method, device, face recognition equipment and system thereof
CN109979389A (en) Gamma correction method and device, display device, computer storage medium
KR20160061541A (en) Vision inspection apparatus and method of compensating gamma and mura defect thereof
KR20090101356A (en) Defect detecting device, and defect detecting method
CN113256872B (en) Image sensor parameter configuration method, device, computer equipment and storage medium
CN110827269B (en) Crop growth change condition detection method, device, equipment and medium
US8644625B2 (en) Object detection device, method and program
JP4416825B2 (en) Image inspection processing apparatus, image inspection processing method, program, and recording medium
US10520424B2 (en) Adaptive method for a light source for inspecting an article
CN112070682A (en) Method and device for compensating image brightness
CN111653249B (en) Display control method and device of display panel and electronic equipment
CN112434600A (en) Unmanned aerial vehicle inspection method and system
CN109559707B (en) Gamma value processing method and device of display panel and display equipment
US20190340862A1 (en) Self-adaptive identification method of identifying negotiable instrument and device
CN114283170B (en) Light spot extraction method
CN116612355A (en) Training method and device for face fake recognition model, face recognition method and device
CN114694618B (en) Brightness regulating method and device for display panel
CN110738606A (en) Image correction method, device, terminal and storage medium for multi-light source system
US11989650B2 (en) Saliency prioritization for image processing
CN110672631B (en) Panel defect photographing method and panel defect photographing device
CN112734719B (en) Dead pixel detection method of image sensor, storage medium and shooting device
CN114998194A (en) Product defect detection method, system and storage medium
JP6182024B2 (en) Unevenness measuring method and unevenness measuring apparatus

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