Manta+GigE+camera

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__= code sudo ifconfig eth0:1 169.254.1.1 up sudo route add 169.254.0.0 gw 169.254.1.1 code Windows 7 x64 bit:
 * 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:
 * 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__= code cd bin-pc cd ./SampleViewer code
 * 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
 * When a camera is found, a device number is displayed
 * click on the "eye-icon" to start the live view

code cd /examples/SampleViewer make sample make install ./SampleViewer code
 * When a gcc4.4 compiler is installed, it's necessary to recompile the SampleViewer
 * Download this Makefile [[file:Makefile]]
 * Replace the Makefile in /examples/SampleViewer by this new Makefile
 * Download this ARCH file [[file:ARCH]]
 * Replace the ARCH file in /examples by this new ARCH file
 * Open this new ARCH file and check the CPU and Compiler version variables and correct them if necessary
 * 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__= > code code
 * Download the source code and associated MakeFile
 * rename Makefile_Capture to Makefile
 * Open the Makefile and check the location of the SDK and OpenCV libraries and correct them if necesarry
 * Open in /inc-pc the file PvApi.h
 * Add two lines to this file:
 * 1) define _LINUX
 * 2) 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: >> //D:\OpenCV2.4\build\include\opencv;// >> //D:\OpenCV2.4\build\include\opencv2;// >> //D:\Manta\GigESDK\inc-pc;// >> //%(AdditionalIncludeDirectories)// >> //D:\Manta\GigESDK\lib-pc\x64// >> //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).
 * Download the source code here (linux specific libraries were removed and interfacing was changed)
 * [[file:CaptureSaveMono.cpp]]
 * 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;//
 * Linker - General - Additional Library Directories : //D:\OpenCV2.4\build\x64\vc10\lib;//
 * Linker - Input - Additional Dependencies : (for moment all openCV libraries in order to provide full functionality)

= = =__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