This page describes the required steps to use an AVT GigE camera in combination with an Ubuntu operating system.

Update 02/05/2013 - Configuration with windows 7 x64 bit added at each step - using single ethernet port on laptop
Update 02/02/2014 - Added a link to a working configuration using Manta camera and OpenCV 2.4.9


Content

  • AVT PvAPI SDK for GigE VisionĀ® cameras
  • Ethernet configuration
  • Viewing frames
  • Capturing frames



Downloadable content


You can find a working code snippet on how to connect the manta camera at the following link (checked at 02/02/2014):

https://github.com/StevenPuttemans/opencv_tryout_code/blob/master/camera_interfacing/AVT_manta_camera.cpp



AVT PvAPI SDK

  • Download the AVT PvAPI SDK for Linux
  • Extract this package at a known location, since this package contains the libraries for the SDK and you'll need this location during the following steps

Windows 7 x64 bit:
  • Download the AVT PvAPI SDK for Windows
  • Install the SDK into a preselected folder, of which the location is needed for further installation - it will contain the needed folders for project configuration



Ethernet configuration

  • Configuration of the Ethernet interface of your computer is necessary to use the GigE camera and can be realized in 2 ways:
    • A first configuration is a point to point connection between the GigE camera and your computer. In this configuration, the Ethernet connector of your PC is connected to the GigE camera.
      • Change the IP Address of your PC to 169.254.1.1
      • Change network mask to 16
      • Change Gateway to 169.254.1.2
    • A second configuration is realized by connecting the GigE camera on the same switch which is used to connect your computer. In this case it's recommended to create a virtual Ethernet interface on top of the physical Ethernet interface:
sudo ifconfig eth0:1 169.254.1.1 up
sudo route add 169.254.0.0 gw 169.254.1.1
Windows 7 x64 bit:
  • Go to Control Panel > Network Center > Change adapter settings
  • Right click on your ethernet adapter > Properties
  • On the card properties page > Configure > Advanced > Select the following properties and adapt their value
    • Jumbo Mtu - 9014 or maximum value
    • Receive buffers - 512 (if setting is available)
    • Interrupt moderation - extreme or enable

  • Go to Control Panel > Windows Firewall
    • In properties select shut down / disable menu
    • Select 'Disable Windows Firewall' for both private as public networks

  • Go to Control Panel > Network Center > Change adapter settings
  • Right click on ethernet adapter > Properties
  • Select IPv4 Protocol
    • Select Automatic IP adress selection
    • Select Automatic DNS server selection
    • Then deselect all options except for TCP/IPv4



Viewing frames

  • The AVT PvAPI SDK comes with a precompiled SampleViewer, this SampleViewer works only if a gcc4.5 compiler (or a newer version) is installed
    • Go to the extracted SDK folder
cd bin-pc
cd <choose your architecture>
./SampleViewer
    • When a camera is found, a device number is displayed
    • click on the "eye-icon" to start the live view

  • When a gcc4.4 compiler is installed, it's necessary to recompile the SampleViewer
    • Download this Makefile
    • Replace the Makefile in <SDK-folder>/examples/SampleViewer by this new Makefile
    • Download this ARCH file
    • Replace the ARCH file in <SDK-folder>/examples by this new ARCH file
    • Open this new ARCH file and check the CPU and Compiler version variables and correct them if necessary
cd <SDK-folder>/examples/SampleViewer
make sample
make install
./SampleViewer
    • When a camera is found, a device number is displayed
    • click on the "eye-icon" to start the live view

Windows 7 x64 bit:
  • Go to GigESDK folder > bin-pc > x64
  • Start up SampleViewer.exe
  • Select your camera
  • Click on the eye - icon to start the live camera feed


Capturing frames

#define _LINUX
#define _x86 (or _x64 according to your operating system)
  • This Makefile make use of OpenCV 2.3.1 or a higher version, visit this page to install OpenCV
  • Compile CaptureSaveMono.cpp by using the "make" command
  • Execute by using this command: "./SaveFrame"

Windows 7 x64 bit:
  • Download the source code here (linux specific libraries were removed and interfacing was changed)
  • Create a new C++ empty console project using VS2010 or another windows compatible SDK
  • Add the source file to the project
  • Configure the following settings in project properties
    • C/C++ - General - Additional Include Directories : D:\OpenCV2.4\build\include;
      D:\OpenCV2.4\build\include\opencv;
      D:\OpenCV2.4\build\include\opencv2;
      D:\Manta\GigESDK\inc-pc;
      %(AdditionalIncludeDirectories)
    • Linker - General - Additional Library Directories : D:\OpenCV2.4\build\x64\vc10\lib;
      D:\Manta\GigESDK\lib-pc\x64
    • Linker - Input - Additional Dependencies : (for moment all openCV libraries in order to provide full functionality)
      opencv_core243d.lib; opencv_highgui243d.lib;
      opencv_video243d.lib; opencv_ml243d.lib;
      opencv_legacy243d.lib; opencv_calib3d243d.lib;
      opencv_contrib243d.lib; opencv_features2d243d.lib;
      opencv_haartraining_engined.lib; opencv_objdetect243d.lib;
      ImageLib.lib; PvAPI.lib

Build the project and go to the destination folder of the application. The *.exe can be found there and called using command line tool.
Do not forget to add enough parameters (location of folder / number of frames / extension of files).


Opening video live stream using manta camera - Windows version only


A windows cpp file was created to pull in a live stream from the manta camera in order to perform image operations on the input.
Main differences with previous files:
  1. Code transfered to openCV 2.4.5 completely
  2. Solely using C++ interface, not the C style interface of openCV
  3. Removed all overburden / unneccesary code

Code can be downloaded here:


Usage:

manta_GigE_streaming.exe <resolution width> <resolution heigth>