opencv4tegra sourcecode. anyone?

Hi,

Is it possible to obtain the source code for the opencv4tegra_2.4.8.2 library? Is it a modified version of opencv-2.4.8 or just pre-built with specific build flags? If it is a modified version, are all the API’s in opencv 2.4.8 implemented in this version?

There is some info about OpenCV4Tegra at [url]http://elinux.org/Jetson/Computer_Vision_Performance[/url]. It has a few hundred NEON (ARM SIMD) optimizations, many multi-core optimizations, plus some GLSL optimizations, and is free cost but is closed-source.

Thank you for the info shervin. I checked the link you posted. It was quite informative. I have successfully installed the libraries on my Jetson TK1 board using this guide [url]http://elinux.org/Tegra/Installing_OpenCV[/url]. But i’m facing some issues when I build the sample program for stitching (stitching_detailed.cpp). But I can successfully build and run it against opencv-2.4.9. This is the result that I get when building stitching_detailed.cpp against libopencv4tegra.

stitching_detailed.cpp:(.text+0x188c): undefined reference to `cv::detail::SurfFeaturesFinderGpu::SurfFeaturesFinderGpu(double, int, int, int, int)’

I tried linking against all the opencv4tegra libraries. Has SurfFeaturesFinderGpu been removed in opencv4tegra? Is there any other GPU accelerated API available for finding features in opencv4tegra?

I know when I use surf, it is in the nonfree module and with using the opencv4tegra debian files, it does not have the nonfree module.

Yes that is correct, opencv4tegra does not include the nonfree module, due to items like SURF being patented, sorry.

Does this version of opencv support multicore execution using TBB or openMP? because when I run any sample program compiled against the opencv4tegra libraries, I dont see more than two cores getting activated. And what does libopencv_tegra.so contain or do? Is there any documentation available for opencv4tegra? Like what has been implemented and which feateures will be absent?

Have anybody tried installing both

  1. opencv4tegra libraries supplied by Nvidia

and

2)custom building the latest opencv 2.4.9

-thanks
-koshy

Yes I have. What information do u need about it?

I was able to compile opencv-2.4.9 with cuda enabled and TBB (for multicore support). I also compiled the sample codes stitching.cpp and stitching_detailed.cpp against my custom built opencv libraries.

The performance difference is highly noticeable. opencv4tegra is much faster compared to a custom build of opencv

I recommend you to follow this link. I found it to be useful.
[url]http://elinux.org/Tegra/Installing_OpenCV[/url]

Does opencv4tegra work with python-opencv?

How can I ensure that this will run with ROS? Or any other package (for that matter) that uses opencv as a base install? Is there a wiki page on that?

I can also use:

sudo dpkg -i --force-conflicts libopencv4tegra-repo_l4t-r21*_armhf.deb

so that when I use:

sudo apt-get install libopencv4tegra libopencv4tegra-dev libopencv4tegra-python

It will ‘Replace’ the libraries for ROS… as I’ve already extracted the deb file and read the control files that were put into the package. But I have an uneasy feeling about the above… even though their libraries are at 2.4.8 - I would still be linking against a different library - nothing bad could ever go wrong there… ;)

Do you have a better answer?
UPDATE: yes, I found there is a better answer:
http://elinux.org/Jetson/Installing_OpenCV#Prebuilt_OpenCV_library_versus_Building_the_OpenCV_library_from_source

In the page Jetson/Computer Vision Performance - eLinux.org, it is mentioned as follows

The list of exact functions that are optimized by OpenCV4Tegra is mentioned in the documentation of it.

now where could I possibly get this documentation? It is not present in the website for linux4tegra version 21.2 https://developer.nvidia.com/linux-tegra-rel-21

Could somebody point me to it. It will be very helpful. Thank you.

Hi Dilipkumar,

Sorry that many of the website locations have moved. The current official OpenCV4Tegra documentation can be found at [url]http://docs.nvidia.com/gameworks/index.html#technologies/mobile/opencv_main.htm[/url]

The direct pointer to the “Functions Optimized for Tegra” is:
[url]http://docs.nvidia.com/gameworks/index.html#technologies/mobile/opencv_known_issues.htm%3FTocPath%3DTechnologies[/url]

Thank you for the info shervin. Found the link to be useful.

Please help me to understand how to do this:

  1. Analyze the public OpenCV source code then copy/paste the parts of the nonfree module that you want (eg: SURF feature detector) from OpenCV into your own project. You will have the CPU optimizations of OpenCV4Tegra for most of your code and will have the GPU module and will have the non-optimized patented code that you need from the nonfree package such as SURF. So this option gives full performance (for everything except the nonfree code) but is tedious.

So far I have tried copy parts of the features2d.hpp into my code, but that is not working for me. I would like to use CPU optimization/non-optimized gpu SURF.