Skip to content

Allied Vision (AVT) GigE Camera Installation Guide for Ubuntu Linux

Tom Davidson edited this page Nov 17, 2015 · 5 revisions

AVT GigE Camera Installation Guide for Ubuntu Linux

Setup Overview

This guide will show you how to add GigE AVT Camera Support for SimpleCV under Ubuntu Linux. The steps are roughly as follows:

  1. Download and copy the AVT drivers to proper paths.
  2. Add a network connection for the camera.
  3. Test that camera drivers function properly.
  4. Test that camera works appropriately in SimpleCV.

Note: The SimpleCV AVT Drivers are currently in the development branch of SimpleCV.

Setup Procedure

tar -xvf AVT_GigE_SDK_Linux.tgz
  • Copy the needed include files and libraries to somewhere the compiler can find them:
cd AVT\ GigE\ SDK/inc-pc
sudo cp * /usr/local/include/
  • Next you need to choose the libraries that appropriate for your system (e.g. x86, x64, arm etc.)

For 32-bit:

cd ../lib-pc/x86/4.4
sudo cp * /usr/local/lib/
cd ../../../bin-pc/x86
sudo cp *.so /usr/local/lib/
sudo cp SampleViewer CLIpConfig /usr/bin

For 64-bit:

cd ../lib-pc/x64/4.4
sudo cp * /usr/local/lib/
cd ../../../bin-pc/x64
sudo cp *.so /usr/local/lib/
sudo cp SampleViewer CLIpConfig /usr/bin

You may need to edit your /etc/ld.so.conf to include /usr/local/lib if it doesn't do so already. Fire up your favorite text editor on the file /etc/ld.so.conf. E.g.

sudo vim /etc/ld.so.conf &

To your ld.so.conf file add the following line:

/usr/local/lib

Now, finally, do the following so that the OS knows about the new library files and can decode them

sudo ldconfig
sudo apt-get install libjpeg62
  • You can skip this step if your camera and computer are already on the same network, but it's sometimes useful to connect the camera directly. If you want to do that, you need to add the wired network connection that the camera will run on. Click on the Ubuntu network connection icon in the top left part of the screen. It looks like this: Networking Click "Edit Connections at the bottom of the page, and click on the "wired" tab on the menu that opens up. That looks like this: Wired Tab Click on the "Add" button to add a new wired connection. Click on the "IPv4 Tab" and from the method drop down select "Link-Local Only." Then click "Save." Add an IPv4 Link-Local

  • Test the installation with the AVT Viewer. At this stage the system has the PvAPI sdk installed so that the compiler and linker can find everything, but we cannot yet build the example viewer application. Building the SampleViewer application: Get the prerequesites of the sample viewer app.

sudo apt-get install  libwxbase2.8-dev libwxgtk2.8-dev

Change to the sdk directory, we're going to build the sample viewer app:

cd ~/AVT\ GigE\ SDK/bin-pc/[x86, x64]/
./SampleViewer

A little window should pop up. To test the camera click the little eye icon. Here is an example: SampleViewer Running

**Now close the SampleViewer so SimpleCV can grab the camera. **

  • Fire up SimpleCV and test that it is working.
SimpleCV 1:> cam = AVTCamera()
SimpleCV 2:> cam.getImage().show()

If everything worked correctly you should see an image like the one below: SimpleCV working with AVT GigE Camera

  • If you see an error saying :
SimpleCV:1> cam = AVTCamera()
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
/home/kscottz/SimpleCV/SimpleCV/Shell/Shell.pyc in <module>()
----> 1 cam = AVTCamera()

/home/kscottz/SimpleCV/SimpleCV/Camera.pyc in __init__(self, camera_id, properties)
   2414             self.dll = ct.CDLL("libPvAPI.dylib", ct.RTLD_GLOBAL)
   2415         else:
-> 2416             self.dll = ct.CDLL("libPvAPI.so")
   2417 
   2418         self.dll.PvInitialize()

/usr/lib/python2.7/ctypes/__init__.pyc in __init__(self, name, mode, handle, use_errno, use_last_error)
    363 
    364         if handle is None:
--> 365             self._handle = _dlopen(self._name, mode)
    366         else:
    367             self._handle = handle

OSError: libPvAPI.so: cannot open shared object file: No such file or directory

For some reason some Linux systems don't like to look in /usr/local/lib for shared library files. What we can do to fix this is add it to your LD_LIBRARY_PATH environment variable. Try doing the following:

export LD_LIBRARY_PATH=/usr/local/lib