A set of applications (and helper library) used to assess the performance of a camera when OpenCV is used to display/process the camera stream.
This repository also consists of a script and it's related files that automatically fetches, builds and installs OpenCV with various features and optimization flags enabled. The script also installs the required dependencies. Further, it automatically tries to patch a header as it's required for a successful build.
- This script needs to be run in the same folder where it's dependencies are available. Otherwise, the script might not work correctly.
- This script doesn't automatically try to install CUDA. It must be installed manually. For Jetson boards, instructions can be found in the linked NVIDIA site
To install optimized OpenCV:
cd opencv
bash opencv_install_script.bash
This would have installed OpenCV successfully. To build the sample applications and helper library:
cd ..
mkdir build && cd build
cmake ..
make
sudo make install
The above commands would generate multiple binaries with different characteristics as specified below:
-
opencv-main
: This application uses the VideoCapture API of OpenCV to fetch frames but doesn't render the frames on display. It just prints the framerate achieved.The application can be killed by pressing Ctrl+C.
-
opencv-main-display
: This application is similar toopencv-main
with the only addition that it usesimshow
to display the camera stream in a window.This application can be killed by pressing the ESC key with the display window in focus.
-
opencv-main-gl-display
: This application is similar toopencv-main-display
with the only addition that it uses an OpenGL rendered window to display the camera stream.This application can be killed by pressing the ESC key with the display window in focus.
-
opencv-main-gpu-display
: This application is similar toopencv-main-gl-display
with the only addition that, the image data is copied to a GpuMat first before getting displayed.This application can be killed by pressing the ESC key with the display window in focus.
-
opencv-v4l2
: This application uses V4L2 to grab frame data from the camera and encapsulate it in an OpenCV Mat. This data is then explicitly colorspace converted usingcvtColor
. The application only prints the framerate achieved.This application can be killed by pressing Ctrl+C.
-
opencv-v4l2-display
: This application is similar toopencv-v4l2
with the only addition that it usesimshow
to display the camera stream in a window.This application can be killed by pressing the ESC key with the display window in focus.
-
opencv-v4l2-gl-display
: This application is similar toopencv-v4l2-display
with the only addition that it uses an OpenGL rendered window to display the camera stream.This application can be killed by pressing the ESC key with the display window in focus.
-
opencv-v4l2-gpu-display
: This application is similar toopencv-v4l2-gl-display
with the only addition that, the image data is copied to a GpuMat first before getting displayed.This application can be killed by pressing the ESC key with the display window in focus.
-
opencv-buildinfo
: Sample application that prints the build information of the OpenCV library being used. This application can be used to verify that the options selected during compilation were really enabled.