CUDA Accelerated GStreamer Camera Undistort - Getting Started - Evaluating the Undistort

From RidgeRun Developer Wiki



Previous: Getting Started Index Next: Getting Started/Getting the code





Requesting the Evaluation Binary

In order to request an evaluation binary for a specific architecture, please contact us providing the following information:

  • Platform (i.e.: NVIDIA Jetson TX1/TX2, Xavier, Nano.)
  • Jetpack version

Features of the Evaluation

To help you test our distortion correction, RidgeRun can provide an evaluation version of the plug-in.

The following table summarizes the features available in both the professional and evaluation version of the element.

Feature Professional Evaluation
Undistort Examples Y Y
Cuda Undistort Element Y Y
Unlimited Processing Time Y N (1)
Source Code Y N
Table 1. Features provided in the evaluation version

(1) The evaluation version will limit the processing to a maximum of 1800 frames.

Install and test the evaluation binaries

CUDA dependencies

In case you performed a manual installation of your board (not using the SDK Manager), proceed to install the following packages
sudo apt install nvidia-l4t-jetson-multimedia-api cuda-npp-10-2 cuda-cufft-10-2 libcublas10 libcudnn8

GstCUDA

If you already own a professional version of this element, skip to the Cuda Undistort element below.
To install the evaluation binaries follow the instructions found in the GstCuda Installation guide

OpenCV

If you pretend to use the undistort with the Cuda-Stitcher element, follow the instructions for Compiling OpenCV for Image Stitching, since the stitcher requires a specific version of RidgeRun's OpenCV Fork.
On the other hand, if you are using the undistort as a standalone element, just install OpenCV with the CUDA module enabled from here

GLib JSON

Execute the following packages
sudo apt install libjsoncpp-dev
sudo apt install libjson-glib-dev

Install the tar package

RidgeRun should've provided you with the following compressed tar package/s:

cuda-undistort-X.Y.Z-P-J-eval.tar.gz

Extract the contents of the file with the following command:

tar xvzf <path-to-evaluation-tar-file>

The provided cuda-undistort eval version tarball will have a structure similar to the following:

cuda-undistort-X.Y.Z-P-J-eval
├── configuration.sh
├── environment.sh
├── examples
│   ├── cudafilter_algorithms
│   │   ├── gray-scale-filter
│   │   │   └── gray-scale-filter.so
│   │   ├── median-filter
│   │   │   └── median-filter.so
│   │   ├── memcpy
│   │   │   └── memcpy.so
│   │   └── pinhole
│   │       └── pinhole.so
│   └── cudamux_algorithms
│       └── mixer
│           └── mixer.so
├── lib
│   └── aarch64-linux-gnu
│       ├── cmake
│       │   └── opencv4
│       │       ├── OpenCVConfig.cmake
│       │       ├── OpenCVConfig-version.cmake
│       │       ├── OpenCVModules.cmake
│       │       └── OpenCVModules-release.cmake
│       ├── gstreamer-1.0
│       │   ├── libgstcuda.a
│       │   ├── libgstcudaexamplefilter.a
│       │   ├── libgstcudaexamplefilter.la
│       │   ├── libgstcudaexamplefilter.so
│       │   ├── libgstcuda.la
│       │   ├── libgstcuda.so
│       │   ├── libgstcudaundistort.so
│       │   ├── libgstopencvfilter.a
│       │   ├── libgstopencvfilter.la
│       │   ├── libgstopencvfilter.so
│       │   ├── libgstopencvwarp.a
│       │   ├── libgstopencvwarp.la
│       │   └── libgstopencvwarp.so
│       ├── libgstcuda-1.0.a
│       ├── libgstcuda-1.0.la
│       ├── libgstcuda-1.0.so -> libgstcuda-1.0.so.0.100.0
│       ├── libgstcuda-1.0.so.0 -> libgstcuda-1.0.so.0.100.0
│       ├── libgstcuda-1.0.so.0.100.0
│       ├── libopencv_alphamat.so -> libopencv_alphamat.so.4.4
│       ├── libopencv_alphamat.so.4.4 -> libopencv_alphamat.so.4.4.0
│       ├── libopencv_alphamat.so.4.4.0
│       ├── libopencv_aruco.so -> libopencv_aruco.so.4.4
│       ├── libopencv_aruco.so.4.4 -> libopencv_aruco.so.4.4.0
│       ├── libopencv_aruco.so.4.4.0
│       ├── libopencv_bgsegm.so -> libopencv_bgsegm.so.4.4
│       ├── libopencv_bgsegm.so.4.4 -> libopencv_bgsegm.so.4.4.0
│       ├── libopencv_bgsegm.so.4.4.0
│       ├── libopencv_bioinspired.so -> libopencv_bioinspired.so.4.4
│       ├── libopencv_bioinspired.so.4.4 -> libopencv_bioinspired.so.4.4.0
│       ├── libopencv_bioinspired.so.4.4.0
│       ├── libopencv_calib3d.so -> libopencv_calib3d.so.4.4
│       ├── libopencv_calib3d.so.4.4 -> libopencv_calib3d.so.4.4.0
│       ├── libopencv_calib3d.so.4.4.0
│       ├── libopencv_ccalib.so -> libopencv_ccalib.so.4.4
│       ├── libopencv_ccalib.so.4.4 -> libopencv_ccalib.so.4.4.0
│       ├── libopencv_ccalib.so.4.4.0
│       ├── libopencv_core.so -> libopencv_core.so.4.4
│       ├── libopencv_core.so.4.4 -> libopencv_core.so.4.4.0
│       ├── libopencv_core.so.4.4.0
│       ├── libopencv_cudaarithm.so -> libopencv_cudaarithm.so.4.4
│       ├── libopencv_cudaarithm.so.4.4 -> libopencv_cudaarithm.so.4.4.0
│       ├── libopencv_cudaarithm.so.4.4.0
│       ├── libopencv_cudabgsegm.so -> libopencv_cudabgsegm.so.4.4
│       ├── libopencv_cudabgsegm.so.4.4 -> libopencv_cudabgsegm.so.4.4.0
│       ├── libopencv_cudabgsegm.so.4.4.0
│       ├── libopencv_cudacodec.so -> libopencv_cudacodec.so.4.4
│       ├── libopencv_cudacodec.so.4.4 -> libopencv_cudacodec.so.4.4.0
│       ├── libopencv_cudacodec.so.4.4.0
│       ├── libopencv_cudafeatures2d.so -> libopencv_cudafeatures2d.so.4.4
│       ├── libopencv_cudafeatures2d.so.4.4 -> libopencv_cudafeatures2d.so.4.4.0
│       ├── libopencv_cudafeatures2d.so.4.4.0
│       ├── libopencv_cudafilters.so -> libopencv_cudafilters.so.4.4
│       ├── libopencv_cudafilters.so.4.4 -> libopencv_cudafilters.so.4.4.0
│       ├── libopencv_cudafilters.so.4.4.0
│       ├── libopencv_cudaimgproc.so -> libopencv_cudaimgproc.so.4.4
│       ├── libopencv_cudaimgproc.so.4.4 -> libopencv_cudaimgproc.so.4.4.0
│       ├── libopencv_cudaimgproc.so.4.4.0
│       ├── libopencv_cudalegacy.so -> libopencv_cudalegacy.so.4.4
│       ├── libopencv_cudalegacy.so.4.4 -> libopencv_cudalegacy.so.4.4.0
│       ├── libopencv_cudalegacy.so.4.4.0
│       ├── libopencv_cudaobjdetect.so -> libopencv_cudaobjdetect.so.4.4
│       ├── libopencv_cudaobjdetect.so.4.4 -> libopencv_cudaobjdetect.so.4.4.0
│       ├── libopencv_cudaobjdetect.so.4.4.0
│       ├── libopencv_cudaoptflow.so -> libopencv_cudaoptflow.so.4.4
│       ├── libopencv_cudaoptflow.so.4.4 -> libopencv_cudaoptflow.so.4.4.0
│       ├── libopencv_cudaoptflow.so.4.4.0
│       ├── libopencv_cudastereo.so -> libopencv_cudastereo.so.4.4
│       ├── libopencv_cudastereo.so.4.4 -> libopencv_cudastereo.so.4.4.0
│       ├── libopencv_cudastereo.so.4.4.0
│       ├── libopencv_cudawarping.so -> libopencv_cudawarping.so.4.4
│       ├── libopencv_cudawarping.so.4.4 -> libopencv_cudawarping.so.4.4.0
│       ├── libopencv_cudawarping.so.4.4.0
│       ├── libopencv_cudev.so -> libopencv_cudev.so.4.4
│       ├── libopencv_cudev.so.4.4 -> libopencv_cudev.so.4.4.0
│       ├── libopencv_cudev.so.4.4.0
│       ├── libopencv_datasets.so -> libopencv_datasets.so.4.4
│       ├── libopencv_datasets.so.4.4 -> libopencv_datasets.so.4.4.0
│       ├── libopencv_datasets.so.4.4.0
│       ├── libopencv_dnn_objdetect.so -> libopencv_dnn_objdetect.so.4.4
│       ├── libopencv_dnn_objdetect.so.4.4 -> libopencv_dnn_objdetect.so.4.4.0
│       ├── libopencv_dnn_objdetect.so.4.4.0
│       ├── libopencv_dnn.so -> libopencv_dnn.so.4.4
│       ├── libopencv_dnn.so.4.4 -> libopencv_dnn.so.4.4.0
│       ├── libopencv_dnn.so.4.4.0
│       ├── libopencv_dnn_superres.so -> libopencv_dnn_superres.so.4.4
│       ├── libopencv_dnn_superres.so.4.4 -> libopencv_dnn_superres.so.4.4.0
│       ├── libopencv_dnn_superres.so.4.4.0
│       ├── libopencv_dpm.so -> libopencv_dpm.so.4.4
│       ├── libopencv_dpm.so.4.4 -> libopencv_dpm.so.4.4.0
│       ├── libopencv_dpm.so.4.4.0
│       ├── libopencv_face.so -> libopencv_face.so.4.4
│       ├── libopencv_face.so.4.4 -> libopencv_face.so.4.4.0
│       ├── libopencv_face.so.4.4.0
│       ├── libopencv_features2d.so -> libopencv_features2d.so.4.4
│       ├── libopencv_features2d.so.4.4 -> libopencv_features2d.so.4.4.0
│       ├── libopencv_features2d.so.4.4.0
│       ├── libopencv_flann.so -> libopencv_flann.so.4.4
│       ├── libopencv_flann.so.4.4 -> libopencv_flann.so.4.4.0
│       ├── libopencv_flann.so.4.4.0
│       ├── libopencv_fuzzy.so -> libopencv_fuzzy.so.4.4
│       ├── libopencv_fuzzy.so.4.4 -> libopencv_fuzzy.so.4.4.0
│       ├── libopencv_fuzzy.so.4.4.0
│       ├── libopencv_gapi.so -> libopencv_gapi.so.4.4
│       ├── libopencv_gapi.so.4.4 -> libopencv_gapi.so.4.4.0
│       ├── libopencv_gapi.so.4.4.0
│       ├── libopencv_hfs.so -> libopencv_hfs.so.4.4
│       ├── libopencv_hfs.so.4.4 -> libopencv_hfs.so.4.4.0
│       ├── libopencv_hfs.so.4.4.0
│       ├── libopencv_highgui.so -> libopencv_highgui.so.4.4
│       ├── libopencv_highgui.so.4.4 -> libopencv_highgui.so.4.4.0
│       ├── libopencv_highgui.so.4.4.0
│       ├── libopencv_imgcodecs.so -> libopencv_imgcodecs.so.4.4
│       ├── libopencv_imgcodecs.so.4.4 -> libopencv_imgcodecs.so.4.4.0
│       ├── libopencv_imgcodecs.so.4.4.0
│       ├── libopencv_img_hash.so -> libopencv_img_hash.so.4.4
│       ├── libopencv_img_hash.so.4.4 -> libopencv_img_hash.so.4.4.0
│       ├── libopencv_img_hash.so.4.4.0
│       ├── libopencv_imgproc.so -> libopencv_imgproc.so.4.4
│       ├── libopencv_imgproc.so.4.4 -> libopencv_imgproc.so.4.4.0
│       ├── libopencv_imgproc.so.4.4.0
│       ├── libopencv_intensity_transform.so -> libopencv_intensity_transform.so.4.4
│       ├── libopencv_intensity_transform.so.4.4 -> libopencv_intensity_transform.so.4.4.0
│       ├── libopencv_intensity_transform.so.4.4.0
│       ├── libopencv_line_descriptor.so -> libopencv_line_descriptor.so.4.4
│       ├── libopencv_line_descriptor.so.4.4 -> libopencv_line_descriptor.so.4.4.0
│       ├── libopencv_line_descriptor.so.4.4.0
│       ├── libopencv_mcc.so -> libopencv_mcc.so.4.4
│       ├── libopencv_mcc.so.4.4 -> libopencv_mcc.so.4.4.0
│       ├── libopencv_mcc.so.4.4.0
│       ├── libopencv_ml.so -> libopencv_ml.so.4.4
│       ├── libopencv_ml.so.4.4 -> libopencv_ml.so.4.4.0
│       ├── libopencv_ml.so.4.4.0
│       ├── libopencv_objdetect.so -> libopencv_objdetect.so.4.4
│       ├── libopencv_objdetect.so.4.4 -> libopencv_objdetect.so.4.4.0
│       ├── libopencv_objdetect.so.4.4.0
│       ├── libopencv_optflow.so -> libopencv_optflow.so.4.4
│       ├── libopencv_optflow.so.4.4 -> libopencv_optflow.so.4.4.0
│       ├── libopencv_optflow.so.4.4.0
│       ├── libopencv_phase_unwrapping.so -> libopencv_phase_unwrapping.so.4.4
│       ├── libopencv_phase_unwrapping.so.4.4 -> libopencv_phase_unwrapping.so.4.4.0
│       ├── libopencv_phase_unwrapping.so.4.4.0
│       ├── libopencv_photo.so -> libopencv_photo.so.4.4
│       ├── libopencv_photo.so.4.4 -> libopencv_photo.so.4.4.0
│       ├── libopencv_photo.so.4.4.0
│       ├── libopencv_plot.so -> libopencv_plot.so.4.4
│       ├── libopencv_plot.so.4.4 -> libopencv_plot.so.4.4.0
│       ├── libopencv_plot.so.4.4.0
│       ├── libopencv_quality.so -> libopencv_quality.so.4.4
│       ├── libopencv_quality.so.4.4 -> libopencv_quality.so.4.4.0
│       ├── libopencv_quality.so.4.4.0
│       ├── libopencv_rapid.so -> libopencv_rapid.so.4.4
│       ├── libopencv_rapid.so.4.4 -> libopencv_rapid.so.4.4.0
│       ├── libopencv_rapid.so.4.4.0
│       ├── libopencv_reg.so -> libopencv_reg.so.4.4
│       ├── libopencv_reg.so.4.4 -> libopencv_reg.so.4.4.0
│       ├── libopencv_reg.so.4.4.0
│       ├── libopencv_rgbd.so -> libopencv_rgbd.so.4.4
│       ├── libopencv_rgbd.so.4.4 -> libopencv_rgbd.so.4.4.0
│       ├── libopencv_rgbd.so.4.4.0
│       ├── libopencv_saliency.so -> libopencv_saliency.so.4.4
│       ├── libopencv_saliency.so.4.4 -> libopencv_saliency.so.4.4.0
│       ├── libopencv_saliency.so.4.4.0
│       ├── libopencv_shape.so -> libopencv_shape.so.4.4
│       ├── libopencv_shape.so.4.4 -> libopencv_shape.so.4.4.0
│       ├── libopencv_shape.so.4.4.0
│       ├── libopencv_stereo.so -> libopencv_stereo.so.4.4
│       ├── libopencv_stereo.so.4.4 -> libopencv_stereo.so.4.4.0
│       ├── libopencv_stereo.so.4.4.0
│       ├── libopencv_stitching.so -> libopencv_stitching.so.4.4
│       ├── libopencv_stitching.so.4.4 -> libopencv_stitching.so.4.4.0
│       ├── libopencv_stitching.so.4.4.0
│       ├── libopencv_structured_light.so -> libopencv_structured_light.so.4.4
│       ├── libopencv_structured_light.so.4.4 -> libopencv_structured_light.so.4.4.0
│       ├── libopencv_structured_light.so.4.4.0
│       ├── libopencv_superres.so -> libopencv_superres.so.4.4
│       ├── libopencv_superres.so.4.4 -> libopencv_superres.so.4.4.0
│       ├── libopencv_superres.so.4.4.0
│       ├── libopencv_surface_matching.so -> libopencv_surface_matching.so.4.4
│       ├── libopencv_surface_matching.so.4.4 -> libopencv_surface_matching.so.4.4.0
│       ├── libopencv_surface_matching.so.4.4.0
│       ├── libopencv_text.so -> libopencv_text.so.4.4
│       ├── libopencv_text.so.4.4 -> libopencv_text.so.4.4.0
│       ├── libopencv_text.so.4.4.0
│       ├── libopencv_tracking.so -> libopencv_tracking.so.4.4
│       ├── libopencv_tracking.so.4.4 -> libopencv_tracking.so.4.4.0
│       ├── libopencv_tracking.so.4.4.0
│       ├── libopencv_videoio.so -> libopencv_videoio.so.4.4
│       ├── libopencv_videoio.so.4.4 -> libopencv_videoio.so.4.4.0
│       ├── libopencv_videoio.so.4.4.0
│       ├── libopencv_video.so -> libopencv_video.so.4.4
│       ├── libopencv_video.so.4.4 -> libopencv_video.so.4.4.0
│       ├── libopencv_video.so.4.4.0
│       ├── libopencv_videostab.so -> libopencv_videostab.so.4.4
│       ├── libopencv_videostab.so.4.4 -> libopencv_videostab.so.4.4.0
│       ├── libopencv_videostab.so.4.4.0
│       ├── libopencv_xfeatures2d.so -> libopencv_xfeatures2d.so.4.4
│       ├── libopencv_xfeatures2d.so.4.4 -> libopencv_xfeatures2d.so.4.4.0
│       ├── libopencv_xfeatures2d.so.4.4.0
│       ├── libopencv_ximgproc.so -> libopencv_ximgproc.so.4.4
│       ├── libopencv_ximgproc.so.4.4 -> libopencv_ximgproc.so.4.4.0
│       ├── libopencv_ximgproc.so.4.4.0
│       ├── libopencv_xobjdetect.so -> libopencv_xobjdetect.so.4.4
│       ├── libopencv_xobjdetect.so.4.4 -> libopencv_xobjdetect.so.4.4.0
│       ├── libopencv_xobjdetect.so.4.4.0
│       ├── libopencv_xphoto.so -> libopencv_xphoto.so.4.4
│       ├── libopencv_xphoto.so.4.4 -> libopencv_xphoto.so.4.4.0
│       ├── libopencv_xphoto.so.4.4.0
│       └── pkgconfig
│           ├── gst-cuda-1.0.pc
│           └── opencv4.pc
└── README

Execute the test environment configuration script:


cd cuda-undistort-X.Y.Z-P-J-eval
./configuration.sh


Clean the GStreamer registry

rm ~/.cache/gstreamer-1.0/registry.aarch64.bin 


Verify the element is available

gst-inspect-1.0 cudaundistort

You should see the inspect output for the evaluation binary.

How to use it

You can calibrate your camera and use the undistort element by following this guide: Camera calibration


Troubleshooting

The first level of debugging to troubleshoot a failing evaluation binary is to inspect GStreamer debug output.

GST_DEBUG=2 gst-launch-1.0

If the output doesn't help you figure out the problem, please contact support@ridgerun.com with the output of the GStreamer debug and any additional information you consider useful.

RidgeRun also offers professional support hours that you can invest in any embedded Linux related task you want to assign to RidgeRun, such as hardware bring-up tasks, application development, GStreamer pipeline fine-tuning, drivers, etc...


Previous: Getting Started Index Next: Getting Started/Getting the code