Background technology
The employed optical sensor spare of general color scanner is colored charge coupled device (Charge Couple Device, CCD) or contact image sensor (Contact ImageSensor, CIS), this colored charge coupled device is made up of many sensing units (Sensor Cell), it can sense R, G, the trichromatic luminous intensity of B (Red, Green, Blue), and sensed result is sent R charge signal, G charge signal and B charge signal respectively.Resulting R charge signal, G charge signal and B charge signal still need to do signal processing, could be as the input signal of late-class circuit.Shown in the partial circuit figure of signal processing that Fig. 1 illustrates known scanner, R charge signal, G charge signal and B charge signal are sent into sampling displacement enlargement device (Sampling-Amplified-Offset Device) 102,104,106 respectively, sampling displacement enlargement device 102,104,106 produces R analog signal, G analog signal and B analog signal respectively after respectively R charge signal, G charge signal and B charge signal being done sampling, amplification and the compensation of accurate position.Then, multiplexer 108 is delivered to analog-digital converter 110 one by one with R analog signal, G analog signal and B analog signal respectively, and analog-digital converter 110 will receive its analog signal conversion again and become digital signal, and digital signal is delivered to late-class circuit.
When the chromoscan result will export with gray scale scanning, general way is with optional one of them analog signal of R analog signal, G analog signal and B analog signal, analog signal output as gray scale, as shown in Figure 1, when multiplexer 108 selected the R analog signals to export analog-digital converter 110 to as the analog signal of gray scale, then G analog signal and B analog signal no longer exported analog-digital converter 110 to via multiplexer 108.
Above-mentioned way is to utilize the brightness of R analog signal to decide the degree of gray scale, heals when high when the brightness of the R analog signal of certain any pixel (Pixel), and then this color of pixel is more near white; Otherwise then this color of pixel is more near black.But, when the brightness of the R analog signal of pixel is on the low side, the brightness of the G analog signal of remarked pixel and B analog signal is not on the low side yet, if when the brightness of one of them analog signal of G analog signal and B analog signal is very high, then the shown gray scale degree of color of pixel is incorrect.
Image under the rgb color model by three independently image formed the corresponding plane of each primary colors.When these three image planes were passed to the RGB display, this three width of cloth image combines just became a width of cloth chromatic image.So when image itself was exactly with three color planes when represented originally, it is significant that the RGB model is used for image processing.On the other hand, be used to obtain the employed RGB of the being mode of most of colour cameras of digitized video, so be important model in the image processing.
Another important color model is y, u, and the v model, the benefit that adopts the yuv model is that brightness y and relevant u, the v of color can separate separately.Moreover, the RGB color model can be converted to other model, for example theoretical trichromatic values X, Y, Z, Adams colourity-brightness space, and the colour model of CMY (Cyan Magenta Yellow) etc.Being converted to the yuv color model at this with the RGB color model is that example is done the following description.
The RGB color model is applied to the conversion of yuv color model, generally be after R analog signal, G analog signal and B analog signal are converted to each digital signal respectively, by software (as conversion program) these digital signals be converted to each parameter value of yuv color space again.Utilize software to do the conversion of RGB color model signal and yuv color model, its shortcoming is that to do the time that conversion spends with software oversize.
Description of drawings
Fig. 1 illustrates the partial circuit figure of the signal processing of known scanner;
Fig. 2 A, Fig. 2 B illustrate the circuit diagram of a preferred embodiment of the scanner signals processing section that RGB is converted to gray scale and yuv color model of the present invention;
Fig. 3 A, Fig. 3 B illustrate the circuit diagram of another preferred embodiment of the scanner signals processing section that RGB is converted to gray scale and yuv color model of the present invention.
Description of reference numerals:
102,104,106,202,204,206,232~234,302,304,306: sampling displacement enlargement device (Sampling-Amplified-Offset Device)
108,216,316,364: multiplexer (Mutliplexer)
110,218,318,366: analog-digital converter (Analog Digital Converter)
208,248,308: related dual sampler (Correlated Double Sampler)
209~211,245,310: but gain-programmed amplifier (Programmable GainAmplifier)
212,241,312: shifter (Offset Device)
214,314,360~362: adder (Adder)
320,322,324,351~359: gain amplifier (Gain Amplifier)
Embodiment
Please refer to Fig. 2 A, illustrate the circuit diagram of a preferred embodiment of the scanner signals processing section that RGB is converted to gray scale and yuv color model of the present invention.In Fig. 2 A, deliver to sampling displacement enlargement device 202,204,206 respectively by R charge signal, G charge signal and B charge signal that transducer (not illustrating) is sensed, sampling displacement enlargement device 202,204,206 can be done sample of signal, amplify and the compensation of accurate position, to obtain R analog signal, G analog signal and B analog signal R charge signal, G charge signal and B charge signal respectively.
Then, adder 214 is done add operation with R analog signal, G analog signal and B analog signal, to obtain an addition analog signal.Multiplexer 216 can select one of them analog signal of R analog signal, G analog signal, B analog signal and addition analog signal to export analog-digital converter 218 to, and analog-digital converter 218 is a digital signal with this analog signal conversion again.
In Fig. 2 A, sampling displacement enlargement device 202,204,206 comprises several devices again equally, is example with sampling displacement enlargement device 202, but comprises a related dual sampler 208, a gain-programmed amplifier 210 and a shifter 212.208 pairs of R charge signals of related dual sampler are done two sub-samplings, the result of two sub-samplings are done subtraction again, to obtain a R brightness value.But gain-programmed amplifier 210 can be adjusted a yield value (scope of this yield value adjustment is decided by to deposit the length of the position of yield value), amplifies the R brightness value that related dual sampler 208 is sent according to this yield value, to obtain a R amplify brightness value.Shifter 212 with R amplify brightness value do the compensation of accurate position after, to obtain the R analog signal.Similarly, the description of the device of sampling displacement enlargement device 204,206 is as the description of the device of sampling displacement enlargement device 202.
When scanner when doing gray scale scanning, the R analog signal, but G analog signal and B analog signal are via gain-programmed amplifier 209,210,211 do different yield value adjustment, resulting R weighting analog signal, G weighting analog signal and B weighting analog signal are done add operation by adder 214 again, the addition analog signal that obtains is delivered to analog-digital converter 218 and late-class circuit via multiplexer 216, so, analog-digital converter 218 and late-class circuit can make scanner can reflect more accurately gray-tone response according to the brightness value through the adjusted addition analog signal that gains.
Transformational relation between RGB color model and yuv color model can be described with following matrix kenel:
Wherein, y represents brightness (Luminance), and u represents tone (Hue), and v represents saturation (Saturation).If the brightness y that only takes in the yuv color model uses, can finish its requirement equally at the circuit shown in Fig. 2 A.Can learn that according to above-mentioned matrix kenel the relation of brightness y and rgb signal is as follows:
y=0.299R+0.587G+0.114B
Therefore, but the gain-programmed amplifier 210 gain adjustable values in Fig. 2 A are 0.299, but gain-programmed amplifier 209 gain adjustable values are 0.587, but gain-programmed amplifier 211 gain adjustable values are 0.114.
In Fig. 2 A, but the front and back position of gain-programmed amplifier in the sampling displacement enlargement device 202,204,206 and shifter (but as gain-programmed amplifier 210 and shifter 212) is to exchange.Shown in Fig. 2 B, the 248 pairs of R charge signals of related dual sampler in the sampling displacement enlargement device 232 are done two sub-samplings, the result of two sub-samplings are done subtraction again, to obtain a R brightness value.After shifter 241 is done the compensation of accurate position with the R brightness value, to obtain the R compensation.But gain-programmed amplifier 245 can be adjusted a yield value, amplifies the R compensation of being sent by shifter 241 according to this yield value, to obtain a R analog signal.Similarly, the description of the device of sampling displacement enlargement device 233,234 is as the description of the device of sampling displacement enlargement device 232.At the following sampling displacement enlargement device of mentioning, but its shifter is all interchangeable with the front and back position of gain-programmed amplifier.
Please refer to Fig. 3 A, it illustrates the circuit diagram of another preferred embodiment of the scanner signals processing section that RGB is converted to gray scale and yuv color model of the present invention.In Fig. 3 A, deliver to sampling displacement enlargement device 302,304,306 respectively by R charge signal, G charge signal and B charge signal that transducer (not illustrating) is sensed, sampling displacement enlargement device 302,304,306 can be done sample of signal, amplify and the compensation of accurate position, to obtain R analog signal, G analog signal and B analog signal R charge signal, G charge signal and B charge signal respectively.
At this moment, after gain amplifier 320 is multiplied by one first weighted value with the R analog signal, obtains and export R weighting analog signal to adder 314.After gain amplifier 322 is multiplied by one second weighted value with the G analog signal, obtains and export G weighting analog signal to adder 314.After gain amplifier 324 is multiplied by one the 3rd weighted value with the B analog signal, obtains and export B weighting analog signal to adder 314.
Then, the R weighting analog signal that adder 314 is exported gain amplifier 320,322,324, G weighting analog signal and B weighting analog signal are done add operation, to obtain an addition analog signal.Multiplexer 316 can select one of them analog signal of R analog signal, G analog signal, B analog signal and addition analog signal to export analog-digital converter 318 to, and analog-digital converter 318 is a digital signal with this analog signal conversion again.
At Fig. 3 A, sampling displacement enlargement device 302,304,306 comprises several devices again equally, be example with sampling displacement enlargement device 302, but it comprises a related dual sampler 308, a gain-programmed amplifier 310 and a shifter 312.308 pairs of R charge signals of related dual sampler are done two sub-samplings, the result of two sub-samplings are done subtraction again, to obtain a R brightness value.But gain-programmed amplifier 310 can be adjusted a yield value (scope of this yield value adjustment is decided by to deposit the length of the position of yield value), amplifies the R brightness value that related dual sampler 308 is sent according to this yield value, to obtain a R amplify brightness value.Shifter 312 with R amplify brightness value do the compensation of accurate position after, to obtain the R analog signal.Similarly, the description of the device of sampling displacement enlargement device 304,306 is as the description of the device of sampling displacement enlargement device 302.
When scanner when doing gray scale scanning, the R analog signal, G analog signal and B analog signal are via gain amplifier 320,322,324 do different weighted value adjustment, resulting R weighting analog signal, G weighting analog signal and B weighting analog signal are done add operation by adder 314 again, the addition analog signal that it obtains is delivered to analog-digital converter 318 and late-class circuit via multiplexer 316, so, analog-digital converter 318 and late-class circuit can make scanner can reflect more accurately gray-tone response according to the brightness value through the adjusted addition analog signal of weighting.
Circuit shown in transformational relation Fig. 3 A between RGB color model and yuv color model can be finished its requirement equally.Can learn that according to above-mentioned matrix kenel the relation of brightness y and rgb signal is as follows:
y=0.299R+0.587G+0.114B
Therefore, first weighted value of the gain amplifier 320 in Fig. 3 A is 0.299, and second weighted value of gain amplifier 322 is 0.587, and the 3rd weighted value of gain amplifier 324 is 0.114.
As mentioned above, the RGB color model is converted to the yuv color model, and needs to use brightness y, tone u and saturation v in the yuv color model, then the circuit shown in Fig. 3 A need be done correction, and the circuit of being revised is shown in Fig. 3 B.
In Fig. 3 B, after gain amplifier 351 is multiplied by one first weighted value with the R analog signal, obtains and export a R weighting analog signal to adder 360.After gain amplifier 352 is multiplied by one second weighted value with the G analog signal, obtains and export a G weighting analog signal to adder 360.After gain amplifier 353 is multiplied by one the 3rd weighted value with the B analog signal, obtains and export a B weighting analog signal to adder 360.After gain amplifier 354 is multiplied by one the 4th weighted value with the R analog signal, obtains and export the 2nd R weighting analog signal to adder 361.After gain amplifier 355 is multiplied by slender acanthopanax weights with the G analog signal, obtains and export the 2nd G weighting analog signal to adder 361.After gain amplifier 356 is multiplied by one the 6th weighted value with the B analog signal, obtains and export the 2nd B weighting analog signal to adder 361.After gain amplifier 357 is multiplied by one the 7th weighted value with the R analog signal, obtains and export the 3rd R weighting analog signal to adder 362.After gain amplifier 358 is multiplied by one the 8th weighted value with the G analog signal, obtains and export the 3rd G weighting analog signal to adder 362.After gain amplifier 359 is multiplied by one the 9th weighted value with the B analog signal, obtains and export the 3rd B weighting analog signal to adder 362.
Then, the R weighting analog signal that adder 360 is exported gain amplifier 351,352,353, a G weighting analog signal and a B weighting analog signal are done add operation, to obtain brightness y.The 2nd R weighting analog signal that adder 361 is exported gain amplifier 354,355,356, the 2nd G weighting analog signal and the 2nd B weighting analog signal are done add operation, to obtain tone u.The 3rd R weighting analog signal that adder 362 is exported gain amplifier 357,358,359, the 3rd G weighting analog signal and the 3rd B weighting analog signal are done add operation, to obtain saturation v.Multiplexer 364 can select one of them analog signal of R analog signal, G analog signal, B analog signal, brightness y, tone u and saturation v to export analog-digital converter 366 to, and analog-digital converter 366 is a digital signal with this analog signal conversion again.
According to above-mentioned the RGB color model is converted to the matrix kenel of yuv color model, can learns that the relation of brightness y, tone u, saturation v and rgb signal is as follows:
y=0.299R+0.587G+0.114B
u=0.596R-0.275G-0.321B
v=0.212R-0.523G+0.311B
Therefore, first weighted value of the gain amplifier 351 in 3B figure is 0.299, second weighted value of gain amplifier 352 is 0.587, the 3rd weighted value of gain amplifier 353 is 0.114, the 4th weighted value of gain amplifier 354 is 0.596, the slender acanthopanax weights of gain amplifier 355 are (0.275), the 6th weighted value of gain amplifier 356 is (0.321), the 7th weighted value of gain amplifier 357 is 0.212, the 8th weighted value of gain amplifier 358 is (0.523), and the 9th weighted value of gain amplifier 359 is 0.311.
The RGB color model is converted to the yuv color model, it is the conversion that the hardware circuit (as gain amplifier and adder) that utilizes circuit is finished color space, be compared to and utilize software to finish the conversion of color space, the time that hardware circuit is spent when doing conversion is considerably less, so, scanner may operate in higher sweep speed.
Therefore, advantage of the present invention is a scanner when being used in the scanning of gray scale, the response of each pixel for gray scale can be reflected more accurately.
Another advantage of the present invention is that scanner is used in the conversion of RGB color model signal to different color models, utilizes hardware to carry out the work of conversion, can shorten the time that RGB color model signal is spent different color model conversions.
But the above only is preferred embodiment of the present invention, is not to be used for limiting the present invention, anyly is familiar with this operator, without departing from the spirit and scope of the present invention, can do various changes and retouching, so protection scope of the present invention is when with claims standard.