Abstract:
An image calibration method and device. A deviation compensation coefficient of each pixel is calculated according to image data generated by strong and weak lighting parameters, and the deviation compensation coefficient is used to calibrate data of each image pixel collected and output by an image sensing unit. Therefore, the influence of inconsistency of each photosensitive element of the image sensing unit on the image greyscale can be eliminated, so that the effect of document medium image recognition is increased. The method in the embodiments of the present invention comprises: S1, acquiring a strong lighting parameter of each photosensitive element within a long exposure time and a weak lighting parameter thereof within a short exposure time; S2, acquiring image data of a sheet medium; and S3, according to the strong lighting parameter, the weak lighting parameter and the image data, calculating the calibrated image data of the sheet medium.

Description:
CROSS REFERENCE TO RELATED APPLICATION 
       [0001]    The present application claims the priority to Chinese Patent Application No. 201410264151.8, titled “IMAGE CALIBRATION METHOD AND DEVICE”, filed on Jun. 13, 2014 with the State Intellectual Property Office of the People&#39;s Republic of China, the entire content of which is incorporated herein by reference. 
       TECHNICAL FIELD 
       [0002]    The present disclosure relates to the field of image processing, and in particular to a method and a device for image calibration. 
       BACKGROUND 
       [0003]    In financial institutions or enterprises, scanning devices such as an optical image sensor are commonly used to scan sheet medium such as paper, banknote, check and so on, so as to generate image data of the sheet medium, and high-speed machine identification and processing are performed on the image data with information processing equipment such as CPU, thereby achieving informationized and efficient documents processing such as accounting and billing. 
         [0004]    In scanning the sheet medium such as paper, banknote, check and so on with the scanning device such as an optical image sensor, since the image sensor is an array formed by jointing hundreds or even thousands of CMOS photosensitive elements made of silicon wafers, each of the photosensitive elements being a pixel and an amplifier being arranged at the location of the pixel, and electrical properties of the multiple photosensitive elements and the multiple amplification circuits are non-uniform, the various photosensitive elements and the various amplification circuits would output different voltages when the image sensor is scanning a piece of paper with uniform color and uniform brightness (i.e., the radiation input is uniform), so that values of image brightness generated in an image processing device are different and then regions with in-uniform brightness are formed in the image, which greatly influences quality of the image and in turn influences a result of the identification of the image. 
         [0005]    In a calibration method commonly used nowadays, calibration is performed with some pieces of standard gray scale paper (gray scales of the standard gray scale paper are uniform), i.e., image data of the pieces of standard gray scale paper (the gray scales of the standard gray scale paper are uniform), generated by various photosensitive elements with same lighting parameters, are recorded, linear fitting is performed on actual gray values with the standard gray scale, and a gray scale calibration curve is obtained for each of the photosensitive elements. 
         [0006]    In practice, for the pieces of standard gray scale paper, the standard gray scales can not be ensured to be uniform during manufacture, the gray scales may vary during use and storage, and the usage life is not long. In this case, the pieces of standard gray scale paper which are used as the reference for the calibration, are not standard, which leads to differences in calibration results; in addition, the pieces of the gray scale calibration paper can be used for limited times, usually needing to be replaced after being used for three to five times, which leads to a relatively high cost of calibration. 
       SUMMARY 
       [0007]    A method and a device for image calibration are provided according to embodiments of the present disclosure, in which a deviation compensation coefficient is calculated for each pixel based on image data generated with high and low lighting parameters, and data of each image pixel collected and outputted by an image sensing unit is calibrated based on the deviation compensation coefficients, so that influence on gray scales of the image, caused due to nonuniformity of photosensitive elements of the image sensing unit, can be eliminated, thereby improving identification effect of an image of a document medium. 
         [0008]    A method for image calibration is provided according to an embodiment of the present disclosure, which includes: 
         [0009]    S1: obtaining, for each of photosensitive elements, a high lighting parameter corresponding to a long exposure time and a low lighting parameter corresponding to a short exposure time; 
         [0010]    S2: obtaining image data of a sheet medium; and 
         [0011]    S3: calculating calibrated image data of the sheet medium based on the high lighting parameter, the low lighting parameter and the image data. 
         [0012]    Preferably, the step S1 includes: 
         [0013]    S11: obtaining, for each of the photosensitive elements, the high lighting parameter corresponding to the long exposure time; and 
         [0014]    S12: obtaining, for each of the photosensitive elements, the low lighting parameter corresponding to the short exposure time; 
         [0015]    or, 
         [0016]    S11: obtaining, for each of the photosensitive elements, the low lighting parameter corresponding to the short exposure time; and 
         [0017]    S12: obtaining, for each of the photosensitive elements, the high lighting parameter corresponding to the long exposure time. 
         [0018]    Preferably, the process of obtaining, for each of the photosensitive elements, the high lighting parameter corresponding to the short exposure time includes: 
         [0019]    performing a long time exposure on a gray scale board for a period of tH; 
         [0020]    recording image data IHi obtained through the long time exposure and a corresponding gray value GrayH; and 
         [0021]    storing the image data IHi and the gray value GrayH. 
         [0022]    Preferably, the process of obtaining, for each of the photosensitive elements, the low lighting parameter corresponding to the short exposure time includes: 
         [0023]    performing a short time exposure on the gray scale board for a period of tL; 
         [0024]    recording image data ILi obtained through the short time exposure and a corresponding gray value GrayL; and 
         [0025]    storing the image data ILi and the gray value GrayL. 
         [0026]    Preferably, the image data tH is 60 us, and the gray value GrayH is 200; and the image data ILi is 10 us, and the gray value GrayL is 20. 
         [0027]    Preferably, the step S3 includes: 
         [0028]    reading the image data IHi, the gray value GrayH, the image data ILi and the gray value GrayL; and 
         [0029]    denoting the image data obtained in the step S2 as Xi, and denoting the calibrated image data as Xi′, then 
         [0000]        X   i ′=GrayL+(GrayH−GrayL)*( X   i   −IL   i )/( IH   i   −IL   i )
 
         [0030]    Preferably, after the step S1 and before the step S3, the method further includes: 
         [0031]    storing the high lighting parameter and the low lighting parameter. 
         [0032]    A device for image calibration is provided according to an embodiment of the present disclosure, which includes: 
         [0033]    a first obtaining unit, configured to obtain for each of photosensitive elements a high lighting parameter corresponding to a long exposure time and a low lighting parameter corresponding to a short exposure time; 
         [0034]    a second obtaining unit, configured to obtain image data of a sheet medium; and 
         [0035]    a calculating unit, configured to calculate calibrated image data of the sheet medium based on the high lighting parameter, the low lighting parameter and the image data. 
         [0036]    Preferably, the device further includes: a storing unit, configured to store the high lighting parameter and the low lighting parameter. 
         [0037]    A device for image calibration is provided according to an embodiment of the present disclosure, which includes: 
         [0038]    an image sensing unit, configured to collect image information of a medium; 
         [0039]    a storing unit, configured to store the image information, and a controlling parameter and an image processing parameter of the image sensing unit; and 
         [0040]    a controlling and processing unit, configured to control a device for image calibration, calculate deviation compensation coefficients based on the controlling parameter and the image processing parameter, and calibrate data of each image pixel, collected and outputted by the image sensing unit, based on the deviation compensation coefficients. 
         [0041]    According to the embodiments of the present disclosure, the high lighting parameter corresponding to the long exposure time and the low lighting parameter corresponding to the short exposure time are firstly obtained for each of the photosensitive elements; then the image data of the sheet medium is obtained; and finally, the calibrated image data of the sheet medium is calculated based on the high lighting parameter, the low lighting parameter and the image data. In the method and device according to the embodiments of the present disclosure, the deviation compensation coefficients are calculated for each of the pixels based on the image data generated with the high and low lighting parameters, and the data of each image pixel captured and outputted by the image sensing unit, is calibrated based on the deviation compensation coefficients, so that the influence on the gray scales of the image, caused due to the nonuniformity of the photosensitive elements in the image sensing unit, can be eliminated, thereby improving the identification effect of the image of the document medium. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0042]      FIG. 1  is a flow chart of a method for image calibration according to a first embodiment of the present disclosure; 
           [0043]      FIG. 2  is a flow chart of a method for image calibration according to a second embodiment of the present disclosure; 
           [0044]      FIG. 3  is a schematic structural diagram of a device for image calibration according to a first embodiment of the present disclosure; 
           [0045]      FIG. 4  is a schematic structural diagram of a device for image calibration according to a second embodiment of the present disclosure; 
           [0046]      FIG. 5  is a schematic structural diagram of an image sensing unit according to embodiments of a device for image calibration of the present disclosure; and 
           [0047]      FIG. 6  is a schematic structural diagram of applying a device for image calibration in banknote identification according to the disclosure. 
       
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
       [0048]    A method and a device for image calibration are provided according to embodiments of the present disclosure, in which a deviation compensation coefficient is calculated for each pixel based on image data generated with high and low lighting parameters, and data of each image pixel collected and outputted by an image sensing unit is calibrated based on the deviation compensation coefficients, so that influence on gray scales of the image, caused due to nonuniformity of photosensitive elements of the image sensing unit, can be eliminated, thereby improving identification effect of an image of a document medium. 
         [0049]    Reference is made to  FIG. 1 , a method for image calibration according to a first embodiment of the present disclosure includes the following steps S1 to S3. 
         [0050]    In step S1, a high lighting parameter corresponding to a long exposure time and a low lighting parameter corresponding to a short exposure time are obtained for each of photosensitive elements. 
         [0051]    Calibration coefficients for image data may be obtained based on the high lighting parameter and the low lighting parameter, thus the high lighting parameter corresponding to the long exposure time and the low lighting parameter corresponding to the short exposure time may be obtained for each of the photosensitive elements at first. 
         [0052]    In step S2, the image data of a sheet medium is obtained. 
         [0053]    After the high lighting parameter corresponding to the long exposure time and the low lighting parameter corresponding to the short exposure time are obtained for each of the photosensitive elements, the image data of the sheet medium may be obtained. The sheet medium is a sheet medium to be read by scanning. 
         [0054]    In step S3, calibrated image data of the sheet medium is calculated based on the high lighting parameter, the low lighting parameter and the image data. 
         [0055]    The calibration coefficients for the image data may be calculated based on the high lighting parameter, the low lighting parameter and the image data, the calibrated image data of the sheet medium may be calculated based on the calibration coefficients and the image data obtained in the step S2. 
         [0056]    According to the embodiments of the present disclosure, the high lighting parameter corresponding to the long exposure time and the low lighting parameter corresponding to the short exposure time are firstly obtained for each of the photosensitive elements; then the image data of the sheet medium is obtained; and finally, the calibrated image data of the sheet medium is calculated based on the high lighting parameter, the low lighting parameter and the image data. In the method and device according to the embodiments of the present disclosure, the deviation compensation coefficients are calculated for each of the pixels based on the image data generated with the high and low lighting parameters, and the data of each image pixel captured and outputted by the image sensing unit, is calibrated based on the deviation compensation coefficients, so that the influence on the gray scales of the image, caused due to the nonuniformity of the photosensitive elements in the image sensing unit, can be eliminated, thereby improving the identification effect of the image of the document medium. 
         [0057]    The method for image calibration according to the first embodiment of the present disclosure is briefly described above. A method for image calibration according to a second embodiment of the present disclosure is described in detail hereinafter. Reference is made to  FIG. 2 , the method for image calibration according to the second embodiment of the present disclosure includes the following steps  201  to  204 . 
         [0058]    In step  201 , high lighting parameter corresponding to a long exposure time and low lighting parameter corresponding to a short exposure time are obtained for each of photosensitive elements. 
         [0059]    Calibration coefficients for image data may be obtained based on the high lighting parameter and the low lighting parameter, thus the high lighting parameter corresponding to the long exposure time and the low lighting parameter corresponding to the short exposure time may be obtained for each of the photosensitive elements at first. 
         [0060]    The process of obtaining, for each of photosensitive elements, the high lighting parameter corresponding to the long exposure time and the low lighting parameter corresponding to the short exposure time may include: obtaining for each of the photosensitive elements the high lighting parameter corresponding to the long exposure time; and obtaining for each of the photosensitive elements the low lighting parameter corresponding to the short exposure time. It should be noted that an order in which the high lighting parameter and the low lighting parameter are obtained is not limited and may be set based on actual requirements. 
         [0061]    The process of obtaining for each of the photosensitive elements the high lighting parameter corresponding to the short exposure time includes: performing a long time exposure on a gray scale board for a period of tH; recording, image data IHi obtained through the long time exposure and a corresponding gray value GrayH; and storing the image data IHi and the gray value GrayH. The image data tH may be 60 us, and the gray value GrayH may be 200. 
         [0062]    The process of obtaining for each of the photosensitive elements the low lighting parameter corresponding to the short exposure time includes: performing a short time exposure on the gray scale board for a period of tL; recording, image data ILi obtained through the short time exposure and a corresponding gray value GrayL; and storing the image data ILi and the gray value GrayL. The image data ILi may be 10 us, and the gray value GrayL may be 20. 
         [0063]    In step  202 , the high lighting parameter and the low lighting parameter are stored. 
         [0064]    After the step  201  is performed, the obtained high lighting parameter and the obtained low lighting parameter may be stored. 
         [0065]    In step  203 , image data of a sheet medium is obtained. 
         [0066]    After the high lighting parameter corresponding to the long exposure time and the low lighting parameter corresponding to the short exposure time obtained for each of the photosensitive elements are stored, the image data of the sheet medium may be obtained. The above sheet medium is a sheet medium to be read by scanning. 
         [0067]    In step  204 , calibrated image data of the sheet medium is calculated based on the high lighting parameter, the low lighting parameter and the image data. 
         [0068]    The calibration coefficients of the image data may be calculated based on the high lighting parameter, the low lighting parameter and the image data, and the calibrated image data of the sheet medium may be calculated based on the calibration coefficients and the image data obtained in the step  203 . 
         [0069]    The step  204  may include: reading the image data IHi, the gray value GrayH, the image data ILi and the gray value GrayL; and denoting the image data obtained in the step  203  as Xi, and denoting the calibrated image data as Xi′, then 
         [0000]        X   i ′=GrayL+(GrayH−GrayL)*( X   i   −IL   i )/( IH   i   −IL   i )
 
         [0070]    Based on the above formula, the calibrated image data Xi′ of sheet medium may be obtained. 
         [0071]    According to the embodiment of the present disclosure, the high lighting parameter corresponding to the long exposure time and the low lighting parameter corresponding to the short exposure time are firstly obtained for each of the photosensitive elements; then the image data of the sheet medium is obtained; and finally, the calibrated image data of the sheet medium is calculated based on the high lighting parameter, the low lighting parameter and the image data. In the method for image calibration according to the embodiment of the present disclosure, the deviation compensation coefficients are calculated for each of pixels based on the pieces of image data generated with the high and low lighting parameters, and the data of each image pixel, captured and outputted by an image sensing unit, is calibrated based on the deviation compensation coefficients, so that influence on gray scales of the image, caused due to nonuniformity of the photosensitive elements in the image sensing unit, can be eliminated, thereby improving identification effect of the image of the document medium. 
         [0072]    The method for image calibration according to the second embodiment of the present disclosure is described in detail above in particular for the process. A device for image calibration according to a first embodiment of the present disclosure is described hereinafter. Reference is made to  FIG. 3 , the device for image calibration according to the first embodiment of the present disclosure includes: 
         [0073]    a first obtaining unit  301 , configured to obtain for each of photosensitive elements high lighting parameter corresponding to a long exposure time and low lighting parameter corresponding to a short exposure time; 
         [0074]    a second obtaining unit  302 , configured to obtain image data of a sheet medium; and 
         [0075]    a calculating unit  303 , configured to calculate calibrated image data of the sheet medium based on the high lighting parameter, the low lighting parameter and the image data. 
         [0076]    Preferably, the device further includes: a storing unit  304 , configured to store the high lighting parameter and the low lighting parameter. 
         [0077]    The first embodiment of the device for image calibration according to the present disclosure corresponds to the first embodiment and the second embodiment of the method for image calibration according to the present disclosure, thus features possessed by the first embodiment and the second embodiment of the method for image calibration according to the present disclosure are also possessed by the first embodiment of the device for image calibration according to the present disclosure, which are not described herein. 
         [0078]    The deviation compensation coefficients are calculated for each of pixels based on image data generated with the high and low lighting parameters, and the data of each image pixel, captured and outputted by an image sensing unit, is calibrated based on the deviation compensation coefficients, so that the device for image calibration according to the embodiment of the present disclosure can eliminate the influence on gray scales of the image, caused due to nonuniformity of photosensitive elements of the image sensing unit, thereby improving identification effect of the image of the document medium. 
         [0079]    The device for image calibration according to the first embodiment of the present disclosure is described in detail above in particular for the process. A device for image calibration according to a second embodiment of the present disclosure is described hereinafter. References are made to  FIG. 4  to  FIG. 6 , the device for image calibration according to the second embodiment of the present disclosure includes: 
         [0080]    an image sensing unit  401 , configured to collect image information of a medium; 
         [0081]    a storing unit  402 , configured to store the image information, and a controlling parameter and an image processing parameter of the image sensing unit; and 
         [0082]    a controlling and processing unit  403 , configured to control a device for image calibration, calculate deviation compensation coefficients based on the controlling parameter and the image processing parameter, and calibrate data of each image pixel, collected and outputted by the image sensing unit, based on the deviation compensation coefficients. 
         [0083]    According to the embodiment of the present disclosure, the image sensing unit  401  collects reference image data based on the controlling parameter, such as the high lighting parameter and the low lighting parameter, and collects the image information of the medium; then the reference image data and the image processing parameter may be stored by the storing unit  402  for subsequent use; and finally, the deviation compensation coefficients are calculated by the controlling and processing unit  403  based on the controlling parameter and the image processing parameter, and the data of each image pixel, collected and outputted by the image sensing unit, is calibrated based on the deviation compensation coefficients. 
         [0084]    The following embodiment is provided, to illustrate the operating process of components according to the embodiments of the present disclosure. 
         [0085]    Reference is made to  FIG. 5 . During banknote identification, a banknote identification device may include a sensor module, a sensor controlling module, an image processing module, a CPU, a memory and a communication controlling module, where the sensor module includes several sensors configured to collect data of a banknote; the sensor controlling module is configured to control the above image sensors, and send the collected data to the image processing module for processing; the image processing module is configured to process the collected data of the banknote, and the processing in the embodiment of the present disclosure refers to calibrating the data of the banknote; the data of the banknote described above and calibrated data of the banknote may be stored in the memory such as a non-volatile memory; and the banknote identification device may be connected to a main control module via the communication controlling module, so as to facilitate the main control module to call the data in the memory. Reference is made to  FIG. 6  for the above sensor module. 
         [0086]    In the method for image calibration according to the embodiment of the present disclosure, the deviation compensation coefficients are calculated for each of the pixels based on the image data generated with the high and low lighting parameters, and the data of each image pixel, captured and outputted by the image sensing unit, is calibrated based on the deviation compensation coefficients, so that influence on gray scales of the image, caused due to nonuniformity of photosensitive elements of the image sensing unit, can be eliminated, thereby improving identification effect of the image of the document medium. 
         [0087]    It should be understood by those skilled in the art that all or some of the steps in the method according to the above embodiments may be implemented by instructing related hardware with a program. The program may be stored in a computer readable storage medium. The above storage medium may be a read-only memory, a magnetic disk or an optical disk. 
         [0088]    The method and the device for image calibration according to the present disclosure are described above in details. For those skilled in the art, implementations and the application scope may be changed based on the spirit of the embodiments of the present disclosure. In conclusion, content of the present disclosure is not to be interpreted as limitations to the present disclosure.