Getting Started Manual

advertisement
Getting Started Manual
Silicon Imaging MegaCamera
CameraLink
Revision 1.4
August 9, 2003
Silicon Imaging, Inc.
**** Company Confidential ****
 Silicon Imaging , Inc. 2003
1 of 31
Company Confidential
Install XCAP & Frame Grabber Drivers
This manual assumes that the customer will be using the Silicon Imaging 32-bit camera link frame grabber with either
the XCAP or XCAP-lite software from Epix, Inc.
Download the most current version of software from:
ftp://ftp.epixinc.com/downloads/xcapwi.exe
Install software from the Zip compressed file by double-clicking on the xcapwi.exe file.
For the most part, options selected by ‘Next’ are the appropriate selection for the standard install.
Be sure to install the drivers the first time the software is installed on a system. The License Agreement will be
displayed. Agreeing to the terms will allow the installation to continue.
Enter the XCAP-LITe key code: OBOT/OREF/GRGO.
If you additional software keys typed in the following format: ABCD/EFGH/IJKL with no spaces and the ‘/’ between each
group. If you have a product with a hardware key, be sure the key is attached to the parallel port before hitting ‘OK’.
Close XCAP and shut down the computer to install the Frame grabber card
 Silicon Imaging , Inc. 2003
2 of 31
Company Confidential
Install PCI Frame Grabber & Connect Camera
Install the frame grabber in an available PCI slot. The boards are 3.3V and 5V compatible and will work in either slot
type. Connect the power supply and camera link cable to the camera and frame grabber. Use a screwdriver to tighten
the connectors until they are fully seated.
Boot the computer.
Power-Up: On machine boot-up, Windows will recognize “NEW HARDWARE FOUND”.
Device Driver: Select the required device driver from the C:/XCAP/Drivers directory for the correct operating system:
Win98, WinME, WinNT, Win2K, or WinXP. If you install the frame grabber board before the software, go to the
CONTROL PANEL, SYSTEM, Device Manager Tab, select PIXCI ® CL1 PCI Cameralink Video Capture Board, Driver,
and Update Driver.
Run XCAP for Windows by double-clicking on the icon:
***Note: It may be required to power cycle the camera, once all the software is installed and running.
Allocate Memory for Image Buffers: The Windows Driver default is to allocate only 4Mbytes of memory for Frame
Buffers. For 3.2Mpixel images and 12bit (2 Bytes/pixel) requires approximately 6.4MB per frame. By obtaining 64MB,
this will result in 10 Frame Buffers.
select PIXCI® then PIXCI® Open/Close
 Silicon Imaging , Inc. 2003
3 of 31
Company Confidential
Select Driver Assistant
Select Set frame Buffer Memory Size. Reserve enough memory for Windows (eg. 64MB) and the balance of
your PC memory will be allocated to Frame Buffers. Then Apply.
Your system will need to be rebooted. Now, You are ready to capture live video or sequences.
 Silicon Imaging , Inc. 2003
4 of 31
Company Confidential
Run XCAP for Windows
Double click on the icon to start the program:
Select PIXCI® then PIXCI® Open/Close
Select Open.
Select the correct Silicon Imaging submodel (Eg: SI-1280, SI3170, SI-6600):
There is no difference in Mono or Color selection, as even color models can be accessed in monochrome mode. Then
select Open with Default Video or last used will have all settings from previous operation.
 Silicon Imaging , Inc. 2003
5 of 31
Company Confidential
Menus and Options – Frame Grabber (Left Side)
Start with 8 bit data to reduce the bus overhead for first testing. Select Live. This control window has two sides, the
left side for the frame grabber and right side for the camera.
Three windows will appear within the XCAP desktop: PIXCI View#1 (image display window), Silicon Imaging SI3170
Capture & Adjust and Message Log. The message log will auto-hide after a few seconds. I addition, the top menu
pull-downs are for XCAP program control.
Select LIVE (UNLIVE) radio button or the camera LIVE shortcut to begin capture and display.
Note: The SI-3170 was used to capture these screen shots, but the information pertains to all Silicon Imaging camera
models.
 Silicon Imaging , Inc. 2003
6 of 31
Company Confidential
SHORTCUTS
These Shortcuts can be display next to the Image View window. The function are as follows (from left to right):
A.
B.
C.
D.
E.
F.
G.
H.
I.
J.
K.
L.
M.
N.
O.
P.
Switch to first buffer
(Key HOME).
Switch to next buffer
(Key PAGE UP).
Switch to previous buffer(Key PAGE DOWN).
Switch to last buffer
(Key END).
Snap an Image
Live / Unlive
Copy image to new image buffer.
Adjust Palette.
Zoom, scroll, and pan.
Activate or deactivate cursor overlay
Resize to window
Peek at numeric pixel values.
2D plot of line or column of pixel values.
Histogram of pixel values.
Sequence capture to memory
Sequence playback
Status Bar
On the bottom of the Image View#1 window you will see a Status Bar.
There is an indication of Buffer: (the default is 0 the first of the available image buffers to capture images into), Video:
Rate in frames per second (this is the frame rate being generated by the camera, default is 12.4 fps) and Display: The
rate the PC is capturing the data and displaying to the VGA monitor (this speed will be PC dependant). A display rate
would indicate you are Live. Additional data can be added to the Status Bar from the Image View window by selecting
View, Display, then select Status Bar Tab, check boxes and close(X).
***Note: If the Video is 0.0 fps, then the camera is not producing data or the frame grabber is not capturing. Initially, It
may be required to power cycle the camera, once all the software is installed and running. While capturing at high clock
speeds you may encounter a “PCI FIFO Overflow…” condition, which would cause the Video rate to go to 0.0. Press
RESET button in Capture window, reduce the data rate via clock or AOI adjustment and then select LIVE again. For
PC’s slower than 333MHz may not be able to handle 12bit mode in full image resolution and must start in 8bit mode,
before going LIVE.
 Silicon Imaging , Inc. 2003
7 of 31
Company Confidential
CAPTURE & ADJUST MENUS
CAPTURE CONTROLS (Left Side)
These are capture controls which operate on the Frame Grabber hardware or host software including: All capture
menus include the Live/Unlive control for starting continuous capture, the Reset for reseting the mode, Snap for
capturing a single image and a Live Options for accessing another menu that controls the destination of the capture.
RES (Resolution):



Bit depth: 8 or 12 bit transfer from Frame Grabber to host
(Adj.)
Monochrome/color selection
Window size selection
BUF (Buffers):




Current Buffer (selected from the available buffer list)
Total number of frame buffers available
Field count – Increments even when the camera is unlive.
Clear buffers – empties all the buffers at once.
TRIG (Trigger):



Continuous/Single shot capture
Frame grabber internal trigger generator frame rate
External Trigger polarity
AGC (Automatic Gain Control):





 Silicon Imaging , Inc. 2003
Enable/disable automatic gain control
Select statistical method for calculating
Target brightness for AGC
Area for calculations to be processed
Advanced controls
8 of 31
Company Confidential
PRESET Tab
Presets allow the saving of all of the camera setup data as a single unit within the camera that
can be recalled with one selection. To use the presets, they must first be unlocked.
Both frame grabber (Save Settings) and Camera (Presets) conditions, including White
Balance, can be saved and then loaded. Upon loading, the camera will be sent commands to
modify internal settings to match the "Adjust settings" include gain, exposure and frame
period.
Any number of setting files can be saved:
COLOR Tab
Standard Color Menu






 Silicon Imaging , Inc. 2003
Color Temp lets you select either standard color matrices for different light
temperatures to achieve white balance or create your own custom settings.
Saturation and Gamma can be independently controlled.
Quick white and black balance are estimations taken from the current image.
Color & Balance provides an advanced menu for semi-automated generation of
custom color transformation tables.
Auto White Balance provides a continuously adjusted white balance under software
control. This is used mainly for continuous viewing or recording of changing scenes.
Custom Advanced provides a set of tools to adjust and tweak color balance values.
9 of 31
Company Confidential
NORM Tab
Pixel Normalization
SI3170 Capture & Adjust Software now supports automatic calculation and live processing
display with full image pixel-by-pixel OFFSET or GAIN & OFFSET correction.
An example of this processing is shown later in this document.
These tools are used to minimize fixed pattern noise (FPN) and are essential for creating the
best quality images.
Each of the reference images can be independently saved.
 Silicon Imaging , Inc. 2003
10 of 31
Company Confidential
CAMERA CONTROL (Right Side)
The right hand menu controls the internal camera adjustments, which are communicated via a serial port on the frame
grabber. The upper half of the menu is tab selected for the individual control areas. The lower half is constant.
Camera Adjust– Exposure &Rate Control





Frame Rate – The frame capture rate can be adjusted by either typing a numeric
value, clicking on the up/down arrows, or pulling the slider across the scale. The
range is limited by the pixel clock.
Exposure – The amount of time that the sensor is exposing is controlled in a similar
manner.
The exposure can be synchronized to an internal 50 or 60 Hz clock to minimize
beating effects with lighting.
Long exposure mode can be selected.
The icons on the bottom represent the frame gabber and camera. When
commands and control data are transmitted, arrow heads appear on the red lines.
When communications links are lost, the red lines disappear.
Port





Serial Port – Communications through the GUI can be enabled and disabled.
Disabling allows serial peek and poke commands to control the camera directly.
Serial Mode – Provides a method for minimizing the commands across the serial
link.
Serial Retries- If serial errors are occurring due to noise, multiple retries can reduce
the errors.
Serial Log – All of the serial commands (transmit and receive) can be sent to a log
file. This is useful both for debugging and for capturing commands for use in an
embedded customer application.
Export Commands – Saves the log to a file.
If a communication error occurs (ex. “PCI FIFO Overflow”), the software will DISABLE the
camera serial port to insure the camera state does not change without the frame grabber
being in sync. After RESET, the Serial port can be “Enabled”.
Gain


Global Gain – Provides all of the available hardware gain settings for the camera
(range varies by camera model).
Red, Green, Blue Gain – Provides independent gain setting for each color channel,
if appropriate to the camera model.
Timing






 Silicon Imaging , Inc. 2003
Video Mode – selects between continuous and single shot mode.
Exposure Mode – Some cameras have two different exposure ranges
Pixel Clock – The effective clock rate for pixel output by the camera. Type in new
frequencies or clicking on the up/down arrows. The value may jump to the nearest
permissible frequency.
Extended H – For enhanced video timing – not normally adjusted.
Pause until Trigger – Waits before going live until an external trigger (may not be
implemented on all cameras).
Trigger – forces an external trigger.
11 of 31
Company Confidential
AOI (Area of Interest)
Only functional on some model cameras.
Window Mode – Selects between full frame and windowed mode of operation.
AOI Top – Selects an offset from the top of frame.
AOI Height – Selects a window height.
Note: If this does not provide a method for modifying the AOI, use the PIXCI – Video Setup
menus.
Misc (Firmware Version & Serial Number)
This consists of identification information that is useful for the factory to track versions and
models.
 Silicon Imaging , Inc. 2003
12 of 31
Company Confidential
Serial Peek & Poke
Serial Peek & Poke can be found in the top menu, under Utility – RS-232 Control.
This tool provides a direct communications path to the camera, bypassing all of the GUI control. It is used for testing
command strings to be sent from a user application.
Be sure that the GUI serial port control is disabled before enabling the Peek & Poke control. Likewise, disable the Peek
& Poke control before enabling the GUI control.
The data transfer should be set to 9600 baud, 8 data bits, 1 stop bit, no parity.
 Silicon Imaging , Inc. 2003
13 of 31
Company Confidential
Gain and Offset Correction
The Capture & Adjust Software now supports automatic calculation and live processing display with full image pixelby-pixel OFFSET or GAIN & OFFSET correction.
Note: You must set Gain1 & Offset first, before setting Gain2. It will take a few experiments to find the best 50-70%
saturation value for gain1. The average level of the gain1 image is the switchover point for gain2. Therefore, any pixel
values above the gain1 mean will be applied on the gain2 setting.
1.) Operation
XCAP Software uses the last 3 Image Buffers (Last-1=Offset, Last-2=Gain, Last-3=Gain2) to store the correction
coefficients.
The Live Correction Modes are:
1. Disabled
2. Offset
3. Gain & Offset
4. Gain2 & Offset
When any of these modes are ON, the number of avaialble frame buffers is reduced by 3. Therefore, If you had
allocated memory for 10 thru the Driver Assistant, you would only see 7 (0 thru 6).
If you select "Disabled", you will get back the extra image buffers and can view the correction values, which have been
calculated and stored.
 Silicon Imaging , Inc. 2003
14 of 31
Company Confidential
2.) OFFSET Correction
The offset is used to correct for the Black Level non-uniformities. This black level can vary based on the exposure time
and gains and therefore, may be a benefit to regenerate the offset correction data for optimum performance.
Capture & Adjust Window (a new Tab on left has been added)
Gain&Offset (tab over to the right of: Capt, Adj, Save)
Select: "Offset" from pull down list
Cover Lens or shoot an image of a dark flat-field
Press: "Extract Offset Ref" button
The live image window will now capture and display offset corrected imagery.
Mono Low Light, High Gain (Gain=8) , Long Exposure Image region.
 Silicon Imaging , Inc. 2003
15 of 31
Company Confidential
3.) GAIN & OFFSET (FPN Correction)
The cameras exhibit a small amount of fixed pattern noise (FPN), evident under specific imaging conditions. This FPN
is primarily a column-specific (relatively row-invariant) response variation that manifest as vertical stripes. Depending on
the requirement for uniformity, several methods of FPN reduction may be applied. Due to the nonlinear response
properties of the active pixel and column-buffers, a multi-point, piecewise-linear correction is used to successfully
eliminate the column-to-column variations (Gain2 & Offset).
Raw Monochrome Image
Column-to-Column FPN (sky area)
The Gain is used to correct for the difference of Gain from pixel to pixel. Most of this non-unifromity is visible as verticaa
column stripes (or "the venetian blind artifact"). The gain image is calculated by shooting an image of a flat, even
illuminated area (eg. white paper with lens unfocused) at 50-80% of full saturation. The offset image is subtracted and a
scaling factor is calculated, per pixel to make each pixel equal to the image mean.
Capture & Adjust Window (a new Tab on left has been added)
Gain&Offset (tab over to the right of: Capt, Adj, Save)
Select: "Gain & Offset" from pull down list
Extract Offset, if not done previously.
shoot an image of a 80% saturated flat-field
Press: "Extract Gain Ref" button
The live image window will now capture and display gain offset corrected imagery.
***Note - The gain values which will range from typically range 0.9 to 1.1 are scaled by 2047 (12bit mode) to fit within a
standard frame buffer pixel valuse. Then when the gain is applied, by multiplying each pixel by the gain factor, it is also
divided by the scale factor. This scale factor and the image buffer position held for the correction can be seen in "Video
Setup":
PIXCI,
PIXCI Video Setup
Custom (tab)
Image & Correction (tab)
Gain & Offset (you need to scroll to the right to see the tab)
Gain & Offset Arg 0 this is a scaling factor for the gain
If no gain image is in memory (gain pixel = 0), the live pixel is not modified and the unprocessed value is displayed.
 Silicon Imaging , Inc. 2003
16 of 31
Company Confidential
SI1280 BLACK LEVEL ADJUSTMENT & OFFSET CORRECTION
The following is an image in rolling shutter prior to black level adjustment and correction:
Cover the lens and Adjust the Black Level to be sure that black is in the digitizing range
 Silicon Imaging , Inc. 2003
17 of 31
Company Confidential
Adjust Black balance for most even odd/even balance (red and green line plot should overlap with color processing set
for No Correction).
NORM tab, set OFFSET, check NORMALIZATION ON and press EXTRACT OFFSET. Go to COLOR to select correct
color temperature or Custom WHITE BALANCE settings. The resulting image will look like this:
 Silicon Imaging , Inc. 2003
18 of 31
Company Confidential
White Balance & Color Correction
The following are examples of color images settings with and without correction.
White Balance & Color Correction (Disabled)
Tungsten Indoor Flood Lighting
Fluorescent Lighting
 Silicon Imaging , Inc. 2003
19 of 31
Company Confidential
White Balance
The White Balance is the gain factor applied to each of the RGB pixels to compensate for various light sources (color
temperatures), which have different % of R,G, and B components to make up a white light. Typical lighting conditions
include sunlight, fluorescent and tungsten. A white balance gain is typically computed by capturing an image of a white
object, finding the brightest point, and determining the gains to have the RGB values be equal. In the example below,
white balance is achieved by increasing the gains of red and blue to match the green level.
White Balance (Tweak Color)
The WB gains ("Bright") values can be adjusted either numerically in the WB Bright tab or by point and click adjustment
on a color wheel from the WB Set. Select a position on screen using the cursor and select Tweak Color @ Cursor. A
color adjust window will appear and allow you to change the target RGB gain values to produce the desired color.
 Silicon Imaging , Inc. 2003
20 of 31
Company Confidential
White Balance (Set AOI)
The software can analyze the image and generate of "Bright" values to be used for White Balance gains. The default
region (AOI) is the center 1/3 of the image. To change the AOI, go to the WB Opt. tab and select Set AOI. Check the
Interact radio and you can click and drag the position on your image.
First, the image is White Balanced and then a saturation factor is applied either in the Y,U,V domain or in RGB based
on the following Matrix. The Image must be white balanced FIRST then apply.
 Silicon Imaging , Inc. 2003
21 of 31
Company Confidential
Color Correction Matrix ("Gammut")
In order to get correct color rendition from a single chip Bayer camera requires the use of a correction matrix which
compensates for the non-perfect filtering of the R,G,B filters on each pixel. For example, a green pixel will respond to
light from Red and Blue sources. This amount needs to be reduced proportionately. The correction matrix for the
RGB values is called the "Gammut".
The operation for saturation, after white balance is:
[m00 m01 m02] [ R ]
[m10 m11 m12] * [ G ]
[m20 m21 m22] [ B ]
m00 = 0.299 + 0.701*K
m01 = 0.587 * (1-K)
m02 = 0.114 * (1-K)
m10 = 0.299 * (1-K)
m11 = 0.587 + 0.413*K
m12 = 0.114 * (1-K)
m20 = 0.299 * (1-K)
m21 = 0.587 * (1-K)
m22 = 0.114 + 0.886*K
K is the saturation factor
K=1 means no change
K > 1 increases saturation
0<K<1 decreases saturation, K=0 produces B&W , K<0 inverts color
Saturation
Saturation
Saturation
Saturation
R
R
R
R
G
B
1
1
0
0
1.7
1.4907
-0.4109
-0.0798
1.9
1.6309
-0.5283
-0.1026
2
1.701
-0.587
-0.114
G
G
G
R
G
B
0
1
0
-0.2093
1.2891
-0.0798
-0.2691
1.3717
-0.1026
-0.299
1.413
-0.114
B
B
B
R
G
B
0
0
1
-0.2093
-0.4109
1.6202
-0.2691
-0.5283
1.7974
-0.299
-0.587
1.886
The Image can be gain-offset corrected first and will be in white balance for that lighting condition. If lighting is changes
the white balance needs to be recalculated as a post G&O processed image.
 Silicon Imaging , Inc. 2003
22 of 31
Company Confidential
SAVE & RECALL SETTINGS
 Silicon Imaging , Inc. 2003
23 of 31
Company Confidential
GIO TRIGGER SEQUENCING
The latest XCAP software now supports General IO Event Capture for the SI3170 . This can be used to triggger an
event capture at using the TTL inputs on HDR2. The capture will run live until the trigger is onput. At the next op of
frame (V-drive) at TTL output signal is set and the frame will be frozen.
 Silicon Imaging , Inc. 2003
24 of 31
Company Confidential
Trigger Timing
 Silicon Imaging , Inc. 2003
25 of 31
Company Confidential
Trigger Wiring
TTL Trigger Input & Output is on the 10-pin Header
 Silicon Imaging , Inc. 2003
26 of 31
Company Confidential
SEQUENCE RECORDING & PLAYBACK
 Silicon Imaging , Inc. 2003
27 of 31
Company Confidential
View Palette
The View Palette can be used to adjust settings for use in display on the monitor, but do not change the underlying pixel
data. When saving images you have an option to then apply the view palette to the image or save the palette
separately.
2-D Line Profile Plot
 Silicon Imaging , Inc. 2003
28 of 31
Company Confidential
TWAIN OPERATION
There are 2 methods of TWAIN capture Sourcery and Stand-Alone.
TWAIN Sourcery Mode
This mode allows the live XCAP controls of SI3170 setting using the Capture & Adjust Window. This includes enabling
NORMilazation for Offset correction (hot-pixel removal).
XCAP must be running in the backgroud. It may be useful to set the ALWAYS-ON-TOP and SIZE WINDOW (View Display - Window-tab) for convenient Pop-up of XCAP window from the backround.
 Silicon Imaging , Inc. 2003
29 of 31
Company Confidential
TWAIN Stand-Alone Mode
In the Stand-alone mode the TWAIN capture uses a preconfigured format file. This file name/path must be placed in the
WIN.INI in order to operate.
a.) Save Format File
b.) In the WIN.INI, add or modify section:
[EPIX_XC]
TwainVideoFormat=filename.fmt
(path name of the Saved video format file)
*** Hint: XCAP automatically saves its last used video format file as C:\XCAP\XCVIDSET.FMT, By setting the filename
to:
TwainVideoFormat=C:\XCAP\XCVIDSET.FMT
will let the TWAIN capture wil always use the last format file and settings operted by XCAP.
 Silicon Imaging , Inc. 2003
30 of 31
Company Confidential
SI3170 COLOR RESPONSE & FILTER
SI3170RGB Bayer Pixel Response
 Silicon Imaging , Inc. 2003
31 of 31
Company Confidential
Download