Sei sulla pagina 1di 3

Tech Note

TH-1086 Date: 7/15/00

AccuPiXEL LUT (Look-Up Table) Function


Why is the Look-up table so important and powerful for many applications? The AccuPiXEL series of cameras have a built-in LUT for real-time dynamic range control and front end pre-processing capability. The main advantage of the feature is that conventional CCD cameras use an analog video amplifier to control the gain or gamma correction. Since a standard camera is used for many and various applications, the internal gain setting and output signal is somewhat generalized to fit to all concept. Typical CCD imagers output dynamic range is reasonably good, but because of internal camera settings and the video output format (RS-170), the dynamic range is not fully used. Actually, a typical CCD camera uses only 1/4 or less of the dynamic range and clips off any signal over 100 IRE (saturation of RS-170 video output). The concept of the LUT is to use the full dynamic range and do high-speed pre-processing inside the camera. CCD Dynamic range
Blooming adj. = 13. 5 V Lens: F=5.6

mV 700 Max. Digital dynamic range at 3 dB amp 600

A typical CCD used in machine vision or industrial applications has a well capacity of around 50,000 electrons and the saturation output voltage is 350 to 500 mV. Many camera manufacturers claim high gain or lowlight sensitivity and the typical internal video amplifier gain is factory set at 16 dB (6.3X) to 26 dB (20X). Sometimes it goes over 32 dB (40X). If the camera output is RS-170 analog output, the saturation (100 IRE) is 714 mV and any signal over 100 IRE will be clipped (white clip) by the camera or the A/D input range limit of frame grabbers. If the signal is in the dark area, the signal exists and can be used by post processing with back ground subtraction, digital integration, contrast enhancement, etc. However, once the signal is clipped, there is no chance of recovering it. For a simple calculation lets use 20 dB (10X) amplifier with RS-170 output.

Vsub = 8 V

Vsub = 10 V 500 CCD OUTPUT VOLTAGE Vsub = 12 V 400 Vsub = 14 V Vsub = 16 V 200 Digital saturation at 16 dB amp 100 Analog saturation at 16 dB amp 0 Vsub = 18 V

300

20

40

60

80 LUMINANCE

100

120

140

160 FL

The usable CCD output is 714 mV / 10 = 71.4 mV If the CCD saturation signal is 500 mV, it uses only 1/7 of the total dynamic range.

Look-up Table The AccuPiXEL series of cameras (TM-1020-15CL, TM-1325, etc.) and the TM-2016 feature high speed CDS (Correlated Double Sample and hold) amplifier, 10-bit A/D, FPGA, Micro controller and digital video output circuits. The CDS gain is calibrated to the optimum CCD dynamic range adjustment. The FPGA converts 10-bit input data to 8-bit processed data. The microcontroller calculates LUT contents and also communicates through RS-232 external control. The LUT data is stored in EEPROM for real time, on-the-fly changes. The standard software has a linear table, Gamma=0.45 table and GUI two-knee tables. The knee table is variable and makes it easy to find the optimum positions. Benefit of built-in LUT vs conventional gamma correction, analog knee control and post processing Lets now consider gamma correction or analog knee control. These are basically feed back amplifier characteristics and are done in the analog domain. It is difficult to quantify the value, and also difficult to control and change,as the circuit is normally fixed and the feed back is not temperature-stable. The biggest drawback is it increases the noise floor at the darkest region. It is not good for contrast enhancement. From the dynamic range control point of view, the maximum point is difficult to define. In other words, the A/D saturation point is not clear and tends to set too low on the gamma curve (does not take full dynamic range of gamma scale).

Tech Note
Conventional post processing is done after taking video images into the frame grabber. Since the signal is standard video output from cameras, highlights are already clipped. If 8-bits of digital signal is used either from 8-bit camera output or an 8-bit A/D inside frame grabber, LUT of 8-bit to 8-bit conversion loses the gray-level resolution. Therefore, it is so important to convert such signals inside of the camera before losing the dynamic range and gray level resolution. Fig.2 describes the 10-bit A/D input from the CCD. The calibration is done by both the CDS amplifier and A/D reference voltage adjustment. The CCD saturation varies among each CCD type, production lot,and the substrate bias condition. The value can be set at the optimum position. Benefit of LUT LUT is externally down-loadable. PULNiX software provides the basic control of two-knee function as well as digital gamma calculation (Gamma=0.45). Gain changes by slope angle: When the slope is steeper than a linear table, it means the gain or value multiplier is higher than 1. When the slope is lower than linear, the gain is below 1 and it is in attenuation of the signal. With single knee, two gain slopes can be obtained and each gain factor will be exactly calculated for the specific signal value or restoration. The calculation is easily done by showing the knee point address then determining the slope coefficient. The LUT concept can change the camera gain control concept from tweaking potentiometers (unknown gain value) to gain coefficient calculation (exact gain value). Signal enhancement and noise suppression: Fig.3 shows examples of LUT curves. When a conventional gamma curve is used, the noise floor level (B) is exponentially enhanced (A). By using a two-knee LUT, the first knee can be set at just outside the noise floor and the second knee is set to enhance the signal levels over the noise floor. This technique is very powerful for many feature extraction processes such as thresholding, correlation, edge detection, etc. Wide dynamic range applications: Back-lit inspections such as glass bottle, plastic bottle inspection or semiconductor or metal surface inspection need very wide dynamic range to cover dark objects to shiny scratches. Depending on the object or region of interest, the LUT is adjustable, down loadable and can be switched on the fly. Since all signals are available from the full dynamic range of the CCD, it is easy to use the full information for improved inspection capability.

CCD output Saturation Region

10-bit A/D

Linear Dynamic Range

Noise Floor

Incoming Light Intensity

Fig.2
256 Two-knee Negative

8-bit output

Two-knee LUT Gamma

A
Noise Level

Linear

B
Noise Floor

10-bit Input

1024 (256X4)

Fig.3

Special effects: Positive-Negative conversion: By selecting two knees, either the entire image or a part of the image can be converted to a negative image. Gray level ROI (Region-of-Interest): Using four knees, a specific gray level can be extracted and enhanced in 8-bit image or thresholding.

NO. TH-1083 pg 2

Tech Note
Software and Image examples The RS-232 camera control software has a graphic interface to adjust the camera functions. Upper right area is the camera gain and A/D reference voltage control, which is adjusted to the optimum linearity of the CCD output signal for 10-bit A/D digitizer process. The Vtop is adjusted for signal saturation and Vbottom is adjusted for the black level calibration. Once the A/D reference is set, the LUT is set for the best image output. The graphic display is shown as 8-bit (256) Y coordinate and 10-bit (256 x 4) X coordinate. The center line indicates linear gain (1:1 = 0 dB). Two-knee LUT shown in the graph indicates the knee coordinate value on the left side of the graph. (X1, Y1) = (40, 20) (X2, Y2) = (60, 220) This provides the gain slope up to the first knee is -6 dB (40X4=160 input level) and 20 dB up to second knee (60 x 4=240 input level) and the rest at -14 dB up to the full saturation. This LUT creates strong contrast enhancement in a region of 160 to 240 gray levels out of 1024 and still maintains a usable signal in the entire range. It also suppresses the noise floor. Applications Image 1 and 2 are standard linear output images. Image 1 shows unsaturated image and is too dark for object recognition. Typical adjustment for this condition is A: Open up lens aperture. or B: Increase gain. Both generate Image 2, in which highlight is saturated. Images 3 through 6 are preprocessed with the LUT to enhance different objects wihout saturating the high side.

Image 1: Linear LUT; Metal surface saturated.


Plastic surface OK (0)

Image 3: LUT ; Gain slope=2.0, knee (x,y)=256,128 Good for overall image

Image 5: LUT; Gain slope=2.7, Knee=240,160 Better on PCB surface and plastic

Image 2: Linear LUT; Metal surface OK. Plastic surface too dark.

Image 4: LUT; Gain slope=2.0, Knee=384,192

Image 6: LUT; Gain slope=4.0, Knee=128, 128 Detail on PCB surface

NO. TH-1083 pg 3

Potrebbero piacerti anche