I use TX1 board with L4T 28.1
I compile opencv on the board with DWITH_CUDA=ON with cuda 8 toolkit
I try to use opencv functions, which use gpu. I try to declare GpuMat
GpuMat TestGpuMat(480, 640, CV_16UC1, 0x55);
and get Segmentation fault during runtime in module cv::cuda::GpuMat::create().
I can allocate the same matrix if I provide the allocated memory before
Are you still facing the same error message with the example above ?
You may rule out the runtime libraries issue checking with:
ldd ./testCvGpu
As opencv4tegra is installed in /usr, its headers and libs would be found it you don’t specify the location of opencv-3.3.0.
I am away from my TX1 for checking the opencv config, but I use to configure with cmake-gui (using Advanced/Grouped options is better). I use to build in a build directory that is not inside sources tree.
Click on configure and check for any message in red in the cmake-gui console.
Just be sure to disable any opencl* it may enable in group ‘WITH’.
Set CMAKE_INSTALL_PREFIX to your preferred install directory (I use /usr/local/opencv-3.3.0).
It should be enough, but check also that:
CUDA is detected and supported (for TX1 arch is 5.3).
CMAKE Build type is 'Release.
You may also activate other options, such as v4l2 and gstreamer-1.0 support.
Click on configure and check everything is ok, then click on generate to create the makefiles.
Then build, install, and retest the sample code above.
We succeed to run our application with Opencv 3.3. We work with cross compiler and one of namespaces was incorrect.
Can I expect better performance from opencv3.3 relative to opencv4tegra?