Patent Document ID: 9685022
Application ID: 14894966
Patent Status: 1

Claim One:
1. A method for compensating and correcting an image, applied to a device for recognizing and verifying banknotes comprising a micro control unit, a programmable logic device connected to the micro control unit, an analog to digital (AD) chip, a drive circuit, and a static random access memory each connected to the programmable logic device, and a contact image sensor connected to the AD chip and the drive circuit respectively, wherein the static random access memory pre-stores a lookup table for compensation and correction; and the method comprises: receiving, by the programmable logic device, a first configuration instruction output by the micro control unit, and controlling, by the programmable logic device, the drive circuit to drive the contact image sensor to collect first banknote image pixels; converting, by the AD chip, the first banknote image pixels into second banknote image pixels through analog to digital conversion; acquiring, by the programmable logic device, the second banknote image pixels, using, by the programmable logic device, values of the second banknote image pixels as address data, accessing, by the programmable logic device, the lookup table for compensation and correction pre-stored in the static random access memory, finding, by the programmable logic device, banknote compensation and correction data corresponding to the second banknote image pixels, and transmitting, by the programmable logic device, the banknote compensation and correction data to the micro control unit; and recognizing, by the micro control unit, the banknotes based on the banknote compensation and correction data, wherein a process of creating the lookup table for compensation and correction pre-stored in the static random access memory comprises: receiving, by the programmable logic device, a second configuration instruction output by the micro control unit, and controlling, by the programmable logic device, the drive circuit to drive the contact image sensor to collect first original image pixels; converting, by the AD chip, the first original image pixels into second original image pixels through analog to digital conversion; receiving, recording and storing, by the programmable logic device, the second original image pixels, and transmitting the second original image pixels to the micro control unit; and receiving, by the micro control unit, the second original image pixels, acquiring compensation and correction data corresponding to the second original image pixels according to a compensation and correction formula, creating the lookup table for compensation and correction with the compensation and correction data, and storing the lookup table for compensation and correction into the static random access memory, and wherein the contact image sensor collecting the first original image pixels, the AD chip converting the first original image pixels into second original image pixels, and the programmable logic device receiving and recording the second original image pixels, comprises: acquiring, by the contact image sensor, black-level outputs of the first original image pixels by scanning black calibration paper, and converting, by the AD chip, the black-level outputs of the first original image pixels into black-level outputs of the second original image pixels through analog to digital conversion; acquiring, by the contact image sensor, white-level outputs of the first original image pixels by scanning white calibration paper, and converting, by the AD chip, the white-level outputs of the first original image pixels into white-level outputs of the second original image pixels through analog to digital conversion; receiving, by the programmable logic device, the black-level outputs of the second original image pixels, and recording the black-level outputs of the second original image pixels as SB(i), i=0˜N−1, where N is a total number of the original pixels of the contact image sensor, and i is a serial number of the original pixel; and receiving, by the programmable logic device, the white-level outputs of the second original image pixels and recording the white-level outputs of the second original image pixels as SW(i), i=0˜N−1, where N is a total number of the original pixels of the contact image sensor, and i is a serial number of the original pixel.