CN111541827B - Image correction method and device - Google Patents

Image correction method and device Download PDF

Info

Publication number
CN111541827B
CN111541827B CN202010226073.8A CN202010226073A CN111541827B CN 111541827 B CN111541827 B CN 111541827B CN 202010226073 A CN202010226073 A CN 202010226073A CN 111541827 B CN111541827 B CN 111541827B
Authority
CN
China
Prior art keywords
voltage value
image
output voltage
value
reference voltage
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
CN202010226073.8A
Other languages
Chinese (zh)
Other versions
CN111541827A (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.)
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Original Assignee
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
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 Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd, Shenzhen Yihua Financial Intelligent Research Institute filed Critical Shenzhen Yihua Computer Co Ltd
Priority to CN202010226073.8A priority Critical patent/CN111541827B/en
Publication of CN111541827A publication Critical patent/CN111541827A/en
Application granted granted Critical
Publication of CN111541827B publication Critical patent/CN111541827B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/024Details of scanning heads ; Means for illuminating the original
    • H04N1/028Details of scanning heads ; Means for illuminating the original for picture information pick-up
    • H04N1/03Details of scanning heads ; Means for illuminating the original for picture information pick-up with photodetectors arranged in a substantially linear array
    • H04N1/031Details of scanning heads ; Means for illuminating the original for picture information pick-up with photodetectors arranged in a substantially linear array the photodetectors having a one-to-one and optically positive correspondence with the scanned picture elements, e.g. linear contact sensors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/387Composing, repositioning or otherwise geometrically modifying originals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The embodiment of the invention provides an image correction method, an image correction device, an image correction medium and electronic equipment, wherein the method comprises the following steps: after receiving an image correction instruction, triggering an image collector and an analog-to-digital converter in a preset contact type image sensor, and adjusting a first output voltage value of the image collector to a second output voltage value according to a detected input voltage value of the analog-to-digital converter and a first reference voltage value; and after receiving the initial image data and the corresponding image parameters output by the image collector based on the second output voltage value, carrying out image correction on the initial image data by adopting the image parameters to generate target image data. Therefore, the purpose of image correction can be still achieved under the condition that the gain parameter and the bias parameter of the contact type image sensor are fixed, a high-precision CIS image is obtained, and the use cost is reduced.

Description

Image correction method and device
Technical Field
The present invention relates to the field of image processing, and in particular, to an image correction method and apparatus.
Background
In a conventional a4 scanner apparatus, a CIS (Contact Image Sensor) is generally selected for Image acquisition, scanning, and the like of a4 paper.
However, as the requirement for the accuracy of image scanning is higher and higher, the CIS image scanned and output by the CIS is not always satisfactory to the user, and at this time, image correction needs to be performed on the output CIS image.
An image correction method for CIS images is generally performed by adjusting gain parameters and bias parameters of an analog-to-digital converter in a CIS image sensor, such as an AD chip. And the adjustment of the above parameters is usually required before the image scanning. However, when the user cannot adjust the parameters of the analog-to-digital converter due to other reasons, if a general CIS correction method is still used, image correction cannot be performed, so that the accuracy of the CIS image acquired by the user is reduced, and it is necessary to perform image correction on the acquired CIS image by using another method again, thereby increasing the cost of acquiring a high-accuracy CIS image.
Disclosure of Invention
The embodiment of the invention provides an image correction method, which is used for ensuring that a user can still obtain a high-precision CIS image under the condition that the parameter of an analog-digital converter cannot be adjusted, and the cost is reduced.
Correspondingly, the embodiment of the invention also provides an image correction device, which is used for ensuring the realization and the application of the method.
In order to solve the above problem, an embodiment of the present invention discloses an image correction method applied to a contact image sensor, where the contact image sensor has a fixed gain parameter and a fixed bias parameter, and the method includes:
triggering a preset contact type image sensor according to the received image correction instruction; the contact type image sensor comprises an image collector and an analog-digital converter;
detecting a first output voltage value of the image collector;
detecting an input voltage value and a first reference voltage value of the analog-to-digital converter;
adjusting the first output voltage value of the image collector to a second output voltage value according to the input voltage value of the analog-to-digital converter and the first reference voltage value;
receiving initial image data acquired by the image acquisition device based on the second output voltage value and image parameters corresponding to the initial image data;
and correcting the initial image data by adopting the image parameters to generate target image data.
Optionally, a reference voltage adjuster is connected between the image collector and the analog-to-digital converter, and the adjusting the first output voltage value of the image collector to a second output voltage value according to the input voltage value of the analog-to-digital converter and the first reference voltage value includes:
acquiring a current resistance value of the reference voltage regulator;
adjusting the first reference voltage value based on the current resistance value to generate a second reference voltage value; wherein the first reference voltage value is in a direct proportional relationship with the current resistance value;
calculating a first difference between the input voltage value and the second reference voltage value;
comparing the first output voltage value to the first difference value;
if the first output voltage value is greater than or equal to the first difference value, determining the first output voltage value as the second output voltage value;
and if the first output voltage value is smaller than the first difference value, determining the first difference value as the second output voltage value.
Optionally, the step of adjusting the first reference voltage value based on the current resistance value to generate a second reference voltage value includes:
calculating a first ratio between the current resistance value and a preset resistance value;
generating the second reference voltage value via the first ratio and the first reference voltage value.
Optionally, the initial image data includes initial image parameters, the image parameters include preset image parameters, lighting image parameters, and lighting-out image parameters, and the step of correcting the initial image data by using the image parameters to generate target image data includes:
calculating a second difference value between the initial image parameter and the light-out image parameter;
calculating a third difference value between the lighting image parameter and the lighting-out image parameter;
calculating a second ratio of the second difference and the third difference;
calculating the quantity product of the second ratio and the preset image parameter;
and generating the target image data by adopting the quantity product.
An embodiment of the present invention further provides an image correction apparatus, which is applied to a contact image sensor, where the contact image sensor has a fixed gain parameter and a fixed bias parameter, and the apparatus includes:
the image sensor triggering module is used for triggering a preset contact type image sensor according to the received image correction instruction; the contact type image sensor comprises an image collector and an analog-digital converter;
the output voltage value detection module is used for detecting a first output voltage value of the image collector;
the first voltage value detection module is used for detecting an input voltage value and a first reference voltage value of the analog-to-digital converter;
the output voltage value adjusting module is used for adjusting the first output voltage value of the image collector into a second output voltage value according to the input voltage value of the analog-to-digital converter and the first reference voltage value;
the initial image data receiving module is used for receiving initial image data acquired by the image acquisition device based on the second output voltage value and image parameters corresponding to the initial image data;
and the image correction module is used for correcting the initial image data by adopting the image parameters to generate target image data.
Optionally, a reference voltage regulator is connected between the image collector and the analog-to-digital converter, and the output voltage value adjusting module includes:
the resistance value acquisition submodule is used for acquiring the current resistance value of the reference voltage regulator;
the second voltage value generation submodule is used for adjusting the first reference voltage value based on the current resistance value and generating a second reference voltage value; wherein the first reference voltage value is in a direct proportional relationship with the current resistance value;
a first difference value calculation submodule for calculating a first difference value between the input voltage value and the second reference voltage value;
a voltage value comparison submodule for comparing the first output voltage value with the first difference value;
a first voltage determining submodule, configured to determine the first output voltage value as the second output voltage value if the first output voltage value is greater than or equal to the first difference value;
and the second voltage determination submodule is used for determining the first difference as the second output voltage value if the first output voltage value is smaller than the first difference.
Optionally, the second voltage value generation submodule includes:
the first ratio calculation unit is used for calculating a first ratio between the current resistance value and a preset resistance value;
a second voltage value generation unit configured to generate the second reference voltage value via the first ratio and the first reference voltage value.
Optionally, the initial image data includes initial image parameters, the image parameters include preset image parameters, lighting image parameters, and lighting-out image parameters, and the image correction module includes:
the second difference value calculating submodule is used for calculating a second difference value between the initial image parameter and the light-out image parameter;
the third difference value calculating submodule is used for calculating a third difference value between the light-up image parameter and the light-out image parameter;
a second ratio calculation submodule for calculating a second ratio of the second difference to the third difference;
the quantity product calculation submodule is used for calculating the quantity product of the second ratio and the preset image parameter;
and the target image generation submodule is used for generating the target image data by adopting the quantity product.
An embodiment of the present invention further provides an electronic device, including: a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of any of the above-described image correction methods.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of any one of the above-mentioned image correction methods.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, after receiving an image correction instruction, triggering an image collector and an analog-to-digital converter in a preset contact type image sensor, and adjusting a first output voltage value of the image collector to a second output voltage value according to a detected input voltage value of the analog-to-digital converter and a first reference voltage value; and after receiving the initial image data and the corresponding image parameters output by the image collector based on the second output voltage value, carrying out image correction on the initial image data by adopting the image parameters to generate target image data. Therefore, the purpose of image correction can be still achieved under the condition that the gain parameter and the bias parameter of the contact type image sensor are fixed, a high-precision CIS image is obtained, and the use cost is reduced.
Drawings
FIG. 1 is a flow chart of the steps of an embodiment of an image correction method of the present invention;
FIG. 2 is a flow chart of the steps of an alternative embodiment of an image correction method of the present invention;
FIG. 3 is a schematic diagram of a reference voltage regulator according to an alternative embodiment of the image correction method of the present invention;
FIG. 4 is a block diagram of an embodiment of an image correction apparatus according to the present invention;
FIG. 5 is a block diagram of another embodiment of an image correction apparatus according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
In the prior art, since the contact type image sensor
Referring to fig. 1, a flowchart illustrating steps of an embodiment of an image correction method according to the present invention is shown, where the image correction method is applied to a contact image sensor having a fixed gain parameter and a fixed bias parameter, and the method specifically includes the following steps:
and 101, triggering a preset contact type image sensor according to the received image correction instruction.
In the embodiment of the invention, when a user has a need for correcting the image of the contact image sensor, the preset contact image sensor can be triggered to start by sending an image correction instruction to the preset contact image sensor.
The method comprises the steps of receiving an image correction instruction, and triggering the preset contact image sensor, wherein the contact image sensor comprises an image collector and an analog-to-digital converter, and the image collector and the analog-to-digital converter are triggered in the specific implementation.
And 102, detecting a first output voltage value of the image collector.
Step 103, detecting an input voltage value and a first reference voltage value of the analog-to-digital converter.
In the embodiment of the present invention, after the image collector and the analog-to-digital converter are triggered, since the quality of the image acquired by the image collector under different voltages is different, and since the gain parameter and the bias parameter of the analog-to-digital converter are fixed and cannot be adjusted, the image correction process may not be performed normally. At this time, the output voltage value of the image collector needs to be readjusted, so that preparation can be made for adjusting the output voltage value of the image collector next by detecting the first output voltage value of the image collector, the input voltage value of the analog-to-digital converter and the first reference voltage value.
And 104, adjusting the first output voltage value of the image collector to a second output voltage value according to the input voltage value of the analog-to-digital converter and the first reference voltage value.
In the embodiment of the invention, because the analog-to-digital converter is connected with the image collector, the output voltage value of the image collector can be adjusted through the input voltage value of the analog-to-digital converter and the first reference voltage value, and the first output voltage value of the image collector is adjusted to be the second output voltage value.
And 105, receiving initial image data acquired by the image acquisition unit based on the second output voltage value and image parameters corresponding to the initial image data.
In the embodiment of the invention, the image collector is already at the second output voltage value after being adjusted, and the image collector can be used for collecting the initial image data and the corresponding image parameters in the state.
And 106, correcting the initial image data by adopting the image parameters to generate target image data.
In the embodiment of the present invention, after receiving the initial image data and the corresponding image parameters, the image parameters may be used to perform image correction on the initial image data, so as to generate target image data meeting the user requirements.
In the embodiment of the invention, after receiving an image correction instruction, triggering an image collector and an analog-to-digital converter in a preset contact type image sensor, and adjusting a first output voltage value of the image collector to a second output voltage value according to a detected input voltage value of the analog-to-digital converter and a first reference voltage value; and after receiving the initial image data and the corresponding image parameters output by the image collector based on the second output voltage value, carrying out image correction on the initial image data by adopting the image parameters to generate target image data. Therefore, the purpose of image correction can be still achieved under the condition that the gain parameter and the bias parameter of the contact type image sensor are fixed, a high-precision CIS image is obtained, and the use cost is reduced.
Referring to fig. 2, a flowchart illustrating steps of an alternative embodiment of an image correction method according to the present invention is shown, where the image correction method is applied to a contact image sensor having a fixed gain parameter and a fixed bias parameter, and the method may specifically include the following steps:
step 201, triggering a preset contact image sensor according to the received image correction instruction.
In the embodiment of the invention, the preset contact image sensor can be triggered according to the received image correction instruction. For example, after receiving an image correction instruction sent by a user, a specific trigger signal is sent to a preset contact image sensor to start the contact image sensor.
Step 202, detecting a first output voltage value of the image collector.
Step 203, detecting an input voltage value and a first reference voltage value of the analog-to-digital converter.
In the embodiment of the present invention, the steps 202-203 are similar to the steps 102-103, and are not described herein again.
Optionally, a reference voltage regulator is connected between the image collector and the analog-to-digital converter. In a specific implementation, the reference voltage regulator may be a voltage divider circuit or the like as shown in fig. 3, where V is1Is the output voltage value, V, of the image collector2Is a first reference voltage value, V, of the analog-to-digital converter3Is a constant current source.
Optionally, the step of adjusting the first output voltage value of the image collector to the second output voltage value according to the input voltage value of the analog-to-digital converter and the first reference voltage value in step 104 may include the following steps:
substep 204, obtaining the current resistance value of the reference voltage regulator.
In the embodiment of the present invention, a reference voltage adjuster is further connected between the image collector and the analog-to-digital converter, and the first reference voltage value can be adjusted by adjusting a resistance value of the reference voltage adjuster, so that a current resistance value of the reference voltage adjuster can be obtained first, for example, the current resistance value of the reference voltage adjuster is detected by a smart meter.
Substep 205 of adjusting the first reference voltage value based on the current resistance value, generating a second reference voltage value.
In the embodiment of the present invention, the first reference voltage value is in a direct proportional relationship with the current resistance value. Therefore, the first reference voltage value can be adjusted to the second reference voltage value by adjusting the current resistance value of the reference voltage regulator based on the direct proportional relationship between the current resistance value of the reference voltage regulator and the first reference voltage value.
Optionally, in a case where the first reference voltage value can be influenced, the resistor in the reference voltage regulator may be replaced by a variable capacitor or a variable inductor, which is not limited herein.
Optionally, the substeps 205 may include the following substeps S1-S2:
substep S1, calculating a first ratio between the current resistance value and a preset resistance value;
and a substep S2 of generating the second reference voltage value via the first ratio and the first reference voltage value.
In a specific implementation, a second reference voltage value may be set as an unknown number X by calculating a first ratio between a current resistance value and a preset resistance value, and calculating a third ratio between the first reference voltage value and the second reference voltage value X; based on a direct proportional relationship between the first reference voltage value and the present resistance value, it may be determined that the first ratio is equal to the third ratio. According to the above equality relationship, the second reference voltage value can be obtained by dividing the first reference voltage value by the first ratio.
Sub-step 206, calculating a first difference between said input voltage value and said second reference voltage value.
Substep 207 of comparing said first output voltage value with said first difference value.
In the embodiment of the present invention, after the second reference voltage value is obtained, a first difference between the input voltage value and the second reference voltage value may be calculated, and then according to a magnitude relationship between the first difference and an output voltage required for image correction, by comparing the first difference with the first output voltage value, it is determined whether the first output voltage value needs to be adjusted to another voltage value.
Sub-step 208, if the first output voltage value is greater than or equal to the first difference value, determining the first output voltage value as the second output voltage value.
In the embodiment of the present invention, in the comparison between the first difference and the first output voltage value, if the first output voltage value is greater than or equal to the first difference, it indicates that the image collector at this voltage can output an image meeting a preset image correction rule, and the first output voltage value may be determined as the output voltage required for correcting the image, and the first output voltage value is directly determined as the second output voltage value.
The preset image correction rule is that the number of images which can be output by the contact image sensor in the process of light-off collection is between 0 and 255.
Substep 209, determining the first difference value as the second output voltage value if the first output voltage value is smaller than the first difference value.
In the embodiment of the present invention, if it is determined in the comparison between the first difference and the first output voltage value that the first output voltage value is smaller than the first difference, which indicates that the first output voltage value at this time is too low, the image collector at this voltage cannot output an image satisfying a preset image correction rule, and the first difference may be used to determine the second output voltage value so as to satisfy the preset image correction rule.
Step 210, receiving initial image data acquired by the image acquirer based on the second output voltage value and an image parameter corresponding to the initial image data.
In the embodiment of the invention, after the output voltage of the image collector is adjusted to the second output voltage value, the image collector can output the image meeting the preset image correction rule at the moment, so that the initial image data and the corresponding image parameters can be collected by the image collector.
Optionally, the initial image data may be sent to an analog-to-digital converter for analog-to-digital conversion to obtain a digital image, so as to further improve the efficiency of image correction.
And step 211, correcting the initial image data by using the image parameters to generate target image data.
In the embodiment of the present invention, after the initial image data and the corresponding image parameters are acquired, the initial image data may be subjected to image correction by using the image parameters and combining a preset image correction formula to obtain a target data image, so as to achieve the purpose of performing image correction on the contact image sensor under the condition that the gain parameters and the offset parameters are fixed.
Optionally, the initial image data includes initial image parameters, the image parameters include preset image parameters, lighting image parameters, and light-out image parameters, and the step 211 may include the following sub-steps 2111 and 2115:
a substep 2111 of calculating a second difference between the initial image parameter and the light-out image parameter;
a substep 2112 of calculating a third difference value between the lighting image parameter and the lighting-out image parameter;
sub-step 2113, calculating a second ratio of said second difference and said third difference;
in an embodiment of the present invention, the initial image data may include its own initial image parameters, such as resolution, number of pixels, and the like. And meanwhile, acquiring corresponding image parameters of the initial image data from the image collector, wherein the image parameters comprise preset image parameters, light-up image parameters and light-out image parameters.
Taking the number of pixels as an example, a second difference value a between the number of pixels of the initial image and the number of pixels of the light-out image can be calculated, so as to determine the illuminance when the initial image is acquired; and calculating a third difference value B between the number of the lighting image pixels and the number of the lighting image pixels so as to determine the illuminance when the lighting pure white image is acquired, and then calculating a second ratio of the second difference value A and the third difference value B so as to determine the correction ratio of the initial image data.
The lighting image parameters comprise the resolution, the pixel number and the like of digital image data acquired by the contact image sensor under the condition of lighting; the light-out image parameters comprise the resolution, the pixel number and the like of digital image data acquired by the contact image sensor under the condition of turning off the light; the preset image parameters include an average resolution, an average pixel count, and the like of the corrected image data, which is not limited in this embodiment of the present invention.
A substep 2114 of calculating the product of the second ratio and the number of the preset image parameters;
in the embodiment of the present invention, after the second ratio, i.e. the correction ratio, is calculated, a quantity product between the correction ratio of the initial image data and the preset image parameter may be further determined, so as to serve as the initial image data to perform the image correction on the image data.
A substep 2115 of generating the target image data by using the number product.
In the embodiment of the present invention, after calculating the required correction ratio of the initial image, a number product of the correction ratio and the preset image parameter is determined, and the number product includes the initial image data processed according to the correction ratio of the initial image data on the basis of the preset image parameter, so that the processed initial image data is the target image data.
In the embodiment of the invention, after an image correction instruction is received, an image collector, an analog-to-digital converter and a reference voltage regulator in a preset contact type image sensor are triggered, a first reference voltage value of the analog-to-digital converter is regulated by regulating a resistance value of the reference voltage regulator, and then a first output voltage value of the image collector is regulated to a second output voltage value; and acquiring initial image data and corresponding image parameters thereof by an image acquisition device based on the second output voltage value, and carrying out image correction on the initial image data by adopting the image parameters according to a preset rule to finally obtain target image data. Therefore, the problem that image correction cannot be carried out under the condition that the gain parameter and the bias parameter of the contact type image sensor are fixed is solved, a high-precision CIS image can be obtained, and the quality of an output image of the contact type image sensor can meet the requirement of an application scene; and the extra cost required by the image correction can be further reduced by adjusting the resistance value of the reference voltage regulator to carry out the image correction.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 4 and 5, there are shown block diagrams of an embodiment of an image correction apparatus of the present invention, which is applied to a contact image sensor having a fixed gain parameter and a fixed bias parameter, and specifically includes the following modules:
the image sensor triggering module 401 is configured to trigger a preset contact image sensor according to the received image correction instruction; the contact type image sensor comprises an image collector and an analog-digital converter;
an output voltage value detection module 402, configured to detect a first output voltage value of the image collector;
a first voltage value detection module 403, configured to detect an input voltage value of the analog-to-digital converter and a first reference voltage value;
an output voltage value adjusting module 404, configured to adjust a first output voltage value of the image collector to a second output voltage value according to the input voltage value of the analog-to-digital converter and the first reference voltage value;
an initial image data receiving module 405, configured to receive initial image data acquired by the image acquirer based on the second output voltage value and an image parameter corresponding to the initial image data;
and an image correction module 406, configured to correct the initial image data by using the image parameter, so as to generate target image data.
Optionally, a reference voltage regulator is connected between the image collector and the analog-to-digital converter, and the output voltage value adjusting module 404 includes:
a resistance value obtaining submodule 4041 configured to obtain a current resistance value of the reference voltage regulator;
a second voltage value generation submodule 4042, configured to adjust the first reference voltage value based on the current resistance value, and generate a second reference voltage value; wherein the first reference voltage value is in a direct proportional relationship with the current resistance value;
a first difference calculation submodule 4043 configured to calculate a first difference between the input voltage value and the second reference voltage value;
a voltage value comparison submodule 4044 configured to compare the first output voltage value with the first difference value;
a first voltage determining submodule 4045, configured to determine the first output voltage value as the second output voltage value if the first output voltage value is greater than or equal to the first difference value;
the second voltage determining submodule 4046 is configured to determine the first difference as the second output voltage value if the first output voltage value is smaller than the first difference.
Optionally, the second voltage value generation sub-module 4042 includes:
the first ratio calculation unit is used for calculating a first ratio between the current resistance value and a preset resistance value;
a second voltage value generation unit configured to generate the second reference voltage value via the first ratio and the first reference voltage value.
Optionally, the initial image data includes initial image parameters, the image parameters include preset image parameters, lighting image parameters, and lighting-out image parameters, and the image correction module 406 includes:
a second difference calculation submodule 4061, configured to calculate a second difference between the initial image parameter and the light-out image parameter;
a third difference calculation submodule 4062, configured to calculate a third difference between the light-up image parameter and the light-out image parameter;
a second ratio calculation submodule 4063, configured to calculate a second ratio between the second difference and the third difference;
a quantitative product calculation submodule 4064 configured to calculate a quantitative product of the second ratio and the preset image parameter;
the target image generation sub-module 4065 is configured to generate the target image data by using the number product.
In the embodiment of the invention, after an image correction instruction is received, an image collector, an analog-to-digital converter and a reference voltage regulator in a preset contact type image sensor are triggered, a first reference voltage value of the analog-to-digital converter is regulated by regulating a resistance value of the reference voltage regulator, and then a first output voltage value of the image collector is regulated to a second output voltage value; and acquiring initial image data and corresponding image parameters thereof by an image acquisition device based on the second output voltage value, and carrying out image correction on the initial image data by adopting the image parameters according to a preset rule to finally obtain target image data. Therefore, the problem that image correction cannot be carried out under the condition that the gain parameter and the bias parameter of the contact type image sensor are fixed is solved, a high-precision CIS image can be obtained, and the quality of an output image of the contact type image sensor can meet the requirement of an application scene; and the extra cost required by the image correction can be further reduced by adjusting the resistance value of the reference voltage regulator to carry out the image correction.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an electronic device, including: the image correction method comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein when the computer program is executed by the processor, each process of the image correction method embodiment is realized, the same technical effect can be achieved, and the details are not repeated here to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the embodiment of the image correction method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The image correction method and apparatus provided by the present invention are described in detail above, and the principle and the implementation of the present invention are explained in detail herein by applying specific examples, and the description of the above examples is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. An image correction method applied to a contact image sensor having a fixed gain parameter and a bias parameter, the method comprising:
triggering a preset contact type image sensor according to the received image correction instruction; the contact type image sensor comprises an image collector and an analog-digital converter;
detecting a first output voltage value of the image collector;
detecting an input voltage value and a first reference voltage value of the analog-to-digital converter;
adjusting the first output voltage value of the image collector to a second output voltage value according to the input voltage value of the analog-to-digital converter and the first reference voltage value;
receiving initial image data acquired by the image acquisition device based on the second output voltage value and image parameters corresponding to the initial image data;
and correcting the initial image data by adopting the image parameters to generate target image data.
2. The method of claim 1, wherein a reference voltage adjuster is connected between the image collector and the analog-to-digital converter, and wherein adjusting the first output voltage value of the image collector to a second output voltage value according to the input voltage value of the analog-to-digital converter and the first reference voltage value comprises:
acquiring a current resistance value of the reference voltage regulator;
adjusting the first reference voltage value based on the current resistance value to generate a second reference voltage value; wherein the first reference voltage value is in a direct proportional relationship with the current resistance value;
calculating a first difference between the input voltage value and the second reference voltage value;
comparing the first output voltage value to the first difference value;
if the first output voltage value is greater than or equal to the first difference value, determining the first output voltage value as the second output voltage value;
and if the first output voltage value is smaller than the first difference value, determining the first difference value as the second output voltage value.
3. The method of claim 2, wherein the step of adjusting the first reference voltage value based on the current resistance value to generate a second reference voltage value comprises:
calculating a first ratio between the current resistance value and a preset resistance value;
generating the second reference voltage value via the first ratio and the first reference voltage value.
4. The method according to claim 1, 2 or 3, wherein the initial image data comprises initial image parameters, the image parameters comprise preset image parameters, light-up image parameters and light-out image parameters, and the step of correcting the initial image data by using the image parameters to generate target image data comprises:
calculating a second difference value between the initial image parameter and the light-out image parameter;
calculating a third difference value between the lighting image parameter and the lighting-out image parameter;
calculating a second ratio of the second difference and the third difference;
calculating the quantity product of the second ratio and the preset image parameter;
and generating the target image data by adopting the quantity product.
5. An image correction apparatus for use with a contact image sensor having a fixed gain parameter and a bias parameter, the apparatus comprising:
the image sensor triggering module is used for triggering a preset contact type image sensor according to the received image correction instruction; the contact type image sensor comprises an image collector and an analog-digital converter;
the output voltage value detection module is used for detecting a first output voltage value of the image collector;
the first voltage value detection module is used for detecting an input voltage value and a first reference voltage value of the analog-to-digital converter;
the output voltage value adjusting module is used for adjusting the first output voltage value of the image collector into a second output voltage value according to the input voltage value of the analog-to-digital converter and the first reference voltage value;
the initial image data receiving module is used for receiving initial image data acquired by the image acquisition device based on the second output voltage value and image parameters corresponding to the initial image data;
and the image correction module is used for correcting the initial image data by adopting the image parameters to generate target image data.
6. The apparatus of claim 5, wherein a reference voltage regulator is connected between the image collector and the analog-to-digital converter, and the output voltage value adjusting module comprises:
the resistance value acquisition submodule is used for acquiring the current resistance value of the reference voltage regulator;
the second voltage value generation submodule is used for adjusting the first reference voltage value based on the current resistance value and generating a second reference voltage value; wherein the first reference voltage value is in a direct proportional relationship with the current resistance value;
a first difference value calculation submodule for calculating a first difference value between the input voltage value and the second reference voltage value;
a voltage value comparison submodule for comparing the first output voltage value with the first difference value;
a first voltage determining submodule, configured to determine the first output voltage value as the second output voltage value if the first output voltage value is greater than or equal to the first difference value;
and the second voltage determination submodule is used for determining the first difference as the second output voltage value if the first output voltage value is smaller than the first difference.
7. The apparatus of claim 6, wherein the second voltage value generation submodule comprises:
the first ratio calculation unit is used for calculating a first ratio between the current resistance value and a preset resistance value;
a second voltage value generation unit configured to generate the second reference voltage value via the first ratio and the first reference voltage value.
8. The apparatus of claim 5, 6 or 7, wherein the initial image data comprises initial image parameters, the image parameters comprising preset image parameters, light-up image parameters and light-out image parameters, the image correction module comprising:
the second difference value calculating submodule is used for calculating a second difference value between the initial image parameter and the light-out image parameter;
the third difference value calculating submodule is used for calculating a third difference value between the light-up image parameter and the light-out image parameter;
a second ratio calculation submodule for calculating a second ratio of the second difference to the third difference;
the quantity product calculation submodule is used for calculating the quantity product of the second ratio and the preset image parameter;
and the target image generation submodule is used for generating the target image data by adopting the quantity product.
9. An electronic device, comprising: processor, memory and computer program stored on the memory and executable on the processor, which computer program, when being executed by the processor, carries out the steps of the image correction method according to any one of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the image correction method according to any one of claims 1 to 4.
CN202010226073.8A 2020-03-26 2020-03-26 Image correction method and device Active CN111541827B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010226073.8A CN111541827B (en) 2020-03-26 2020-03-26 Image correction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010226073.8A CN111541827B (en) 2020-03-26 2020-03-26 Image correction method and device

Publications (2)

Publication Number Publication Date
CN111541827A CN111541827A (en) 2020-08-14
CN111541827B true CN111541827B (en) 2021-12-10

Family

ID=71970123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010226073.8A Active CN111541827B (en) 2020-03-26 2020-03-26 Image correction method and device

Country Status (1)

Country Link
CN (1) CN111541827B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10136178A (en) * 1996-11-01 1998-05-22 Ricoh Co Ltd Reader
JP2000115546A (en) * 1998-10-09 2000-04-21 Ricoh Co Ltd Image reader
CN106231212A (en) * 2016-09-13 2016-12-14 深圳怡化电脑股份有限公司 A kind of method and device of image procossing
CN107707846A (en) * 2017-10-12 2018-02-16 深圳怡化电脑股份有限公司 A kind of CIS parameter correcting methods, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10136178A (en) * 1996-11-01 1998-05-22 Ricoh Co Ltd Reader
JP2000115546A (en) * 1998-10-09 2000-04-21 Ricoh Co Ltd Image reader
CN106231212A (en) * 2016-09-13 2016-12-14 深圳怡化电脑股份有限公司 A kind of method and device of image procossing
CN107707846A (en) * 2017-10-12 2018-02-16 深圳怡化电脑股份有限公司 A kind of CIS parameter correcting methods, device, equipment and storage medium

Also Published As

Publication number Publication date
CN111541827A (en) 2020-08-14

Similar Documents

Publication Publication Date Title
CN110192387B (en) Data rate control for event-based vision sensors
TWI395958B (en) Defective pixel detection and correction devices, systems, and methods for detecting and correcting defective pixel
TWI271994B (en) Scanning device calibration system and method
EP1935018B1 (en) System and method for a high dynamic range sensitive sensor element or array with gain control
EP1723781B1 (en) Imaging system with adjusted dark floor correction
EP1943831B1 (en) Image sensor
US20120212645A1 (en) Image processing apparatus and method
JPWO2007074518A1 (en) Solid-state imaging device and dark current component removal method
CN109657656B (en) Fingerprint detection method, fingerprint detection device and mobile terminal
US20170307869A1 (en) Microscope and method for obtaining a high dynamic range synthesized image of an object
CN111541827B (en) Image correction method and device
US11418720B2 (en) Apparatus, control method, and storage medium
JPS58172061A (en) Signal processor
US7932927B2 (en) Apparatus and associated methodology of widening dynamic range in image processing
CN110673428B (en) Structured light compensation method, device and equipment
US7619783B2 (en) Scanner analog-front-end calibration using percent of freedom
US5359383A (en) Automatic focusing system with phase difference detecting unit employing correlation operating circuit
US20080043138A1 (en) Digital image forming device and a digital image forming method used thereon
US9007491B2 (en) Image processing apparatus and control method thereof
JP6827838B2 (en) Imaging equipment and image processing equipment, their control methods, and programs
KR102495491B1 (en) Frequency control system of color burst signal for camera and control method thereof
JP7169859B2 (en) IMAGING DEVICE AND CONTROL METHOD THEREOF, PROGRAM, STORAGE MEDIUM
CN103841334A (en) Exposure adjusting device, image homogenizing device and image homogenizing method
TW201419852A (en) Exposure adjusting apparatus, image normalizing apparatus and image normalizing method
JP2013207631A (en) Image pickup device and program

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