Technical Application Note (TAN2009003): Getting Started with FlyCapture 2.x and Linux
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.
For specific details about using FlyCapture and Linux with a USB 3.1 camera, see TAN2012007 Using Linux with USB 3.1.
Before you use your camera, we recommend that you are aware of the following resources available from our downloads page:
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.
To run FlyCapture2 on a Linux Ubuntu system, install the following dependencies:
Dependencies cannot be installed on Ubuntu 14.04.2 release due to an Ubuntu bug that prevents dev packages from installing. Users of Ubuntu 14.04.2 need to install Ubuntu 14.04.1 first and then update to 14.04.2.
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:
user$: sudo apt-get install libraw1394-11 libgtkmm-2.4-1v5 libglademm-2.4-1v5 libgtkglextmm-x11-1.2-dev libgtkglextmm-x11-1.2 libusb-1.0-0
user$: sudo apt-get install libraw1394-11 libgtkmm-2.4-1c2a libglademm-2.4-1c2a libgtkglextmm-x11-1.2-dev libgtkglextmm-x11-1.2 libusb-1.0-0
user$: sudo apt-get install libraw1394-11 libgtk2.0-0 libgtkmm-2.4-dev libglademm-2.4-dev libgtkglextmm-x11-1.2-dev libusb-1.0-0
The raw1394 module that is installed with the libraw1394-8 package may not load after a reboot, causing a FlyCapture bus event error and failure to start an application. To fix this, add raw1394 to the /etc/modules file. If problems persist, add video1394 as well.
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:
user$ sudo sh install_flycapture.sh
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.
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:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade
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:
user$ cp -R /usr/src/flycapture ~
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:
user$ sudo apt-get install build-essential
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:
user$ cd ~/flycapture/src/FlyCapture2Test
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:
user$: sudo sh remove flycapture