Apalis TK1 OpenCV / CUDA Image

Hi All

I have build a Linux image 2.8b1 for the TK1 (based on angstrom-lxde-image) and now I need support for OpenCV and CUDA.

There are different information available, but some are outdated and so I’m not really sure what’s the correct way to integrate OpenCV and CUDA.

For OpenCV, am I correct to just add “opencv4tegra” into my recipe? The angstrom-lxde-image has L4T support, so I should have all the benefits from the Tegra.

For CUDA support it seems I can add “cudatoolkit6.5”? I have seen that cudatoolkit6.5 is a dependency for opencv4tegra, but I just want to be sure cudatoolkit6.5 gives me the needed support for my own CUDA development.

Thanks Roland

I have build a Linux image 2.8b1 for the TK1 (based on angstrom-lxde-image) and now I need support for OpenCV and CUDA.

There are different information available, but some are outdated and so I’m not really sure what’s the correct way to integrate OpenCV and CUDA.

For OpenCV, am I correct to just add “opencv4tegra” into my recipe? The angstrom-lxde-image has L4T support,

Depending on what exactly you mean by L4T support. We usually refer to it as being based on L4T.

so I should have all the benefits from the Tegra.

Yes, however there are a few drawbacks. For one OpenCV4Tegra is based on OpenCV 2.4 and may not easily be mixed with later OpenCV versions. Another one is that the opencv4tegra recipe conflicts with the regular opencv recipe which may be required to get the header aka include files for compilation/development of applications making use of OpenCV.

For CUDA support it seems I can add “cudatoolkit6.5”? I have seen that cudatoolkit6.5 is a dependency for opencv4tegra, but I just want to be sure cudatoolkit6.5 gives me the needed support for my own CUDA development.

Yes, for CUDA. However for development purpose it is usually much easier to rely on NVIDIA’s own tooling called JetPack which may be run on Apalis TK1 as well. Please refer to the following article on our developer website about how to set that up.

Depending on what exactly you mean by L4T support. We usually refer to it as being based on L4T.
I mean instead having an image with the mainline kernel.

For development (cross-compile) with opencv4tegra it should be possible to use the headers from v2.4 without installing it in the sdk with yocto, just using the "tarball from their website?
Or would it make more sense to use the regular opencv recipes and add the cudatools as a dependency and cuda to the cmake configuration? But on your website you stated that opencv4tegra has more benefits.

I mean instead having an image with the mainline kernel.

Yes, correct.

For development (cross-compile) with opencv4tegra it should be possible to use the headers from v2.4 without installing it in the sdk with yocto, just using the "tarball from their website?

Yes, that should work as the opencv4tegra recipe is missing such integration.

Or would it make more sense to use the regular opencv recipes and add the cudatools as a dependency and cuda to the cmake configuration?

Yes, one should even be able to use later OpenCV versions with regular CUDA acceleration. However whether or not and what version would be compatible with the older CUDA version 6.5 running on TK1 I do not know.

But on your website you stated that opencv4tegra has more benefits.

At the end that will depend on your exact use case. However in most cases NVIDIA’s proprietary opencv4tegra is still superior in performance.