Browse KB Articles
Getting Started with FlyCapture 2.x and Linux
KB Number: 10548
Technical Application Note (TAN2009003): Getting Started with FlyCapture 2.x and Linux
Application Note Description
With the release of version 2.0 of the FlyCapture SDK, users can program and operate FLIR machine vision cameras in a Linux environment. This Application Note explains the components and steps that are necessary to get started with FlyCapture 2.x and Linux.
Preparing for Use
Before you use your camera, we recommend that you are aware of the following resources available from our downloads page:
Supported Operating System
FlyCapture2 is tested with Ubuntu 12.04, 14.04, and 16.04. Other versions of Ubuntu may also be compatible but have not been officially tested.
Configuring the Operating System and Installing the Required Libraries
To run FlyCapture2 on a Linux Ubuntu system, install the following dependencies:
These libraries are usually packaged with Ubuntu distributions or updates. If they are not pre-installed, use the apt-get console command, as in the following examples:
Installing the FlyCapture SDK
To install the FlyCapture SDK, install the FlyCapture2 .deb files included with the SDK distribution. We provide an easy-to-use install script, named install_flycapture.sh. You can run the script in the same directory in which you have unpacked the software, as in the following example:
This script installs all the flycapture libraries, example code, sample applications and documentation. Additionally, the install script prompts you to configure udev so that 1394 and usb devices can be used by a particular user. If you choose to configure 1394 and usb devices, the script changes permissions on the nodes by overwriting the default Ubuntu permissions and giving the user full read and write access to the device nodes. After running this script, everything is installed and set up for use.
Restart the machine for user permissions to take effect.
Running the FlyCap Demo Program
The FlyCap demo program is run from the Ubuntu applications menu:
Applications -> Point Grey Research -> FlyCapture
The recording window is not implemented on FlyCap2 for Linux. Users who wish to implement recording with the FlyCapture2 SDK can refer to the SaveImageToAviEx SDK sample.
Note: If you are using a USB 3.1 device on an Intel system, you may notice that the FlyCap2 viewer is slow to respond. To avoid this problem, ensure the following kernel versions are used:
Use the following commands to update the kernel:
Compiling the Examples
The FlyCapture SDK includes a number of example applications to help get you started in programming common API tasks. Example files are installed under /usr/src/flycapture. Normal users do not have write access to this location, so copy this folder and sub-folders to a location on your home directory. For example:
In order for the example binaries to copy to the correct location, create a ‘lib’ folder and a ‘bin’ folder within the flycapture directory.
To compile the examples, install the GNU C++ (g++) compiler that is included with the build-essential package:
Some of the examples are GUI-based. The gtk and glade libraries are required to build these examples. These libraries should already be installed during the installation of FlyCapture2. Note that the FlyCaptureGUI example must be built before the FlyCap2 or FlyCapture2GUITest examples can be built.
To compile a specific example, run the makefile located in the example directory. Binaries are copied to the bin directory, and libraries are copied to the lib directory. For example:
Viewing Images and Videos
We suggest the following tools for image and video viewing. FLIR does not officially endorse these tools.
For image viewing:
For video viewing:
For working with Glade files:
Use the uninstall script provided to remove the FlyCapture SDK, as in the following example: