CN110022420B - Image scanning system and method based on CIS and storage medium - Google Patents

Image scanning system and method based on CIS and storage medium Download PDF

Info

Publication number
CN110022420B
CN110022420B CN201910186466.8A CN201910186466A CN110022420B CN 110022420 B CN110022420 B CN 110022420B CN 201910186466 A CN201910186466 A CN 201910186466A CN 110022420 B CN110022420 B CN 110022420B
Authority
CN
China
Prior art keywords
image
cis
scanning
brightness
correction
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
CN201910186466.8A
Other languages
Chinese (zh)
Other versions
CN110022420A (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.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
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 Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN201910186466.8A priority Critical patent/CN110022420B/en
Publication of CN110022420A publication Critical patent/CN110022420A/en
Application granted granted Critical
Publication of CN110022420B publication Critical patent/CN110022420B/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/00885Power supply means, e.g. arrangements for the control of power supply to the apparatus or components thereof
    • H04N1/00888Control thereof
    • H04N1/00896Control thereof using a low-power mode, e.g. standby
    • 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/04Scanning arrangements, i.e. arrangements for the displacement of active reading or reproducing elements relative to the original or reproducing medium, or vice versa
    • H04N1/10Scanning arrangements, i.e. arrangements for the displacement of active reading or reproducing elements relative to the original or reproducing medium, or vice versa using flat picture-bearing surfaces
    • 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)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The invention discloses an image scanning system, a method and a storage medium based on a CIS (contact image sensor), wherein the system comprises a CIS interface module, an image preprocessing module and an image post-processing module, the CIS interface module comprises a CIS driving circuit and a CIS analog data transmission interface, the image preprocessing module comprises an FPGA (field programmable gate array) unit, an analog-to-digital conversion unit and a storage unit, and the image post-processing module comprises a microprocessor unit and a communication interface. The method comprises a standby mode, wherein a working clock of the peripheral is closed; the scanning mode is used for establishing a color space mapping table and an image quality database, preprocessing an image to be scanned and post-processing the preprocessed image to obtain an image in a preset format; and updating the image quality database in an updating mode. The method adopts the CIS as the image sensor, and has the advantages of simple and compact circuit structure, controllable system mode, high image processing speed and high scanned image quality.

Description

Image scanning system and method based on CIS and storage medium
Technical Field
The present invention relates to the field of graphic processing, and more particularly, to a CIS-based image scanning system, method, and storage medium.
Background
Nowadays, various types of image scanning systems are widely used in the fields of financial instruments, industrial inspection, daily life, self-service, and the like. Most of the conventional image scanning systems belong to a planar scanner, and the used image sensor is a Charge-coupled Device (CCD), which has the disadvantages of large volume, complex structure, high production cost, etc. Modern Image scanning systems are beginning to scan with Contact Image Sensors (CIS). The CIS has the advantages of compact structure, small volume, light weight, low cost and the like. However, there are still some problems with existing image scanning systems.
First, no matter what kind of image sensor and structure is used, the existing image scanning system is used as an independent scanner device to be connected to a computer for use, which brings inconvenience under the condition of limited space available for users. Secondly, most of the existing image scanning systems directly upload the original image of the scanned manuscript to a user computer, and then perform operations such as quality adjustment, compression and storage on the image. The original image of the scanned manuscript usually has a large data volume, and it takes a long time for the image to be transferred from the scanning system to the computer. In addition, the image is operated on the user computer, and the processing mode has certain requirements on the performance of the user computer. Thirdly, in an image scanning system using a CIS, the CIS and the analog circuit have characteristic differences from each other, and images scanned by different CIS and analog circuits have different expressions in overall brightness. In addition, because the light emitted by the LED light source array on the CIS is not uniform, and the perception degree of each photosensitive unit to the light is inconsistent, the scanned image is superimposed with noise in the vertical direction, and the quality of the scanned image is greatly influenced. Fourthly, the conventional image scanning system does not control power consumption, is still kept in a high-power-consumption working state in a standby state, and does not satisfy the green environmental protection concept. Fifth, the resolution, spectrum, and size options of scanned images supported by existing image scanning systems are limited, and different types and resolutions of images have long intermediate waiting times during scanning, which makes it difficult to meet different needs of different users.
Disclosure of Invention
In view of the defects of the prior art, an object of the present invention is to provide a CIS-based image scanning system, method and storage medium, which are used to solve the problems of single scanning mode, slow switching and large power consumption.
To achieve the above object, according to an aspect of the present invention, there is provided a CIS-based image scanning system including a CIS interface module, an image preprocessing module, and an image post-processing module;
the input of the CIS interface module is connected with the CIS, the output of the CIS interface module is connected with the input of the image preprocessing module, the output of the image preprocessing module is connected with the input of the image post-processing module, and the output of the image post-processing module is connected with external equipment;
the CIS interface module is used for driving the CIS and transmitting an image scanned by the CIS;
the image preprocessing module is used for carrying out brightness self-adaptive adjustment, data rearrangement and single-point linear correction on the image;
the image post-processing module is used for carrying out format conversion on the preprocessed image and transmitting the processed image.
Further, the CIS interface module comprises a CIS driving circuit and a CIS analog data transmission interface; the CIS driving circuit is used for driving the CIS; the CIS analog data transmission interface is used for transmitting analog data acquired in the image scanning process of the CIS to the image preprocessing module;
the image preprocessing module comprises an FPGA unit, an analog-to-digital conversion unit and a storage unit which are respectively connected with the FPGA unit; the FPGA unit is used for controlling the normal work of the CIS and the analog-to-digital conversion unit, acquiring image data, preprocessing an image and sending the processed image to the image post-processing module; the analog-to-digital conversion unit is used for converting analog data acquired in the image scanning process of the CIS into digital data; the storage unit is used for storing correction data used in the image preprocessing process of the FPGA unit;
the image post-processing module comprises a microprocessor unit and a communication interface; the micro-processing unit is used for processing and transmitting images in real time and controlling the overall working state of the system; the communication interface is used for communicating and interacting with external equipment and transmitting image data.
The CIS is adopted as the image sensor, the circuit structure is simple and compact, and meanwhile the microprocessor supports various transmission protocols such as USB, Ethernet, SPI, I2C and the like. The system can be used as an independent image scanning system to be accessed to a computer, and can also be embedded into other equipment to be accessed to the computer as an integrated system.
According to another aspect of the present invention, the present invention provides an image scanning method based on the above system, including:
if the mobile phone is in the standby mode, the peripheral working clock is turned off, the working power is reduced, and the purposes of energy conservation and environmental protection are achieved;
if the image is in the scanning mode, actively switching the images according to different scanning types and resolutions by a user, establishing a color space mapping table and an image quality database, preprocessing the image to be scanned by utilizing the color space mapping table and the image quality database, and post-processing the preprocessed image to obtain an image in a preset format;
and if the image quality database is in the updating mode, updating the image quality database.
Preferably, in order to achieve better scanning effect of the system in formal use, the establishment of the color space mapping table and the image quality database is completed at least once before use, and comprises the following steps:
self-adaptive adjustment of image brightness;
rearranging data;
single-point linear correction;
a luminance subscale and a spatial transform look-up table are obtained.
Further, the image brightness self-adaptive adjustment is used for adjusting the overall brightness of each channel of the image and eliminating the difference of the overall brightness of the image caused by different hardware process characteristics. The traditional image brightness adjusting method is realized by adding a current limiting resistor to a CIS light source on a circuit. Under the condition that the power supply voltage is constant, the current limiting resistance value is changed so as to change the current passing through the CIS light source and the CIS luminous intensity, and the purpose of adjusting the overall brightness of the image is achieved. Firstly, the CIS light source works under the non-rated voltage for a long time, so that the service life of the CIS is shortened; secondly, the current-limiting resistance value and the CIS luminous intensity have a nonlinear relation, and the CIS luminous intensity cannot be calculated according to the current-limiting resistance value, so that the image brightness adjustment needs to be repeatedly tried, and the steps are very complicated and time-consuming; the characteristics of the CIS may change as the use time increases, and readjustment of image brightness requires readjustment of the current limiting resistor, which causes inconvenience to the production and maintenance of the image scanning system. The system enables the analog data output by the CIS to be positioned in the effective acquisition range of the analog-to-digital conversion unit by adjusting the parameters of the analog-to-digital conversion unit, so that the aims of acquiring effective information of an image and roughly adjusting the brightness of the image are fulfilled; the exposure time of each light source of the CIS is automatically adjusted through proportional feedback control, so that the brightness of each channel of the collected image is balanced and consistent, and the purposes of finely adjusting the image brightness and eliminating the difference between CIS sensors are achieved. The system acquires images according to the adjusted analog-to-digital conversion unit parameters and the CIS exposure time, and then brightness can be adjusted. The specific process is as follows:
1.1.1. the collected images of the front side and the back side do not affect each other, namely the two CIS tubes are installed in a staggered mode, sensors of the two CIS tubes face the sensors, and light sources face the light sources;
1.1.2. setting offset and PGA (Programmable Gain Amplifier) of the analog-to-digital conversion unit to ensure that the pixels of the image are in the range of a linear interval;
1.1.3. determining the maximum exposure time T supported by the CIS according to the specificationMSetting an exposure time T1As a starting point of control, where T1<=TMDetermining the maximum value P of each pixel in a single color channel according to the storage mode of the image in the systemMDetermining the overall brightness of the image after the brightness standard according to the application scene and the user requirement, and taking the maximum column average value P of the pixel in the single color channelLRepresenting the overall brightness of the image, and fixing white paper between CISs in the brightness standard process to ensure that the targets of the acquired images are the same each time;
1.1.4. acquiring a white paper image according to the set exposure time, setting to acquire m rows and n columns of images, and acquiring PijExpressing the pixel values of the ith row and the jth column, and calculating an adaptive exposure compensation value delta T according to the following formula;
Figure BDA0001993025710000041
1.1.5. adjusting the exposure time T according to the following formula
Tx+1=Tx+ΔT
Where x is 1, 2, 3, …, N, N is the number of iterations, if Δ T < ═ TM/PMIf yes, the brightness standard is finished, and the brightness of each pixel of the image obtained by scanning in the current exposure time is close to PL(ii) a Otherwise, repeatedly executing the previous step after updating the exposure time, and performing iterative update calculation on the exposure time by using the new adaptive exposure compensation value, if the iterative update calculation is performed for N times, namely x>If the brightness standard is not finished after N, the CIS or the hardware circuit part has defects, so that the whole brightness of the image can not meet the requirement of the brightness automatic standard all the time, exiting the adjusting process and returning the information of exiting overtime to the user;
1.1.6. and if the self-adaptive exposure time adjusting step is successfully completed, saving the adjusted exposure time, and controlling the CIS to acquire images by using the exposure time in the working mode.
Further, the image single-point linear correction is to eliminate the non-uniformity of light rays emitted by the LED light source array on the CIS, the inconsistent perception degree of each photosensitive unit to the light rays, and the noise in the vertical direction caused by the superposition of scanned images. Specifically, firstly, the analog-to-digital conversion unit parameters are controlled to enable the pixels of the acquired image to be within the range of linear intervals, the average brightness x1 of each column of image data when the system acquires a paper-free scan and the average brightness x2 of each column of image data when the system acquires a pure white paper scan, and [ x1, x2] is linearly transformed to [0,255 ]. The brightness of each pixel of the image collected by the system under the spectrum is mapped according to the linear transformation, and the mapped value is limited to an integer within [0,255], so that the image can be corrected. The specific process is as follows:
1.2.1. and setting the working mode of the system, scanning by adopting parameters passing through the image brightness adaptive standard, and canceling the automatic correction function of the FPGA.
1.2.2. Collecting image without paper scanning, and setting collection m1Lines and n columns of images, DijAs in the imageIth row and jth column pixel brightness, where i<=m1,j<N. The standard brightness of the scanned image without paper is set as DS. Preferably, DSSet as the minimum value of pixel, D under the image represented by 8-bit pixelSTake 0.
1.2.3. Collecting images during white paper scanning, and setting collection m2Lines and n columns of images, BijIs the brightness of the ith row and jth column pixel in the image, wherein i<=m2,j<N. The standard brightness of the scanned white paper image is BS. Preferably, BSSet as the maximum value of the pixel, B under the image represented by 8-bit pixelSAnd taking 255.
1.2.4. Calculating a correction parameter k for each column according tojAnd bjAnd updating and storing the correction parameters.
Figure BDA0001993025710000061
Figure BDA0001993025710000062
Where j is 1, 2, 3, …, n.
1.2.5. During formal scanning, the ith row and j column pixels of the CIS acquired image are corrected according to the following formula, and the pixel value of the original image is PijAfter correction, the corresponding image pixel value is Yij
Yij=kj(Pij-bj)
Furthermore, the image is operated on the user computer, the processing mode has certain requirements on the performance of the user computer, and the invention adjusts the quality of the image such as brightness, contrast and the like on the microprocessor unit. The method improves the color space conversion step, adjusts the quality characteristics of the image while performing color space conversion, and does not introduce extra calculation cost in the application scene. The specific process is as follows:
1.3.1. establishing a brightness sub-component table after numerical adjustment, and performing brightness correction by using a gamma correction algorithm:
Figure BDA0001993025710000063
wherein i is 0, 1, 2, …,255, Y in 8-bit pixel spacei=i;PMIs the maximum value of the pixel luminance component in YCbCr space; y isiIs the pre-adjustment image pixel luminance component; y isi' is the adjusted image pixel luminance component; gamma is a gamma correction parameter, which can be selected and adjusted according to actual requirements.
1.3.2. Using Yi' instead of YiEstablishing a lookup table for converting RGB to YCbCr space, wherein the lookup table can be established as follows:
YRi=Yi′×0.299×(1<<n)+0.5
YGi=Yi′×0.587×(1<<n)+0.5
YBi=Yi′×0.114×(1<<n)+0.5
CbRi=Cbi×(-0.169)×(1<<n)+0.5
CbGi=Cbi×(-0.331)×(1<<n)+0.5
CbBi=Cbi×0.500×(1<<n)+0.5
CrRi=Cri×0.500×(1<<n)+0.5
CrGi=Cri×(-0.419)×(1<<n)+0.5
CrBi=Cri×(-0.081)×(1<<n)+0.5
where i is 0, 1, 2, …,255, Cb in 8-bit pixel spacei=CriN is a quantization parameter.
1.3.3. During the formal use of the image scanning system, the conversion of the pixels of the image from the RGB space to the YCbCr space is carried out according to the lookup table established above, with the components of pixel R, G, B being r, g, b in turn, the corresponding Y, Cb, Cr components are calculated as follows:
Y=(YRr+YGg+YBb)>>n
Cb=(CbRr+CbGg+CbBb)>>n
Cr=(CrRr+CrGg+CrBb)>>n
preferably, the preprocessing includes brightness adaptive adjustment, data rearrangement and single-point linear correction, and the preprocessing method refers to rearranging and correcting the image data in the image acquisition and transmission process by means of the characteristics of parallel processing and high-speed operation of the FPGA in the image acquisition process of the FPGA. The data rearrangement is to rearrange and integrate the output data of the CIS in the FPGA, so that the CIS appears to a microprocessor as regular image data, thereby avoiding the problem that the microprocessor needs to traverse the whole image to adjust the CIS and spending a lot of time. At present, most of CIS tubes mostly adopt multi-segment parallel work for improving the working efficiency, for a CIS with N segments parallel work, when the CIS works in a certain mode, the number of effective data of one line of an image acquired by the CIS is assumed to be M, then the number of effective data of each segment is M/N, after sampling by an ADC, the image data of one line is mixed and output as follows:
Figure BDA0001993025710000071
wherein a isijThe ith effective data representing the jth segment of CIS, the mixed data being data that needs to be readjusted in the FPGA, is first split into the following N segments of data for readjustment in the FPGA:
Figure BDA0001993025710000081
Figure BDA0001993025710000082
Figure BDA0001993025710000083
Figure BDA0001993025710000084
if the frequency of the input mixed data is α, the resulting split data t1、t2、t3…tNIs α/N. data t is then processed at α frequency1、t2、t3…tNThe image data is alternately written into different addresses of the same piece of buffer (which may be ram inside the FPGA or external memory), and then the image data is read out in a sequential manner, so that the rearrangement of the image is completed.
Preferably, the image correction preprocessing is to perform single-point linear correction on the image in the FPGA, that is, by:
Yij=kj(Pij-bj)
each point in the resulting image is compensated. The operation in the FPGA can be completed only by one clock cycle, and compared with the operation in microprocessing, the operation speed is higher, and the real-time requirement of the whole system can be met. However, since the FPGA does not support floating-point operation, Y is required to be processedij=kj(Pij-bj) Specifically, for the original expression, it is first expanded α times as follows:
αYij=αkj(Pij-bj)
considering that the FPGA calculates the correction coefficient k by itselfjAnd bjIn the system, the microprocessor first calculates the correction coefficient and stores the correction coefficient, and then the communication interface stores the correction coefficientAnd forwarding to the FPGA, wherein the FPGA is stored in an internal or external memory in advance and is read out when in calculation. Due to the calculated correction coefficient kjIs necessarily a floating point number, and in order to make it reasonably forwarded to the FPGA and complete the calculation, we will transfer kjConversion to integer plus precision form, i.e. kjConversion to Kj/β, where β is the chosen precision, then the above equation is transformed as:
αYij=α(Kj/β)(Pij-bj)
the accuracy β is chosen according to the parameter k set by usjAnd the maximum magnification factor that the image actually needs to be magnified.
Specifically, first, the parameter k is setjIs set to range from 0 to ω1Then based on the calculated correction parameter kjTo obtain the maximum multiple k to be amplifiedmaxIn order to make the magnification factor meet the requirement of maximum factor, then there are:
kmax≤ω1
the corresponding parameter β should satisfy:
β≤ω1/kmax
in order to make the calculation more accurate, the calculation should be selected with higher precision, and considering that the FPGA does not support floating-point number operation, β should be rounded, so the corresponding parameter β should be:
Figure BDA0001993025710000092
substituting it into the corresponding correction calculation formula, then obtaining:
Figure BDA0001993025710000093
to further improve the image correction effect, we further improve the calculation accuracy, and the correction coefficient k is obtained from the calculationjFrom the calculated correction coefficient kjTo obtain the minimum magnificationkminExtracting the minimum multiple, α Yij=α(Kj/β)(Pij-bj) Can be equivalent to:
Figure BDA0001993025710000091
middle x of the above formulajAnd KjThe range is set to be the same, and is taken as 0 to omega1Similarly, in order to make the magnification factor meet the requirement of the maximum factor, there are:
kmax≤ω1/β+kmin
the corresponding parameter β satisfies:
β≤ω1/(kmax-kmin)
further corresponding accuracy can be improved as:
Figure BDA0001993025710000103
substituting the correction equation into a correction calculation equation to obtain a final calculation equation:
Figure BDA0001993025710000101
after the corresponding result is calculated by the above formula in the FPGA, the obtained result needs to be reduced by α times, that is:
Figure BDA0001993025710000102
normally, the gray scale value should be between 0 and 255, and in order to prevent the corrected gray scale value from overflowing, upper and lower limit determination is required. Specifically, the upper limit is first determined, when Y isijWhen the value of (A) is greater than 255, let YijOutputting 255; then, making a lower limit judgment when P isij-bjWhen less than 0, let YijOutput is 0.
Preferably, the preprocessing further comprises adjusting brightness, contrast and saturation of the image to be scanned.
Preferably, the post-processing comprises real-time processing and transmission of the images.
Preferably, the microprocessor unit performs post-processing on the image data and further comprises image compression, the speed of compressing the image data by the microprocessor in the real-time scanning stage is improved through three aspects of data handling optimization, quantization process optimization and instruction optimization, and the scanning speed of the image is further accelerated.
Preferably, only part of the correction data in the memory unit is replaced when the operating mode is switched to achieve the purpose of rapidly switching the operating mode, and the memory unit at least can store the correction parameters required by the highest-resolution channel image.
According to yet another aspect of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements an image scanning method as in any one of the embodiments of the present invention.
Compared with the prior art, the method has the following beneficial effects by adopting the technical scheme of the invention:
1. the CIS-based image scanning method provided by the invention fully utilizes the computing performance and characteristics of the system, manages the system resources and the working mode, realizes the functions of standby management, scanning mode switching, image quality adjustment, manuscript scanning and the like, improves the universality and compatibility of the image scanning system, and aims to provide a favorable environment for solving the problems;
2. according to the image real-time processing and transmitting method, the system simultaneously collects, processes and transmits the image, so that the purposes of improving the image processing efficiency, reducing the bandwidth requirement of a communication interface and reducing the intermediate waiting time are achieved, the image compression improves the image data compression rate of a microprocessor in a real-time scanning stage, the image processing speed is further accelerated, and the image transmission time is reduced;
3. the brightness automatic standard technology provided by the invention is used for adjusting the overall brightness of each channel of an image and eliminating the difference of the overall brightness of the image caused by different hardware process characteristics;
4. the invention utilizes the FPGA image acquisition preprocessing and image automatic correction method to rearrange and correct the image data in the image acquisition and transmission process, and preprocesses the image in real time by depending on the characteristics of FPGA parallel processing and high-speed operation, thereby reducing the influence of image noise on the image quality.
Drawings
Fig. 1 is a schematic structural diagram of a CIS-based image scanning system according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment provides a CIS-based image scanning system, which comprises a CIS interface module, an image preprocessing module and an image post-processing module;
the input of the CIS interface module is connected with the CIS, the output of the CIS interface module is connected with the input of the image preprocessing module, the output of the image preprocessing module is connected with the input of the image post-processing module, and the output of the image post-processing module is connected with external equipment;
the CIS interface module is used for driving the CIS and transmitting an image scanned by the CIS;
the image preprocessing module is used for carrying out brightness self-adaptive adjustment, data rearrangement and single-point linear correction on the image;
the image post-processing module is used for carrying out format conversion on the preprocessed image and transmitting the processed image.
The CIS interface module comprises a CIS driving circuit and a CIS analog data transmission interface; the CIS driving circuit is used for driving the CIS; the CIS analog data transmission interface is used for transmitting analog data acquired in the process of scanning images by the CIS;
the image acquisition and image preprocessing module comprises an FPGA unit, an analog-to-digital conversion unit and a storage unit which are respectively connected with the FPGA unit; the FPGA unit is used for controlling the normal work of the CIS and the analog-to-digital conversion unit, acquiring image data, preprocessing an image and sending the processed image to the image post-processing module; the analog-to-digital conversion unit is used for converting analog data acquired in the image scanning process of the CIS into digital data; the storage unit is used for storing correction data used in the image preprocessing process of the FPGA unit;
the image post-processing module comprises a microprocessor unit and a communication interface; the micro-processing unit is used for processing and transmitting images in real time and controlling the overall working state of the system; the communication interface is used for communicating and interacting with external equipment and transmitting image data.
In this embodiment, taking image compression as an example, the specific flow of the image scanning method based on the above system is as follows:
firstly, establishing an image quality database for an image;
the specific process is as follows:
1.1.1. the collected images of the front side and the back side do not affect each other, namely the two CIS tubes are installed in a staggered mode, the sensors of the two CIS tubes face the sensors, and the light source faces the light source.
1.1.2. The correction function of the FPGA is canceled, the working mode of the system is set, the specific resolution and the spectrum are selected, and then the offset and the PGA of the ADC are determined according to the following two steps to ensure that the pixels of the image are within the range of a linear interval:
1.1.2.1. firstly, controlling the output of the CIS to be lower than the quantification upper limit of the ADC, determining the time required by the CIS to acquire one line to be T according to the CIS specification and the actual speed of paper feeding, and when the exposure time reaches 0.8T, the output voltage V1 corresponding to the acquisition of white paper by the CIS tube is the maximum output voltage in normal operation, and from the perspective of pixels, the voltage V1 corresponds to the maximum pixel 255. Then, the amplification factor of the ADC to the input voltage is determined according to the selected ADC chip and the set quantization range, and if the selected quantization range is [0, V2], the maximum output voltage of the CIS corresponds to the upper limit value of quantization, i.e., V1 corresponds to V2, so the corresponding amplification factor is:
α=V2/V1
after the specific amplification factor is obtained, the relation between the corresponding PGA and the amplification factor can be obtained according to the corresponding ADC manual, so that the value of the corresponding parameter PGA is determined;
1.1.2.2. after the upper output limit of the CIS is controlled, the lowest output value of the CIS is higher than the quantization upper limit of the ADC, so that the whole output is in the range of a linear interval. From a pixel perspective, the dark output corresponds to the pixel value that would be obtained if the CIS were capturing an image when the light source was turned off. In order to make the lower limit of the CIS output be within the range of the linear region, that is, the pixel corresponding to the dark output is made to be larger than 0. Specifically, the CIS is first turned off to collect one line of image, obtain the point with the minimum gray value in the line of image, and note the gray value as t, determine whether t is equal to 0, if t is equal to 0, adjust the value of the offset parameter according to the relationship between the ADC manual offset and the offset voltage, for example, the offset value range 0-255 corresponds to the offset voltage-250 mv, and then repeat the previous steps until the obtained minimum gray value t >0, so as to exit, and at this time, the corresponding offset value can control the output lower limit of the CIS to be within the range of the linear interval.
The offset and PGA of the ADC are fixed after being determined from the ADC parameters and actual experiments.
The following eliminates the sensitivity differences between different CIS by adaptive exposure time adjustment:
1.1.3. determining the maximum exposure time T supported by the CIS according to the specificationMSetting an exposure time T1As a starting point of control, where T1<=TMDetermining the maximum value P of each pixel in a single color channel according to the storage mode of the image in the systemMDetermining the overall brightness of the image after the brightness standard according to the application scene and the user requirement, and taking the maximum column average value P of the pixel in the single color channelLRepresenting the overall brightness of the image. White paper in brightness standard processThe image acquisition device is fixed between CISs to ensure that the targets of the acquired images are the same each time;
1.1.4. acquiring a white paper image according to the set exposure time, setting to acquire m rows and n columns of images, and acquiring PijThe adaptive exposure compensation value Δ T is calculated according to the following formula, which represents the pixel values in the ith row and j column.
Figure BDA0001993025710000141
1.1.5. Adjusting the exposure time T according to the following formula
Tx+1=Tx+ΔT
Where x is 1, 2, 3, …, N, N is the number of iterations, if Δ T < ═ TM/PMIf yes, the brightness standard is finished, and the brightness of each pixel of the image obtained by scanning in the current exposure time is close to PL(ii) a Otherwise, after the exposure time is updated, the previous step is repeatedly executed, and the exposure time is subjected to iterative updating calculation by using a new self-adaptive exposure compensation value. If calculated in N iterations, i.e. x>If the brightness standard is not finished after N, the CIS or the hardware circuit part has defects, so that the whole brightness of the image can not meet the requirement of the brightness automatic standard all the time, exiting the adjusting process and returning the information of exiting overtime to the user;
1.1.6. and if the self-adaptive exposure time adjusting step is successfully completed, saving the adjusted exposure time, and controlling the CIS to acquire images by using the exposure time in the working mode.
The traditional CIS image correction method comprises a single-point compensation method and a multi-point linear correction method. The single point compensation method is to set a standard paper and a standard brightness, calculate the difference between the average brightness of each column of image lines and the standard brightness obtained by scanning the standard paper, and superimpose the corresponding difference on each column of image obtained by formal scanning of the system to achieve the purpose of correction. The method has the advantages that the correction process is simple; the disadvantage is that the correction is poor, especially when the brightness difference between the manuscript to be scanned and the standard paper is large, the image still has obvious vertical noise. The multi-point linear correction method is to set various standard papers and standard brightness, and to correct the image by adopting linear transformation between each standard point. The method has the advantages that the correction effect is good, and the correction effect is positively correlated with the number of the selected standard points; the defects are that the complexity of the correction process is positively correlated with the number of the selected standard points, and the multi-standard paper is difficult to obtain in daily life and the standard brightness is difficult to judge.
The invention provides single-point linear correction, which is used for eliminating vertical noise superposed on a CIS scanning image by setting a standard paper and standard brightness thereof and combining an image obtained by paperless scanning to perform linear correction. The method has simple correction process and good correction effect, and meanwhile, the production maintenance process of the system is simplified by setting only one standard paper. Preferably, the common A4 printing white paper is used as standard paper, and the specific flow is as follows:
1.2.1. and setting the working mode of the system. And scanning by adopting parameters subjected to image brightness adaptive standards, and canceling the automatic correction function of the FPGA.
1.2.2. Collecting image without paper scanning, and setting collection m1Lines and n columns of images, DijIs the brightness of the ith row and jth column pixel in the image, wherein i<=m1,j<N. The standard brightness of the scanned image without paper is set as DS. Preferably, DSSet as the minimum value of pixel, D under the image represented by 8-bit pixelSTake 0.
1.2.3. Collecting images during white paper scanning, and setting collection m2Lines and n columns of images, BijIs the brightness of the ith row and jth column pixel in the image, wherein i<=m2,j<N. The standard brightness of the scanned white paper image is BS. Preferably, BSSet as the maximum value of the pixel, B under the image represented by 8-bit pixelSAnd taking 255.
1.2.4. Calculating a correction parameter k for each column according tojAnd bjAnd updating and storing the correction parameters.
Figure BDA0001993025710000151
Figure BDA0001993025710000152
Where j is 1, 2, 3, …, n.
1.2.5. During formal scanning, the ith row and j column pixels of the CIS collected image are corrected according to the following formula. Original image pixel value is PijAfter correction, the corresponding image pixel value is Yij
Yij=kj(Pij-bj)
Furthermore, the image is operated on the user computer, the processing mode has certain requirements on the performance of the user computer, and the image quality quick adjustment refers to the adjustment of the image brightness, the contrast and other qualities on the microprocessor unit. The method realizes the rapid adjustment of the image quality by establishing a color space mapping table. The purpose of establishing the color space mapping table is to simultaneously adjust the quality characteristics of the image, such as brightness, saturation and the like when the system needs to convert the color space of the scanned image. The process of image color space conversion often uses a look-up table algorithm. The image quality quick adjustment method provided by the invention improves the lookup table algorithm, quickly adjusts the quality of the image while performing color space conversion on the image, and quickly adjusts the quality of the image after single-point linear correction of the image, thereby finding that the image quality is greatly improved. Here, taking the adjustment of the image brightness in the process of converting the RGB space into the YCbCr space as an example, the specific process is as follows:
1.3.1. establishing a brightness sub-component table after numerical adjustment, and performing brightness correction by using a gamma correction algorithm:
Figure BDA0001993025710000161
wherein i is 0, 1, 2, …,255, Y in 8-bit pixel spacei=i;PMIs the maximum value of the pixel luminance component in YCbCr space; y isiIs the pre-adjustment image pixel luminance component; y isi' is the adjusted image pixel luminance component; gamma is gamma correction parameter, which can be adjusted according to actual requirementAnd (5) line selection and adjustment.
1.3.2. Using Yi' instead of YiEstablishing a lookup table for converting RGB to YCbCr space, wherein the lookup table can be established as follows:
YRi=Yi′×0.299×(1<<n)+0.5
YGi=Yi′×0.587×(1<<n)+0.5
YBi=Yi′×0.114×(1<<n)+0.5
CbRi=Cbi×(-0.169)×(1<<n)+0.5
CbGi=Cbi×(-0.331)×(1<<n)+0.5
CbBi=Cbi×0.500×(1<<n)+0.5
CrRi=Cri×0.500×(1<<n)+0.5
CrGi=Cri×(-0.419)×(1<<n)+0.5
CrBi=Cri×(-0.081)×(1<<n)+0.5
where i is 0, 1, 2, …,255, Cb in 8-bit pixel spacei=CriN is a quantization parameter.
1.3.3. During the formal use of the image scanning system, the conversion of the pixels of the image from the RGB space to the YCbCr space is carried out according to the lookup table established above, with the components of pixel R, G, B being r, g, b in turn, the corresponding Y, Cb, Cr components are calculated as follows:
Y=(YRr+YGg+YBb)>>n
Cb=(CbRr+CbGg+CbBb)>>n
Cr=(CrRr+CrGg+CrBb)>>n
specifically, the system mode includes a standby mode, a scan mode, and an image quality update mode; the standby mode is that when the system is idle, the working power is reduced, and the purposes of energy conservation and environmental protection are achieved.
The system enters the standby mode flow as follows:
2.1.1.1. the external device informs the microprocessor to enter a low power consumption mode;
2.1.1.2. the microprocessor informs the FPGA to enter a low power consumption mode;
2.1.1.3, the FPGA enters a low power consumption mode, including setting peripherals such as an ADC (analog to digital converter), an SRAM (static random access memory) and the like to enter a standby mode, turning off working clocks of the peripherals, reducing the working frequency of the FPGA and the like;
2.1.1.4. the FPGA informs the microprocessor that the microprocessor enters a low power consumption mode;
2.1.1.5. the microprocessor enters a low power consumption mode, including powering off the CPU; storing the running context in RAM; adjusting the working mode, voltage and frequency of each memory and peripheral;
2.1.1.6. the microprocessor informs the external device that the system has entered a low power mode.
The system exits the standby mode as follows:
2.1.2.1. the external device informs the microprocessor to exit the low power consumption mode;
2.1.2.2. the microprocessor exits the low power consumption mode by itself, including powering the CPU; restoring the running context stored in the RAM; adjusting the working mode, voltage and frequency of each memory and peripheral;
2.1.2.3. the microprocessor informs the FPGA to exit the low power consumption mode;
2.1.2.4, the FPGA exits the low power consumption mode, and the standby mode is exited by peripherals such as ADC, SRAM and the like; recovering a working clock of the peripheral; restoring the working frequency of the device per se and the like;
2.1.2.5. the FPGA informs the microprocessor that the microprocessor exits the low power consumption mode;
2.1.2.6. the microprocessor informs the external device that the system has exited the low power mode.
The external device issues a control instruction to the microprocessor unit and enters a scanning mode.
The user actively switches according to images of different scanning types and resolutions, and the specific process of mode fast switching is as follows:
3.1. calculating the data volume of correction parameters of the system according to the single-channel image scanned by the system at the highest resolution, reserving the space with the same size in a storage unit as a parameter replacement space, and reserving the rest space in the storage unit as a parameter reservation space;
3.2. when the system is powered on, the microprocessor reads the correction data used by the image with the highest channel number under the highest resolution of the system from the external memory, except the first channel, the correction data used by the other channels are sent to the FPGA unit through the external bus, and the FPGA unit stores the correction data in the parameter reservation space in the storage unit;
3.3. if the residual space in the storage unit parameter retention space is enough, the microprocessor sends correction parameters used in each working mode except for the first channel to the FPGA unit according to the sequence of the resolution from high to low and the number of channels from high to few, and the FPGA unit stores the correction data in the parameter retention space of the storage unit until all the correction parameters except the first channel in each working mode are sent to the FPGA unit or the residual space of the parameter retention space of the storage unit is insufficient;
3.4. the microprocessor informs the external equipment of finishing initialization through the communication interface;
3.5. the external equipment sends a control instruction through a communication interface to inform the system of configuring a working mode;
3.6. the microprocessor reads the first channel correction parameter in the working mode, sends the first channel correction parameter to the FPGA unit and stores the first channel correction parameter in the parameter replacement space; if the other channel correction parameters need to be stored in the working mode, the microprocessor determines whether to send the other parameters according to whether a backup exists in the parameter retention space of the storage unit; if the backup exists, the parameters do not need to be sent; if the backup does not exist, sending the parameters and preferentially replacing the correction data of the channel image with smaller resolution in the storage unit;
3.7. the microprocessor reads the parameters such as the setting of the analog-digital conversion unit, the CIS exposure time and the like stored in the external memory, sends the parameters to the FPGA unit for corresponding configuration, updates the color space conversion table and informs the external equipment that the switching of the working mode is finished. Go back to step 3.5.
Specifically, the CIS scanning the image includes the passage of the document through a CIS scanning area at a corresponding scanning speed in different scanning modes; the FPGA unit controls a CIS scanning mode through a CIS driving circuit; the FPGA unit sets an analog-digital conversion unit working mode according to the CIS scanning mode, and the analog-digital conversion unit converts the acquired analog data into digital data; the FPGA unit preprocesses the digital data; and the FPGA unit sends the preprocessed image data to the microprocessor unit, and the microprocessor unit carries out post-processing and transmission on the image data.
The FPGA unit preprocesses the digital data by rearranging and correcting the image data in the image acquisition and transmission process by depending on the characteristics of parallel processing and high-speed operation of the FPGA in the image acquisition and transmission process of the FPGA, wherein the rearranging of the image data is that the output data of the CIS is rearranged and integrated in the FPGA, so that the image data looks like a regular image data to a microprocessor, and the microprocessor is prevented from traversing the whole image to adjust the image and spending a large amount of time. At present, most of CIS tubes mostly adopt multi-segment parallel work to improve the working efficiency, and for a three-segment parallel work CIS, when the tube works under 100dpi, that is, one row of effective data is 864, after sampling by an ADC, one row of image data is mixed output:
[a0b0c0a1b1c1a2b2c2.........a286b286c286a287b287c287]
the mixed data is data that needs to be readjusted in the FPGA, and in order to readjust in the FPGA, the data is first split, that is, split into the following three pieces of data:
t0=[a0a1a2...a285a286a287]
t1=[b0b1b2...b285b286b287]
t2=[c0c1c2...c285c286c287]
if the frequency of the input mixed data is α, the resulting split data t0、t1、t2α/3, followed by data t at α0、t1、t2The rearrangement of the image is completed by alternately writing the image data into different addresses of the same buffer and then reading the image data out in a sequential manner, wherein in order to ensure the integrity of the image, the technology of Ping-Pong buffer is required to be used, that is, when the image data of the current line is buffered, the image data of the previous line is output.
The image correction is a method for processing the image to eliminate the difference between the CIS tube longitudinal sensors by firstly amplifying and then reducing in an FPGA unit without floating point operation, and the rapid processing of the image is realized. The image correction preprocessing is to perform single-point linear correction on an image in an FPGA (field programmable gate array), namely, the image correction preprocessing is performed by:
Yij=kj(Pij-bj)
each point in the resulting image is compensated. In order to ensure the accuracy of the calculation in the FPGA, the method adopted here is a method of performing first enlargement and then reduction on the original expression, specifically, for the original expression, firstly enlarging it by α times, then:
αYij=αkj(Pij-bj)
considering that the FPGA calculates the correction coefficient k by itselfjAnd bjIn the system, the microprocessor firstly calculates the correction coefficient and stores the correction coefficient, then the correction coefficient is forwarded to the FPGA unit through the communication interface, and the FPGA unit is stored in an internal or external memory in advance and read out when calculating. Due to the calculated correction coefficient kjIs necessarily a floating point number, and in order to make it reasonably forwarded to the FPGA and complete the calculation, we will transfer kjConversion to integer plus precision form, i.e. kjConversion to Kj/β, where β is the chosen precision, then the above equation is transformed as:
αYij=α(Kj/β)(Pij-bj)
the accuracy β is chosen according to the parameter k set by usjAnd the maximum magnification factor that the image actually needs to be magnified.
Firstly, the parameter k isjIs set to range from 0 to ω1,ω1Is a preset value and then according to the calculated correction parameter kjTo obtain the maximum multiple k to be amplifiedmaxAnd the minimum multiple kminIn order to make the magnification factor meet the maximum factor requirement, the corresponding parameter β satisfies:
β≤ω1/(kmax-kmin)
further corresponding accuracy can be improved as:
Figure BDA0001993025710000213
substituting the correction equation into a correction calculation equation to obtain a final calculation equation:
Figure BDA0001993025710000211
after the corresponding result is calculated by the above formula in the FPGA, the obtained result needs to be reduced by α times, that is:
Figure BDA0001993025710000212
normally, the gray scale value should be between 0 and 255, and in order to prevent the corrected gray scale value from overflowing, upper and lower limit determination is required. Specifically, the upper limit is first determined, when Y isijWhen the value of (A) is greater than 255, let YijOutputting 255; then, making a lower limit judgment when P isij-bjWhen less than 0, let YijOutput is 0.
The microprocessor unit processes the image data in real time, transmits the image data, automatically adjusts the image quality, and compresses the image data. For the compression of images, JPEG is taken as an example, and mainly includes optimization of three aspects, data handling optimization, quantization optimization and instruction optimization.
Data handling optimization
For data transportation optimization, because the speed of DMA transporting data is faster than the speed of CPU compressing data, the image can be processed in a mode of parallel DMA transporting data and CPU compressing data, and the specific flow is as follows:
4.1.1. and applying for the cache in the cache. Setting a block which is compressed once and processes m × n, wherein the depth of the image is d, one pixel is stored in a computer by using h bytes, and the applied cache size is m × n × d × h × 2;
4.1.2. rapidly carrying the first block to a half of a Ping-Pong cache by using a CPU;
4.1.3. using DMA to transfer the next block to the other half of the Ping-Pong cache, and simultaneously compressing the block transferred to the Ping-Pong cache;
4.1.4. if the block which is not carried into the cache for compression exists, jumping back to 4.1.3, otherwise, turning to 4.1.5;
4.1.5. and compressing the block which is finally moved to the Ping-Pong buffer.
(II) quantitative optimization
For quantization process optimization, in a microprocessor without a division operator, the division operation quantized in the compression algorithm can be changed into a combination of multiplication operation and shift operation, so that the image compression speed is accelerated, and the specific flow is as follows:
4.2.1. determining a multiplication table according to a quantization table in a JPEG compression process, and adopting 8 bits of shift operation bits, so that for data x in the quantization table, corresponding data in the multiplication table is y ═ 256/x, wherein [ ] is a down rounding operator;
4.2.2. if the data to be quantized is d, the original quantization operation is [ d/x ], and the improved quantization operation is (d x y) > > 8.
(III) instruction optimization
For instruction optimization, taking a microprocessor unit as an example of a DSP, the specific flow is as follows:
4.3.1. using an inline function to complete fast DCT transformation;
4.3.2. informing a compiler that the first address of the DCT-transformed data in the cache is aligned with the boundary, and performing word-based operation;
4.3.3. the DCT transformed data is of halfword type, two DCT transformed data are packed into one word for subsequent improved quantization operation, i.e. a combination of the above multiplication and shift operations. The DSP can process two data through one instruction, so that the operation efficiency is improved;
4.3.4. and informing the compiler that the quantization operation cycle number of each block in the compression is fixed, and improving the pipelined computation performance of the DSP.
After the image acquisition and compression step is completed, waiting for the microprocessor to send out all the data which are compressed in the compressed picture buffer zone but not sent yet, and after the scanning is finished, resetting the program to wait for the next scanning.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (4)

1. The CIS-based image scanning system is characterized by comprising a CIS interface module, an image preprocessing module and an image post-processing module;
the input of the CIS interface module is connected with a CIS, the output of the CIS interface module is connected with the input of the image preprocessing module, the output of the image preprocessing module is connected with the input of the image post-processing module, and the output of the image post-processing module is connected with external equipment;
the CIS interface module is used for driving the CIS and transmitting an image scanned by the CIS;
the image preprocessing module is used for carrying out brightness self-adaptive adjustment, data rearrangement and single-point linear correction on the image; the single-point linear correction specifically includes:
1.2.1. setting the working mode of the system: scanning by adopting parameters subjected to image brightness adaptive standards, and canceling the automatic correction function of the FPGA;
1.2.2. collecting image without paper scanning, and setting collection m1Lines and n columns of images, DijIs the brightness of the ith row and jth column pixel in the image, wherein i<=m1,j<N; the standard brightness of the scanned image without paper is set as DS
1.2.3. Collecting images during white paper scanning, and setting collection m2Lines and n columns of images, BijIs the brightness of the ith row and jth column pixel in the image, wherein i<=m2,j<N; the standard brightness of the scanned white paper image is BS
1.2.4. Calculating a correction parameter k for each column according tojAnd bjUpdating and saving the correction parameters:
Figure FDA0002571306410000011
Figure FDA0002571306410000012
wherein j is 1, 2, 3, …, n;
1.2.5. during formal scanning, the ith row and j column pixels of the CIS acquired image are corrected according to the following formula, and the pixel value of the original image is PijAfter correction, the corresponding image pixel value is Yij
Yij=kj(Pij-bj)
The image post-processing module is used for carrying out format conversion on the preprocessed image and transmitting the processed image.
2. The system of claim 1, wherein the CIS interface module comprises a CIS drive circuit and a CIS analog data transmission interface; the CIS driving circuit is used for driving the CIS; the CIS analog data transmission interface is used for transmitting analog data acquired in the image scanning process of the CIS to the image preprocessing module;
the image preprocessing module comprises an FPGA unit, an analog-to-digital conversion unit and a storage unit which are respectively connected with the FPGA unit; the FPGA unit is used for controlling the CIS and the analog-to-digital conversion unit, acquiring image data, preprocessing an image and sending the processed image to the image post-processing module; the analog-to-digital conversion unit is used for converting analog data acquired in the image scanning process of the CIS into digital data; the storage unit is used for storing data used in the image preprocessing process of the FPGA unit;
the image post-processing module comprises a microprocessor unit and a communication interface; the microprocessor unit is used for processing and transmitting images in real time; the communication interface is used for communicating and interacting with external equipment and transmitting image data.
3. An image scanning method based on the system of claim 1 or 2, comprising:
if the mobile phone is in the standby mode, the working clock of the peripheral is turned off;
if the image quality database is in the updating mode, executing the parameter calculation processes of brightness self-adaptive adjustment, data rearrangement and single-point linear correction, and updating the image quality database; the single-point linear correction specifically includes:
1.2.1. setting the working mode of the system: scanning by adopting parameters subjected to image brightness adaptive standards, and canceling the automatic correction function of the FPGA;
1.2.2. collecting image without paper scanning, and setting collection m1Lines and n columns of images, DijIs the brightness of the ith row and jth column pixel in the image, wherein i<=m1,j<N; the standard brightness of the scanned image without paper is set as DS
1.2.3. Collecting images during white paper scanning, and setting collection m2Lines and n columns of images, BijIs the brightness of the ith row and jth column pixel in the image, wherein i<=m2,j<N; the standard brightness of the scanned white paper image is BS
1.2.4. Calculating a correction parameter k for each column according tojAnd bjUpdating and saving the correction parameters:
Figure FDA0002571306410000031
Figure FDA0002571306410000032
wherein j is 1, 2, 3, …, n;
1.2.5. during formal scanning, the ith row and j column pixels of the CIS acquired image are corrected according to the following formula, and the pixel value of the original image is PijAfter correction, the corresponding image pixel value is Yij
Yij=kj(Pij-bj)
If the image is in a scanning mode, establishing a color space mapping table and an image quality database, scanning and preprocessing an image to be scanned by using the color space mapping table and the image quality database, wherein the scanning and preprocessing comprise brightness self-adaptive adjustment, data rearrangement and single-point linear correction, then adjusting the brightness, contrast and saturation of the image to be scanned, and processing and transmitting the preprocessed image in real time to obtain an image in a preset format.
4. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of claim 3.
CN201910186466.8A 2019-03-13 2019-03-13 Image scanning system and method based on CIS and storage medium Active CN110022420B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910186466.8A CN110022420B (en) 2019-03-13 2019-03-13 Image scanning system and method based on CIS and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910186466.8A CN110022420B (en) 2019-03-13 2019-03-13 Image scanning system and method based on CIS and storage medium

Publications (2)

Publication Number Publication Date
CN110022420A CN110022420A (en) 2019-07-16
CN110022420B true CN110022420B (en) 2020-09-08

Family

ID=67189533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910186466.8A Active CN110022420B (en) 2019-03-13 2019-03-13 Image scanning system and method based on CIS and storage medium

Country Status (1)

Country Link
CN (1) CN110022420B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113766142B (en) * 2020-06-05 2023-07-25 Oppo广东移动通信有限公司 Image processing apparatus, image signal preprocessing module, device, and processing method
CN114007009B (en) * 2020-07-15 2023-08-18 Oppo广东移动通信有限公司 Electronic device and image processing method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2341328Y (en) * 1998-03-18 1999-09-29 亚葳科技股份有限公司 Scanner using battery supply
CN1360440A (en) * 2002-01-31 2002-07-24 北京理工大学 Miniaturized real-time stereoscopic visual display
US7016550B2 (en) * 2002-04-19 2006-03-21 Lockheed Martin Corporation Scene-based non-uniformity offset correction for staring arrays
CN103063290A (en) * 2012-12-14 2013-04-24 上海华魏光纤传感技术有限公司 Novel real-time data acquisition and signal process device used for optical fiber vibration measurement system and implementation method thereof
CN101299794B (en) * 2007-04-30 2013-06-12 兄弟工业株式会社 Image reading device
CN104104825A (en) * 2014-07-03 2014-10-15 宁波术有电子科技有限公司 Double-sided scanner acquisition system based on FPGA and scanning and correction method thereof
CN104113675A (en) * 2014-07-09 2014-10-22 宁波摩视光电科技有限公司 Image real-time correction output method for broad-width scanner
CN106551703A (en) * 2015-09-30 2017-04-05 上海联影医疗科技有限公司 Computer tomography method and computed tomography imaging system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2341328Y (en) * 1998-03-18 1999-09-29 亚葳科技股份有限公司 Scanner using battery supply
CN1360440A (en) * 2002-01-31 2002-07-24 北京理工大学 Miniaturized real-time stereoscopic visual display
US7016550B2 (en) * 2002-04-19 2006-03-21 Lockheed Martin Corporation Scene-based non-uniformity offset correction for staring arrays
CN101299794B (en) * 2007-04-30 2013-06-12 兄弟工业株式会社 Image reading device
CN103063290A (en) * 2012-12-14 2013-04-24 上海华魏光纤传感技术有限公司 Novel real-time data acquisition and signal process device used for optical fiber vibration measurement system and implementation method thereof
CN104104825A (en) * 2014-07-03 2014-10-15 宁波术有电子科技有限公司 Double-sided scanner acquisition system based on FPGA and scanning and correction method thereof
CN104113675A (en) * 2014-07-09 2014-10-22 宁波摩视光电科技有限公司 Image real-time correction output method for broad-width scanner
CN106551703A (en) * 2015-09-30 2017-04-05 上海联影医疗科技有限公司 Computer tomography method and computed tomography imaging system
CN106551703B (en) * 2015-09-30 2018-10-30 上海联影医疗科技有限公司 Computer tomography method and computed tomography imaging system

Also Published As

Publication number Publication date
CN110022420A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN110022420B (en) Image scanning system and method based on CIS and storage medium
CN112202986B (en) Image processing method, image processing apparatus, readable medium and electronic device thereof
CN101895660A (en) Image processing equipment and image processing method
JP2001054013A5 (en)
CN101188648B (en) Electronic blackboard
JP2008035502A (en) Multifunctional printer and image processing method
CN102055914A (en) Signal processing apparatus, signal processing method and computer program
US20040041920A1 (en) Image forming method, image processing apparatus, and image recording apparatus
JP2004096500A (en) Image pickup apparatus, image processing apparatus, and image recording apparatus
KR101236387B1 (en) Image foaming apparatus and control method thereof
JP2017184040A (en) Image processing device, and computer program
CN108462808B (en) Scanner photoelectric system and control method thereof
US8072516B2 (en) Dynamic range enhancement method and apparatus
JP2006303710A (en) Reading apparatus and control method of reading apparatus
JP2012110036A (en) Printer
JP2014045415A (en) Image processing apparatus, image forming apparatus, and image processing method
JP5607345B2 (en) Image processing apparatus and image processing method
JP4142524B2 (en) Image reading apparatus and image reading method
JP2005252392A (en) Image processing apparatus and method therefor, computer program and computer-readable storage medium
JP2012060491A (en) Image processing apparatus, image processing method and program for the method
JP2004289375A (en) Image processor and camera
WO2012137478A1 (en) Image reading system, information processing device, and program
US7755803B2 (en) Image reading device and method, and an image forming apparatus and method
CN1303805C (en) Method of and apparatus for enlarging image and printing enlarged image
JPH11355586A (en) Device and method for processing image

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