Background technology
(Charge Coupled Device: be the image sensing component that current quilt generally adopts photoelectrical coupler), be a kind of special semiconductor device to CCD, and its each photosensory assembly is a pixel.It utilizes photodiode (Photodiode) to carry out the conversion of light to electricity, is digital information with video conversion.Single ccd video camera is meant to have only a slice CCD in the video camera, and carries out the opto-electronic conversion of luminance signal and carrier chrominance signal with it.And the 3CCD video camera uses three CCD.Light is by behind the special optical prism, is divided into that R-is red, G-is green, the B-blue three-color.Accept each color and be converted to the signal of telecommunication with a slice CCD respectively, produce picture signal through after the processing of circuit then, thereby constituted a 3CCD system.Compare with single CCD, because 3CCD is respectively with three CCD conversion red, green, blue signals, the image that shooting is come out is more accurate and natural than single CCD from the color rendition, and definition is also than single CCD height, has very high signal to noise ratio, fabulous susceptibility and very wide dynamic range.
The charge signal of each pixel (pixel) all can be sent in the next pixel in regular turn in each row of ccd sensor, and by the part output of lowermost end, the amplifier through the transducer edge amplifies output again.
As shown in Figure 1, the imaging point of CCD is an X-Y arranged in length and breadth, and each imaging point is made of in turn a photodiode and an adjacent charge memory block.Photodiode on the CCD is transformed into electric charge (electronics) with light (light quantum), and electronics total quantity and light intensity that photodiode is collected are proportional.The light of entire image is collected simultaneously, and then is transferred to the adjacent charge transfer unit within the column.Read electric charge then: every row's data moves to rank charge transfer register separately.Every row's charge information bag is read out continuously, by charge/voltage converter and amplifier perception.This structure can produce low noise, high performance image.
But the image that obtains from CCD is faulty usually, correction is a key element very crucial in the influence of color management, therefore all can there be its uniqueness a ccd sensor unit, difference slightly will inevitably be arranged with other equipment, same model with regard to the product that same manufacturer worked it out at last, in the face of the same signal, its response also has difference slightly, this situation be exactly said equipment dependency.Cause the characteristic difference of each pixel of situation in linear transducer of serious image problem, because optics inhomogeneous etc. in the inhomogeneous and linear ccd sensor of illuminance in the scanning circumstance, also can make the signal that produces through the CCD opto-electronic conversion very weak, and a lot of defectives are arranged, must be through overcorrect.Therefore, what proofread and correct indication is exactly to adjust color response to meet the parameter setting of specific criteria state, makes a series of specific input value through the exportable foreseeable color of conversion, to guarantee the unanimity of quality.A multiplier is just adopted in known bearing calibration, and provides several gain rangings and parameter format thereof, will gain and adjust in this scope, and this bearing calibration is also not obvious to providing of CCD treatment effect.
Summary of the invention
The technical problem that the present invention solves is, proposes a kind of response correction technique for photoelectric coupler, and main purpose is the signal that produces through the CCD opto-electronic conversion is proofreaied and correct, thereby improves the pixel response of CCD.
In order to reach above-mentioned purpose, the invention provides a kind of response correction technique for photoelectric coupler, described method is proofreaied and correct the signal that opto-electronic conversion produces, thereby improve the pixel response of this photoelectrical coupler, described method comprises the steps: to obtain the black parameter value Black_ref and the white parameter value White_ref of the sensor unit of each described photoelectrical coupler; According to described black parameter value Black_ref and described white parameter value White_ref calculated gains value Gain_value; Make and store checking list according to described black parameter value Black_ref and described yield value Gain_value; And adjust according to the real response value InputValue of described checking list to corresponding described sensor unit, draw corrected value Correction_value;
Wherein, described yield value is to pass through formula
Draw, wherein n is a positive integer.
Yield value Table_Gain-Value in the described checking list is by formula Table_Gain_Value=2
k(Gain_Value-1) |
K=6,7,8,9,10,11,12Draw, k is according to formula Max_Table_Gain_Value=2
k(Max_Gain_Value-1) |
K=6,7,8,9,10,11,12Determine that wherein Max_Table_Gain_Value is a maximum gain encoded radio in the described checking list, Max_gain_value is a maxgain value.Described maxgain value Max_gain_value is 2,3 or 5.
Described corrected value Correction_value passes through formula
Draw, wherein Table_Gain_Value is the yield value in the described checking list.
The form of the value in the described checking list can be a byte, two bytes or three bytes; If byte then includes only yield value Table_Gain_value in 8 the table, if two bytes then comprise yield value Table_Gain_value in 16 black parameter value Black_ref and the table, if three bytes then comprise yield value Table_Gain_value in 24 black parameter value Black_ref and the table.
Yield value Gain_value is converted to binary gain tabular value Table_gain_value.
According to response correction technique for photoelectric coupler proposed by the invention, by the mode of tabling look-up corresponding sensor unit is proofreaied and correct, make the CCD response more near ideal value, improved the treatment effect of CCD.
Embodiment
Basically each pixel cell all can produce the function of an output voltage/electric charge and energy absorption among the CCD.This function is linear substantially, need adjust constant in this linear equation with the variation of pixel.The inhomogeneous of illuminance and optics can produce additional linearity error in addition.This error can be proofreaied and correct by linear transformation according to the value of each pixel.
As shown in Figure 2, this figure is the sensor calibration method overview flow chart of photoelectrical coupler of the present invention.At first obtain the black parameter value Black_ref and the white parameter value White_ref (step 210) of each this photoelectrical coupler sensor unit, according to this black parameter value Black_ref and this white parameter value White_ref calculated gains value Gain_value (step 220), make and store checking list (step 230) according to this black parameter value Black_ref and this yield value Gain_value, real response value InputValue to corresponding this sensor unit adjusts according to this checking list, draws corrected value Correction_value (step 240).
At first obtain the black B parameter lace_ref and the white parameter White_ref of each ccd sensor unit according to the exposure sensor bearing calibration of photoelectrical coupler of the present invention.Determine the relation between ccd sensor unit real response and the ideal response then.
Fig. 3 is a CCD output response schematic diagram.As shown in Figure 3, suppose that incident light illumination (Illumination) is linear with the digital response (Pixel digital response) of output signal one pixel.L1 is desirable response curve, and it is that slope by round dot O is 1 straight line, is 0 o'clock in illuminance promptly, and response also is 0, and along with the increase of illuminance, response also is linear to be increased.But the real response curve is the black B parameter lack_ref that 0 o'clock response is a standard in illuminance usually shown in L2, and when illuminance was maximum, its response was the white parameter White_ref of standard.For convenience of explanation, set a boost line L3, the intersection point of L3 and straight line AC is B, with the intersection point of transverse axis be D.Because it is in illuminance one regularly that the sensitization of CCD is proofreaied and correct, real response value (Input_value) is converted to response in the ideal, be corrected value (Correction_value), therefore need the relation between definite real response value and the ideal response value, thereby the real response value is proofreaied and correct.As shown in Figure 3, when illuminance was D, the real response value was Input_Value, and ideal response value (being corrected value) is Crrection_Value, can be drawn by similar triangle theory
Therefore can draw:
(formula one)
Wherein Offset is a side-play amount, is in order to prevent that negative from appearring in corrected value Correction_Value.The relational expression that formula of reduction one can draw between corrected value (Correction_Value) and the real response value (Input_Value) is a formula two:
Correction_Value=Gain_Value (Input_Value-Blace_ref) (formula two)
Wherein
It is constant.Therefore just can calculate corrected value (Correction_Value) according to real response value (Input_Value), yield value (Gain_value) and black parameter (Black_ref).
Wherein yield value (Gain_value) and black parameter (Black_ref) are to pre-determine and be stored in the checking list in the internal memory, usually in DRAM with certain format.These corrected values have three kinds of forms in the SCCR register, shown in following table one:
Table one:
Byte format |
Operational order (Operations) |
1 byte |
8bits gain |
2 bytes |
8bits black value+8bits gain 7bits black value+9bits gain 6bits black value+10bits gain 4bits black value+12bits gain |
3 bytes |
12bits black value+12bits gain |
Wherein the value in the checking list can be a byte, two bytes or three bytes.Wherein operational order has six kinds of forms, and byte includes only 8 gain, four kinds of combinations of yield value in 16 total black parameters of two bytes and the table, and three bytes comprise yield value in 12 black parameter and 12 s' the table.Therefore the sensitization correction to CCD comprises gain calibration and black parameter correction, and the two can carry out simultaneously, also can be only to carry out gain calibration.
The black parameter of each pixel is at first carried out additional calculation by the side-play amount of black parameter value in the BLCR register and black parameter value.Black level can increase in proportion according to black parameter value * 1, * 2 in the BLCR register, * 4, * 8, * 16.Carry out subtraction with real response value (Input_value) again.Carry out post-scaling according to the black parameter value in the BLCR register by * 1, * 2, * 4, * 8, * 16 then.Suitable yield value according to the gain ranging that defines in the SCCR register carries out pixel correction at last.
The figure place width of supposing yield value is defined as 8, and the maximal regulated scope is * 1-*5, and then maxgain value is 5, be convenient storage, (Gain_Value) encodes with yield value, is stored as yield value in the table (Table_Gain_Value), and concrete grammar sees also following table two:
Table two (gain codebook):
Shading Value |
Gain |
0 |
1.000 |
1 |
1.020 |
2 |
1.039 |
3 |
1.059 |
. |
. |
. |
. |
. |
. |
250 |
4.900 |
251 |
4.920 |
252 |
4.940 |
253 |
4.960 |
254 |
4.979 |
255 |
4.999 |
Conversion relation is:
Table_Gain_Value=2
n(Gain_Value-1) |
N=6,7,8,9,10,11,12(formula three)
In the table:
Shading Value=Table_Gain_Value
Gain=Gain_Value
N determines by following formula:
Max_Table_Gain_Value=2
n(Max_Gain_Value-1)|
n=6,7,8,9,10,11,12
Be encoded to 8 bits in the present embodiment, so Max_Table_Gain_Value=255, when the maximum of yield value (Gain_value) is 5, promptly during Max_Gain_Value=5:
∵255=2
n(5-1)
∴n=6
After formula three distortion, can obtain the reciprocal transformation formula:
(formula four)
Formula four substitution formula two can be drawn:
(formula five)
Formula five is the updating formula that the present invention uses, wherein all storages in advance in the checking list in internal memory of yield value (Table_Gain_value) in black parameter (Black_ref) and the table, the saving format of checking list is shown in Fig. 4 a~Fig. 4 f, wherein Fig. 4 a~Fig. 4 c is respectively the storage schematic diagram of a byte, two bytes and three byte color modes, and Fig. 4 e~Fig. 4 f is respectively the storage schematic diagram of a byte, two bytes and three byte monochromatic modes.At timing, only need to change according to formula five according to the value and the real response value (Input_value) of storage in advance, just can draw the corrected value (Correction_value) of respective sensor unit.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.