-
Notifications
You must be signed in to change notification settings - Fork 13
Building: GigE Camera Support
This document is about how to get GigE cameras (PtGray and AlliedVision) work with SAF. The guide should also work for other industrial cameras such as USB3 cameras. SAF is tested on these cameras:
And on these platforms:
- NVIDIA Tegra X1, JetPack 2.3.1
- Intel NUC Skull Canyon, Linux Mint 18.1 Serena
This section will guide you through how to use the gige
application with PtGray cameras.
- Download the FlyCapture SDK from PtGray's website, you need to download the correct version for your platform. For Tegra, you need to download the armv7 version if running 32 bit OS, and armv8 version if running 64 bit OS. TODO: link to the download page of the SDK.
- Install the SDK to somewhere on the system, noted as
PtGray_HOME
. UnderPtGray_HOME
you should have aninclude
directory and alib
directory which contain the header files and library files respectively. - It is highly recommended to check the installation of the SDK by running the official example binaries such as
FlyCapture2Test
- Reconfigure the build with
cmake [YOUR OPTIONS] -DUSE_PTGRAY=true -DPtGray_HOME=/path/to/your/FlyCaptureSDK
, you should seeFlyCapture YES
from the config summary. - Then re-build the
gige
app withmake gige
- Add the camera entry in
cameras.toml
, the video URI of the camera is eitherpgr://[CAMERA INDEX]
orpgr://[IP_ADDR]
.[CAMEREA_INDEX]
starts from 0,[IP_ADDR]
is the IP address of the camera. - Run
apps/gige
. Useapps/gige -h
to see the options - Refer to section Control GigE cameras with
apps/gige
to see the usage of the application
- Download the Vimba SDK from AlliedVision website. The official Vimba SDK cannot work on armv8 (64-bit arm), they are planning to release the 64-bit version.
- Follow the instructions by AlliedVision to install the SDK.
- You should try the vimba viewer application to make sure you can get images from your camera.
- Reconfigure the build with
cmake [YOUR OPTIONS] -DUSE_VIMBA=true -DVIMBA_HOME=/path/to/your/VimbaSDK
, you should seeVimba YES
from the config summary. - Then re-build the
gige
app withmake gige
- Add the camera entry in
cameras.toml
, the video uri of the camera is eithervmb://[CAMERA INDEX]
orvmb://[IP_ADDR]
.[CAMEREA_INDEX]
starts from 0,[IP_ADDR]
is the ip address of the camera. - Run
apps/gige
. Useapps/gige -h
to see the options - Refer to section Control GigE cameras with
apps/gige
to see the usage of the application
The gige
command line application is used to control, capture and record using GigE cameras. use gige -h
to show command line arguments.
gige -h
When the display is enabled (-d
), a real-time viewer window will be displayed, a list of camera parameters will be listed on the left. There is a uppercase letter for each parameter, for example, E
for exposure. For each parameter, typing the lowercase corresponding letter will decrease the value of that parameter, and typing the uppercase letter will increase the value of that parameter (type E
to increase exposure, and e
to decrease exposure). h
and H
controls image size. R
will record video using current parameters, individual video frames will be stored in the folder named with the camera name and current timestamp. r
will stop the recording. Notice that no parameter is allowed to be changed during recording.
TODO: add a screenshot
To get maximum frame rate for GigE cameras, it is crucial to set a large network buffer size as the sensor data is transmitted through ethernet.
- For PtGray cameras, set up the buffer size following this link. Please look at the troubleshooting section at the end about increasing socket buffer size.
- For AlliedVision cameras, set up the buffer size following the Vimba manual (you should have a copy of the manual when you purchase the camera, you can also find a copy here). In the manual, search for
MTU
, there is a section on how to increase MTU.
For a GigE camera, you need to connect the camera with a PoE switch, make sure you are connecting to the PoE port (some ports on the switch might not provide power) on the switch. To get maximum bandwidth to transfer large frame at a high frame rate, you should also use a 1G switch.
Once you connected the cameras, then connect the board to the same switch.
The board and the cameras have not been assigned IP addresses yet, because the switch itself may not run a DHCP server so no IP address is assigned to any device. The solution would be to connect the switch to a network that could assign an IP address, such as a router.
Now the cameras and the board are connected to the same local network.