Example showing how to use the rc_genicam_api
with OpenCV
to receive images from rc_visard.
Dependencies are rc_genicam_api
and OpenCV
(version 2 or 3).
mkdir build && cd build
cmake ..
make
The following instructions work with cmake-gui and Microsoft Visual Studio-IDE.
- Run cmake-gui and set the source folder to
the repository's folder and the binaries folder to
build
in the repository's folder - Click Configure
- In the pop-up, choose Visual Studio
- Set
OpenCV_DIR
andRC_GENICAM_API_DIR
appropriately - Set
CMAKE_INSTALL_PREFIX
to the path the example should be installed in - Click Generate
- Click Open Project
- Build ALL_BUILD and INSTALL
Running above build commands will build a library rc_visard_opencv_example
and an executable rc_visard_show_streams
.
rc_visard_show_streams
will show the received images in an OpenCV window.
One can cycle through the streams using by pressing n
(next) or
p
(previous).
Press q
to quit.
rc_visard_show_streams
takes the optional flags
--left
, --right
, --disparity
, --confidence
, --error
to select which image streams to show.
Using the flag --synchronize
one can specify to receive only synchronized
data sets.
One also needs to specify the device-id
, which is either the serial number,
the user defined ID or GenTL ID of the rc_visard.
./rc_visard_show_streams [options] <device-id>
Note: The PATH environment variable should point to the folders containing
the DLLs of OpenCV and rc_genicam_api
.
rc_visard_show_streams.exe [options] <device-id>