Summary of the invention
Therefore, main purpose of the present invention provides a kind of conversion method that increases the bit rate of scanned signals of scanner, just increase the method for the digital image signal of scanner output, to increase the bit number of digital image signal, the image frame that scanning is exported is finer and smoother, color is abundanter.
Conversion method of the present invention is achieved in that the conversion method of a kind of increase by the bit number of the digital image signal that scanner produced, this scanner includes: one has the scanning module of the scanning element of a plurality of one-tenth linear array, is used for scanning a file and produces a plurality of corresponding analog image signals; One analog/digital converter is used for each analog image conversion of signals is become a digital image signal with first bit number, and this conversion method includes the following step:
(1) provides a white correcting area and a black correction zone;
(2) utilize each scanning element of this scanning module to scan this white and black correction zone, to produce a plurality of corresponding whites and black analog image signal, and utilize this analog/digital converter to change a plurality of whites and black analog image signal that each scanning element produces, to produce a plurality of corresponding whites and black numbers signal of video signal;
(3) number of the white digital image signal of each scanning element is 2
mIndividual, m is an integer, can be expressed as Wi, wherein i=1-2
m, and the number of the black numbers signal of video signal of each scanning element is 2
nIndividual, n is an integer, can be expressed as Bj, wherein j=1-2
n, and a predetermined mapped method changes each digital image signal that this scanning element is produced during this document in scanning, producing a digital image signal with second bit number, and this second bit number is greater than this first bit number; Wherein, mapping method includes the following step:
(1) a plurality of white digital image signal addition with each scanning element is expressed as Ws, wherein
(1) a plurality of black numbers signal of video signal addition with each scanning element is expressed as Bs, wherein
(3) and this scanning element can convert a conversion value R to by following formula at each digital image signal X that scanning is produced during this document:
Wherein this mapping method is a real number white mean value of obtaining a plurality of white digital image signals of each scanning element earlier with the real number division, and the real number black mean value of a plurality of black numbers signal of video signal, and then change each digital image signal that this scanning element is produced during this document in scanning according to this real number white and black mean value, producing the conversion value of a real number, again this real number conversion value is converted to a digital image signal with this second bit number at last.
Wherein a plurality of whites of each scanning element and black numbers signal of video signal can be expressed as Wi and Bj respectively, i=1-m wherein, j=1-n, and the real number of each scanning element white mean value W and black mean value B can be tried to achieve by following two formula:
And each digital image signal X that this scanning element is produced when scanning this document can convert an aforesaid real number conversion value R to by following formula:
Embodiment
See also Fig. 1.Fig. 1 is the schematic diagram of scanner 10.The present invention is a kind of conversion method that increases the digital image signal bit number, is used for increasing the bit number of the digital image signal that one scan device 10 produced.To be example below, and illustrate and utilize eight digital bit signal of video signal after the conversion method of the present invention to can be exchanged into the digital image signal data (span is positioned at 0 to 65535) of 16 bits with the scanner 10 of originally only exporting eight digital bit signal of video signal (span is positioned at 0 to 255)
Scanner 10 includes one scan module 12, be used for scanning a file and produce a plurality of corresponding analog image signals, one analog/digital converter 14 is used for each analog image conversion of signals is become a digital image signal with eight bits, a white correcting area 16 and a black correction zone 18.Scanning module 12 includes a plurality of scanning elements 22,24,26,28 that are linear array etc.Conversion method of the present invention is before 10 pairs one files to be scanned of scanner scan, earlier by the white correcting area 16 of scanning module 12 scannings and black correction zone 18 to proofread and correct, each scanning element then can produce a plurality of corresponding whites and black analog image signal earlier.Analog/digital converter 14 can be changed a plurality of whites and black analog image signal that each scanning element produced then, to produce the digital image signal of a plurality of corresponding eight bit whites and black.At last change each digital image signal that this scanning element is produced when the scanning document, to produce a digital image signal with 16 bit numbers according to the digital image signal of a plurality of eight bit whites of each scanning element and black and a predetermined mapped method.
Please refer to table 1, table 1 is proofreaied and correct the resulting numerical tabular in back for scanning element 22,24.With the scanning element in the scanning module 12 22,24 is example, scanning element 22,24 is when the white correcting area 16 of scanning, respectively four scan line W1, W2, W3, W4 are taken a sample, each changes out two group of eight digital bit signal of video signal (231,233,232,233) and (234,235,234,231) by analog/digital converter 14; Scanning black correction zone 18 o'clock, respectively eight scan line B1, B2, B3, B4, B5, B6, B7, B8 are taken a sample, also each changes out two group of eight digital bit signal of video signal (31,32,34,32,33,31,32,31) and (32,34,33,31,32,33,31,34) by analog/digital converter 14.
All respectively after white correcting area 16 and black correction zone 18 obtain some somes samplings, just eight digital bit signal of video signal being carried out the conversion of bit number for each scanning element, below be that example illustrates switch process and conversion formula with scanning element 22:
(a) for being calculated its mean value W mutually at white correcting area 16 resulting one group of eight digital bit signal of video signal (231,233,232,233):
(b) for being calculated its mean value B mutually at black correction zone 18 resulting one group of eight digital bit signal of video signal (31,32,34,32,33,31,32,31):
(c) suppose scanning element 22 after treating scanning document and scanning, resultant eight digital bit signal of video signal can be expressed as X, and the following conversion formula of substitution can be tried to achieve a real number conversion value R1:
(d) this real number conversion value R1 is taken advantage of 2
16=(65536) are rounded up or only round numbers part again, just can obtain 16 digital bit signal of video signal Y1.
Need be illustrated a bit at this, if scanning element 22 is after treating scanning document and scanning, resultant eight digital bit signal of video signal X are littler than mean value B, resulting real number conversion value R1 can present negative value, and just define the 16 digital bit signal of video signal of changing out this moment is 0; In like manner, if the 16 digital bit signal of video signal that conversion is come out greater than 2
16During-1=(65535), just defining its value is 65535.
Scanning element 24 to (c), also can obtain W=233.5 through same above-mentioned step (a), and so B=32.5 is to obtaining following conversion formula in scanning element 24:
R2 multiply by 2 with this real number conversion value
16=(65536) are rounded up or only round numbers part again, just can obtain 16 digital bit signal of video signal Y2.
If scanning element 22,24 etc. 18 o'clock in white correcting area 16 of scanning and black correction zone, the number of scanning lines of being taken a sample is two multiple, and just each scanning element is 2 in the number of the white digital image signal of the white correcting area 16 back gained of scanning
mIndividual, m is an integer, can be expressed as Wi (i=1-2
m), and each scanning element is 2 in the number of the black numbers signal of video signal of scanning black correction zone 18 back gained
nIndividual, n is an integer, can be expressed as Bj (j=1-2
n), then conversion formula can be rewritten as:
Wherein, order
With scanning element 22 is example, and above-mentioned steps (a) to (d) can change the following step (e) into and arrive (h):
(e) for being calculated its summation Ws mutually at white correcting area 16 resulting one group of eight digital bit signal of video signal (231,233,232,233):
(f) for being calculated its summation Bs mutually at the black correction zone resulting one group of eight digital bit signal of video signal of M (31,32,34,32,33,31,32,31):
(g) suppose scanning element 22 after treating scanning document and scanning, resultant eight digital bit signal of video signal can be expressed as X, and then the relation of X and conversion value R ' 1 can be expressed as following conversion formula:
(h) equally this conversion value R ' 1 be multiply by 2
16Behind=(65536), the value of substitution X is calculated, and with result's round numbers part or rounded up, just can obtain the digital image signal Y ' 1 of 16 bits.
This way is the division that just carries out integer when step (h), therefore can avoid making some accumulative total property errors that division may produce earlier in intermediate steps.According to above-mentioned switch process and conversion program, just eight digital bit signal of video signal X of scanning element 22 gained can be converted to the digital image signal Y ' 1 of 16 bits; In like manner, eight digital bit signal of video signal of gained such as scanning element 24,26,28 also according to this step conversion be digital image signal Y ' 2, Y ' 3, Y ' 4 of 16 bits etc.
Please refer to table 2.Table 2 show the different scanning unit via the present invention the transformation result done of corresponding conversion formula.Eight digital bit signal of video signal of different scanning unit 22,24 are changed via following corresponding conversion formula, can be obtained result as table 2:
First hurdle is the possible span of X, from 0 to 255 totally 256 different values; Second hurdle is the possible span of 16 digital bit signal of video signal Y1 that the digital image signal of scanning element 22 is changed out via corresponding conversion formula, because part mapping to 0 and 65535 identical output are arranged, therefore can count totally 203 different values; And the possible span of 16 digital bit signal of video signal Y2 that third column is the digital image signal of scanning element 24 to be changed out via corresponding conversion formula has part mapping to 0 and 65535 identical output equally, can count totally 204 different values.Can be observed out by table two, Y1 and Y2 are except end points 0 and 65535, and when only reaching (X, Y1)=(167,43854) in (X, Y2)=(166,43854), Y1, Y2 have identical value, and other are then all inequality.That is to say, when having only scanning element 22,24,256 different input values can obtain 203+204-3=404 different output valves, yet when the scanning element number becomes for a long time, the scope that output valve contains is wide more, even may contain the major part in the output span 0 to 65535, also therefore utilizes conversion method of the present invention that the output image signal bit number is increased, the output picture seems finer and smoother, and color is also abundanter.
The present invention utilizes each scanning element to scan white and black correction zone, change each digital image signal that scanning element is produced when scanning one file according to a plurality of corresponding white of gained and black numbers signal of video signal and predetermined mapped method then, have the digital image signal of big bit number with generation.The present invention is the bit number that increases the digital image signal of output in the mode of software, therefore can use the scanner of same hardware equipment that the more output digital image signal of multi-bit is provided, the image frame that picture is finer and smoother, color is abundanter not only is provided, does not also need to increase simultaneously the cost of hardware device.