FastVision FC40 User manual

1
FASTCAMERA USB
USER’S AND REFERENCE MANUAL
FVM-00398

2
COPYRIGHT NOTICE
Copyright ?2005 by FastVision LLC.
All rights reserved. This document, in whole or in part, may not be copied, photocopied,
reproduced, translated, or reduced to any other electronic medium or machine-readable
form without the express written consent of FastVision LLC.
FastVision makes no warranty for the use of its products, assumes no responsibility for
any error, which may appear in this document, and makes no commitment to update the
information contained herein. FastVision LLC. retains the right to make changes to this
manual at any time without notice.
Document Name: FastCamera USB User’s and Reference Manual
Document Number: FVM-00398
Revision History: 1.0 February 4, 2005
2.0 February 14, 2005
3.0 March 3, 2005
4.0 April 29, 2005
5.0 May 18, 2005
6.0 July 21, 2005
Trademarks:
FastVision?is a registered trademark of FastVision LLC.
Channel Link?is a trademark of National Semiconductor
Virtex?is a trademark of Xilinx Inc.
Windows?, Windows 95?, Windows 98?, Windows 2000?, Windows NT?, and
Windows XP?are trademarks of Microsoft
All trademarks are the property of their respective holders.

3
FastVision LLC.
131 Daniel Webster Highway, #529
Nashua, NH 03060 USA
Telephone: 603-891-4317 Fax: 603-891-1881
Web Site: http://www.Fast-Vision.com
Email: sales@Fast-Vision.com, or support@Fast-Vision.com

4
Table Of Contents
COPYRIGHT NOTICE_____________________________________________2
USB2.0 USER’S GUIDE TO FC13 AND FC40 __________________________5
The USB 2.0 Versions of Fast Camera 13 and 40___________________________________________5
Computer System Requirements________________________________________________________5
Hardware and Software Installation_____________________________________________________6
Cables and Connectors ________________________________________________________________6
DirectX Installation___________________________________________________________________7
Installing Fast Viewer-USB Application__________________________________________________7
Using Camera for the First Time________________________________________________________7
FastCamera USB Operating Modes and States ____________________________________________8
Fast Camera-USB Application Controls_________________________________________________11
Continuous Capture and Preview Mode_________________________________________________________ 11
Setting Camera Capture Parameters____________________________________________________________13
Saving and Restoring Camera Settings _________________________________________________________ 19
Triggered Mode to Complete Capture of a Video Sequence _________________________________________19
Downloading Captured Video to the Host PC Mode _______________________________________________ 19
Review Captured Video in the Camera Memory __________________________________________________24
Specific Fast Camera Issues___________________________________________________________26
Trade-off between Frame Size and Frame Rate___________________________________________________26
Exposure_________________________________________________________________________________26
Triggering Video Recording Externally_________________________________________________________ 26
FastCamera Test Data _______________________________________________________________28
REFERENCE FOR THE FC13 AND FC40 CAMERAS___________________31
Control FPGA ______________________________________________________________________31
Sensor Control ____________________________________________________________________________31
Flash Memory ____________________________________________________________________________ 36
Serial Camera Control Interface_______________________________________________________________ 41
Inter-FPGA Communications_________________________________________________________________49
Embedded Soft Processor Core _______________________________________________________________50
Data FPGA_________________________________________________________________________59
DDR FPGA ______________________________________________________________________________59
Recording Modes __________________________________________________________________________ 59
Details of Implementation:___________________________________________________________________60
TROUBLESHOOTING ___________________________________________64
FASTVISION TECHNICAL SUPPORT_______________________________64
Contacting Technical Support _________________________________________________________64
Reporting Bugs _____________________________________________________________________66

5
USB2.0 USER’S GUIDE TO FC13 AND FC40
THE USB 2.0 VERSIONS OF FAST CAMERA 13 AND 40
The USB 2.0 versions of Fast Cameras FV-13 and FV-40 make use of the widely used
USB 2.0 computer interface that can carry up to 40 MB/s of data. This interface is a
standard part of all recently manufactured desktop and portable computers. Since the
FastCamera image sensor is capable of capturing video data at rates higher than 660
MB/s such connection required re-thinking of the traditional digital video camera concept
and significant stand-alone operating capabilities in the camera itself.
The FastCamera-USB is able to capture digital video at a very high resolution and frame
rate and save it in the camera’s internal memory so it can be later downloaded directly to
the computer at the USB 2.0 data rate without the need for a specialized frame grabber
board.
COMPUTER SYSTEM REQUIREMENTS
Your computer must be running Windows 2000 or Windows XP for this software to work.
No other version will work, nor have they been tested.
You need at least 3GB of free space on the system’shard disk to install the program, and
depending on the amount of memory in the camera, you may need more to store the
results. You need at least 256 MB of system memory.
You must have a USB 2.0 interface. The software will install but will not operate correctly
without one. In addition the software will not tell you, that you do not have the required
USB 2.0 interface. Please refer to your computer’s documentation to determine if you have
a USB 2.0 port. If you find you do have USB 2.0 support in your computer, you may have
to try all the USB ports to find the one that is actually USB 2.0, some of the older
computers did not have USB 2.0 on all of their USB ports.
The FastCamera USB will work with laptop computers that meet these requirements. Note
that some older laptop computers do not have USB 2.0 ports.
The FastViewer USB application will not interoperate with other USB cameras at the same
time. You must use the FastVision camera alone when you intend to use this software. It is
sufficient to un-plug your other USB cameras and you do not need to un-install their
software.
In addition only one FastVision USB camera will be recognized by the application software,
additional cameras will be ignored.

6
HARDWARE AND SOFTWARE INSTALLATION
Installation of the camera hardware is very simple and has only one hard rule:
CABLES AND CONNECTORS
Operating the USB-connected FastCamera FV13 or FV40 require the use of only two
cables: Standard USB 2.0 AB cable and the Camera specific power cable that can be
optionally equipped with a connector for the external hardware trigger. The USB version of
the FastCamera uses only two connectors on the back of the camera. See Figure 1 below.
Figure 1. USB 2.0 and power connectors.
Connect the power supply cable to the camera first by gently rotating the round connector
until it finds the proper position and slides right in. Plugging in the power cable connector is
easy and doesn’t require any significant force. Disconnect the power cable by gently
pulling it out. No rotation is needed for disconnect.
After connecting the power cable to the camera, power it up by plugging one end of the
standard power cordin the power supply converter and the other end in the AC power
outlet. The LED on the converter box should display a steady green light. If this light is
blinking or dark,the power supply unit is damaged and must be replaced.
DO NOT CONNECT THE U
SB CABLE TO THE
CAMERA AND COMPUTER UNTIL THE
SOFTWARE HAS BEEN INSTALLED.

7
Figure 2. The USB 2.0 A-B cable
Connect the standard USB 2.0 AB computer cable to your computer but do not connect it
to the camera until after the FastCamera application software is installed.
DIRECTXINSTALLATION
Proper operation of the FastCamera USB requires presence of the up-to-date DirectX
support on the computer. There is a setup program for installation of Microsoft DirectX
version 9 on the Installation CD in a sub-directory called DirectX9. This software provides
many of the functions needed by the FastViewer application which may not be present on
your computer. The Microsoft installation program may require you to re-boot your
computer.
You should install DirectX support first, or at least before you run the FastViewer
application for the first time.
INSTALLING FAST VIEWER-USB APPLICATION
Run the setup.exe program on the root of the Installation CD. Take all the defaults but be
sure to read the Readme page (and the license page if you wish).
Just install and do not run the program initially. Start application only after you connect the
USB and power cables to the camera and follow plug-and-play hardware installation dialog
by taking all the defaults on the New-Hardware-Wizard. It is not necessary to try to find an
update on the Web.After the new hardware wizard tells you the hardware is installed, then
you can start the Fast Viewer-USB program.
USING CAMERA FOR THE FIRST TIME
When you start up the program you should see the main application screen like the image
in the Figure 3below. You should see camera video in the rectangle. If you do not see
video, your camera may be powered off or it may not be generating images. Try pressing
the clear memory button to enable the camera video.

8
Figure 3. Fast Viewer-USB Main screen and camera controls.
FASTCAMERA USB OPERATING MODES AND STATES
Operation of the FastCamera USB is presumed to alternate between three main and one
optional state:
1. Continuous capture is the mode when all incoming video data are stored into the
circular buffer located in the camera memory. The preview images of the captured
video are down-sampled from their actual resolution to 640x480 pixels and
displayed in the Preview Display window. Erasing camera memory will restart this
mode from the beginning of the memory buffer. Asserting the internal or internal
Trigger will push the camera to switch out of this state and into the Triggered

9
Capture state. Continuous capture mode is expected to be used as a main
maintenance mode to adjust camera parameters, target and focus the camera on
the object. You can end this mode only by asserting the internal or external Trigger
and shifting into the Capture Completion mode. The software version of the trigger
is asserted by clicking on the Trigger button.
2. The Trigger mode tells the camera to complete video capture into the internal
circular memory buffer by counting down the number of the post-trigger frames
specified by the operator. It starts by the assertion of the internal or external trigger
and stops at the last frame. At the completion of this task, the application
continuously re-displays the last captured image frame creating visual impression of
the stopped camera. Upon completion of the video capture sequence the camera’s
internal memory is full of video data that can be reviewed from that memory or
moved (downloaded) to the computer memory.
3. Downloading images from the camera’s internal memory buffer moves video data
into the host computer memory as TIFF files. Preview Video area is blank during
this operation. After completion of the download the camera retains all image data
until explicitly erased by the operator. The image download can be repeated
multiple times if necessary. The operator can observe the frame indicator and stop
download at any moment reducing the amount of storage used in the download
operation.
4. (Optional) –The operator can choose to review images stored in the camera’s
memory directly and decide if they should be downloaded or erased. This operation
requires download of only image headers to the host computer memory which is
usually faster than the full download. Most of the time this step is unnecessary and
images can be reviewed directly from the computer memory after the full download.
The diagram in the
Figure 4
below illustrates the camera operating modes and transitions
between them.

10
Figure 4, FastCamera Operating modes and transitions.

11
FAST CAMERA-USB APPLICATION CONTROLS
The
Figure 3
shows grouping of camera controls responsible for operation of each
camera mode.
Continuous Capture and Preview Mode
This is the main operating mode of the FastCamera. It is central to its operation and it has
the largest set of camera controls available for this mode. The FastCamera USB is forced
in the Continuous Capture and Preview mode by clicking the Erase Camera button. This
button starts every capture of the video sequence. It clears the camera memory, enables
new video capture to be written to camera memory, and starts the continuous video
capture in the circular memory buffer.
The visual indication of this mode is the live video display in the Video Preview area and a
checkmark appearing on the Write check box.It overwrites all video data you have
previously saved in the camera memory. The Write-box is checked when the camera is
writing to memory. During Continuous Capture mode the Download button is disabled.
(Getting images from memory while writing to memory is not supported).
Remember:every time the live video display stops after a trigger or a video download
operation just press the 'Erase Camera'button. This will again start the capture and the
live preview display albeit it will wipe out any image data you have recorded.
The Full-Check box will be marked first time when the camera memory has been filled by
the incoming video data completely and image data collected earlier is being over-written
by new image data. The Full mark stays on until the camera memory is erased again.
You can not use the camera memory to store multiple recordings. The Erase Camera
button starts recording always at the beginning of the camera memory (address zero).
During the video capture the camera memory is treated as a ‘circular-buffer’. This means
that writing of images to memory begins at the start of memory and continues to the end of
memory and then wraps around to the beginning of memory again. Given enough time
older image data is overwritten with new image data. The number of images that the
camera can hold in memory can be computed from the following: a 1GB memory can hold
508, 1280x1024 images. If you set the frame rate to 500 frames per second this is just
about one second of video. (That is as fast as the camera can go at that frame size.) If you
take the ratio of the image size that has been set to the size of the full image and multiply
by 508 you can determine how many smaller images will fit. (508 *
1280*1024/(width*height) = number you can fit). If you have less than 1Gbyte in your
camera, scale the number again. When you download the images you can get the actual
number that fit.

12
The ‘Reset’ button sends a reset command to the camera that restores its internal state
from the camera internal flash memory. This is the state you find the camera in every time
you power it up. You may want to force it if you find the camera is not operating after your
parameter changes as you expect it to or at all. You will need to Erase Camera after
Reset to re-start the live video preview.
The ‘Cal’ (Calibrate) button executes a self-calibration of the camera image sensor by
forcing an input offset null operation on the A to D converters behind each column in the
image sensor. This may improve image quality in some conditions. The typical indication to
perform that self-calibration is appearance of the bright vertical stripes in the image.
The Continuous Capture mode underlines most of the user interactions by providing the
live Video Preview display. The visual feedback is a necessary background for adjustment
of the camera video capture parameters to match requirements of the specific camera
application.
The Video Preview display area (open rectangle in the picture above), shows live video
from the camera so you can adjust camera capture parameters and point it at the object
you are going to image. Your first step is to communicate what kind of image sensor your
have in the camera: monochrome or color (Bayer filter). Click Grey or Color24 radio
button to reflect your choice. That selection affects only the Video Preview display.
Captured images will be stored on disk with the intact Bayer color filter information. A
special post-processing procedure, Debayer should be run to reconstitute precise color
information in the downloaded video images from the pixel values filtered by the Bayer
pattern in the color version of the camera.
Display of the Color24 images in the Video Preview window can be changed by clicking
on the Adjust Color button that will be activated by the Color24 selection. Again, that
adjustment affects only the Video Preview display.

13
Figure 5, Color24 adjustment controls for the Video Preview display.
In some cases when the Visual Preview image is too dark or too bright to observe you
can do a quick image adjustment using the Display-Digital Gain control.
The Display-Digital Gain only affects the preview window images. If it is set to x1 then
you are looking at the upper 8 bits of the ten bit pixel (9:2), if it is set to x2 you are looking
at the middle 8 bits of the ten bit pixel (8:1), and if it is set to x4 you are looking at the lower
eight bits (7:0). The image data is not clipped or saturated, so you may see a kind of
striping artifact which is normal. It will not affect captured images in any way.
Setting Camera Capture Parameters
During Continuous Capture mode the operator is expected to verify correctness of the
camera setup and its targeting by looking at the Preview Display window. If necessary,
these parameterscan be changed or adjusted.
The camera parameters can be grouped as:
?Image size and position in frame
?Frame rate and exposure

14
?The type and relative position of the Trigger in the captured video sequence.
IMAGE SIZE AND POSITION
By default the FastCamera is set to capture video with the full resolution of the image
sensor in the camera. For various reasons that include increased capture speed and
number of image frames that can be stored in the camera internal memory, you may
choose to limit capture to a Region-Of-Interest (ROI) smaller than the full image frame. To
change ROI click on the Set ROI button to the left on the Video Preview Display area...
Figure 6, Changing ROI of the video capture
The 'Adjust ROI'combo box selects the height and width of the image to be recorded to
memory. The allowed widths go in steps of 10 pixels. The 'Height' combo box selects
the number of lines in the image. Make your change and click on the ‘Apply’ button. The
new image size will be sent to the camera and also reflected in the display at the upper
right corner that shows the camera inner memory size and how many frames will fit in.
If ‘Center’ check box is marked the application will compute the nearest offsets and
position ROI approximately at the center of the field of view. The new position will be
reflected in the grayed-out fields ‘Top’ and ‘Left’ for the upper left corner of the ROI. To
change these fields and place ROI somewhere else, uncheck the ‘Center’ box.
Occasionally, the ROI size is too big for the selected frame rate and should be brought in
compliance for the capture to work. You will be warned if the image height is too large for

15
the frame period you have selected, after you press 'Apply-(Changes)' button.You will be
given a choice between a smaller ROI height and a lower frame rate. Applying your choice
the application will make the smallest possible change.
Figure 7, Changing ROI of the video capture
Any changes you make are not reflected in the camera until the Apply-Changes button is
pressed. The 'Apply'button collects the values of the various settings in the dialog,
verifies them, and updates the camera. If there is an error in your selected settings a
warning will pop-up and the offending value will not be sent to the camera.
The Preview Window is exactly 640x480 pixels. Selecting ROI sizes bigger than 640x480
pixels will only show you the upper left hand part of the image that fits in 640x480 preview
windows. (In fact the camera only sends the upper 640x480 pixels for that is all the USB
2.0 can support in real time.) The alternative to viewing only part of the ROI is to scale the
image down so it fits in the Preview Window. This is done by marking ‘Fit in Window’
check box. In that mode not every pixel in the ROI will be displayed. Downscaling preview
images with regular patterns can potentially create the fringe effect. It will not affect actual
captured images.
FRAME RATE AND EXPOSURE
You can type desired values for the Frame Rate and Exposure in their respective edit
boxes. The Frame Rate (fps) edit box allows the user to set the video capture frame rate
in frames per second. The Exp (us) edit box is used to define the exposure in
microseconds. Here is where you can change the exposure if you want it to be less than
the frame period.For obvious reasons, the exposure time can not be longer than the frame
rate. This limit is enforced by the program when you press the 'Apply'button. You will be
informed about this action and the new exposure value by the information window pop-up.

16
Figure 8, Adjusting exposure to the frame rate
The more intuitive method of setting and adjusting exposure is based on observation of the
Histogram or the preview video. The Histogram window insert is brought about by
clicking on the Histogram button above the Preview Window. It displays the frequency
plot of pixels values in the Preview Window with the lowest (darkest) values at the left side.
The Exposure slider control is placed directly above this plot. Changes in the exposure
will be immediately reflected in the image pixel values and in the changes to the Histogram
plot.

17
Figure 9, Using Image Histogram to adjust exposure
TRIGGER POSITION IN THE CAPTURE BUFFER
The 'Trigger-Settings' button brings up the Trigger Settings dialog which allows you to
choose and set the trigger mode of the camera.
See Figure 10 below
Figure 10,Trigger Settings dialog.

18
The Trigger Settings dialog box controls the settings of the trigger in the camera.
Normally the camera should be in free-running mode, with P2 TTL Enable checked as in
the picture above. That configuration will support both, external and internal Trigger
modes.
The Camera link group box enables and controls the CC1 trigger input in the camera link
interface of the camera. Typically this is used in the configuration with a frame grabber
board and not with camera running in USB mode.
The P2 TTL trigger input is an input on an extra pin of the power connector of the camera.
If you have ordered a power supply with the trigger input option you will have a nine pin
connector where you can apply your trigger.
The Sync Exp check box should be left unchecked. It is documented in the detailed
documentation below and is typically not used
The FastCamera supports the following trigger modes:
Free Running in which the frame rate is determined by the value in the user interface.
Single Edge in which a frame is taken on each trigger from the digital input selected
below.
Multi Edge is not supported by the USB software, but provides for a burst of images to
be collected on each trigger.
The Post-Trigger Frames field defines the relative position of the Trigger in the captured
sequence of video frames. The Trigger can mark beginning, end, or somewhere in the
middle of the frames sequence depending on the user application. Its edit box takes a
number from zero to 65535, which is the number of frames to be taken before stopping
data collection after the trigger is detected (manual, through the software interface or
external, via a cable). Note: you can set the post trigger frame count so high that the
trigger image will not be in the camera memory’s circular buffer when writing stops; see the
discussion below about camera memory states. A value of zero will cause the camera to
stop immediately after receiving the Trigger.
Finally, the Clk/line field defines the number of clocks the camera uses to read out each
line from the image sensor. This should normally be set to 160 but can be as low as 135
clocks/line for the highest rate operation of the camera. It is normally used to slow down
the camera link output of the camera, which is irrelevant for USB operation of the camera.
This setting affects the maximum frame rate you can obtain with the camera. The frame
rate can not exceed the frame readout time which is equal to the Clk/line value plus 1
times the number of lines in the image divided by 66,666,666. (I.e. the sensor clock
speed). If you attempt to set the exposure to a larger value than the frame readout time
you will get a flashing effect with overall image brightness changing from frame to frame.

19
Frame flashing is a sign that the exposure and frame rate are incompatible. Typically you
should set this to 160 and do not change.
Saving and Restoring Camera Settings
The internal flash memory of the FastCamera allows you to define the eight sets of the
camera parameters that can be saved and restored as needed. This is a great time saver if
you need to capture video with the same setup. Just click on the Save/Restore button and
you will see the dialog box as in the Figure 11 below. Select the desired parameter set
and click on the function button: Save or Restore. The first location has a special
meaning –the camera automatically loads the set 1 at the power boot-up. It is convenient
to keep your most often used settings stored in the first storage location. That will make
your settings immediately available on the power-up.
Figure 11, Saving and Restoring Camera Settings
Triggered Mode to Complete Capture of a Video Sequence
The 'Trigger' button sends the manual software trigger input to the camera.When the
camera is triggered by the internal or external event, it switches from the continuous video
capture mode to the video capture completion mode and begins recording post trigger
frames. When all the post trigger frames have been collected the camera stops and
continuously displays in the video preview window the last frame collected.
The Trigger-Check box at the top on the Main screen is marked when the trigger has been
detected by the camera. It is cleared when the camera memory is erased. The trigger can
come from either the software trigger button or an external hardware input signal (CC1 or
P2TTL).
Once this mode is triggered it will go to completion. The operator can’t interrupt it short of
calling the Windows Task manager and stopping the application.
Downloading Captured Video to the Host PC Mode

20
The Download button initiates the process of getting the images sequence from the
camera memory to the host computer memory. It only works after the camera is triggered
and video capture to camera memory is stopped (see preceding explanation of camera
states).
The images from the camera’s internal memory buffer will be stored as TIFF files. Each
frame is stored as a separate file that receives a unique name derived from the internal
time stamp. (
Figure 12
below). The files are named:
YYYY_MM_DD_hh_mm_ss_INDX.tif or
YYYY_MM_DD_hh_mm_ss_INDX_trigger.tif .
Where YYYY is the year, MM is the month (01-12), DD the day (01-31), hh is the hour,
mm is the minute, ss is the second and INDX is the index of the image. The newest image
has index 0001 and will increase as the images get older. Note:the date and time reflects
the time that the image was written to the disk drive and not the time it was collected.
The essential video sequence information is also engraved at the bottom left corner of the
image. The time is a 32 bit quantity which is the number of microseconds since the camera
was turned on.
Figure 12, The frame sequence label
The filename for the frame captured at the trigger event has ‘trigger’ incorporated in the file
name to mark it.
Additional important information is also includedin the tiff tags:
TIFFTAG_SOFTWARE = "FastViewer USB Application Version 3.0.1"
TIFFTAG_DOCUMENTNAME = the file name.
TIFFTAG_IMAGEDESCRIPTION = "Time Tick %d (usec)"
Application software can recover these values from the tags. In addition the files may be
renamed without loosing the original information in the names.
This manual suits for next models
1
Table of contents