OpenCV4Tegra for L4T has problem

I downloded OpenCV4Tegra for L4T 21.x from
http://developer.download.nvidia.com/embedded/OpenCV/L4T_21.1/libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb
and followed the instruction of “OpenCV4Tegra README”

Although my program was compiled, the program had an error at run time.

Error Message:

HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvShowImage, file /hdd/buildbot/slaves/slave_jetson_tk1/52-O4T-L4T/opencv/modules/highgui/src/window.cpp, line 501

Should I wait for the nvidia fixes?

Getting exactly the same error trying to run some OpenCV sample code.

Looking around on forums, the problem seems to be a lack of GTK support. Installing libgtk2.0-dev as suggested doesn’t help.

Any help from people with more experience in this area would be much appreciated.

Having the same problems with nearly any of the OpenCV Samples.

I’am running L4T21.1 and OCV 2.4.10, exactly like iwaki2009.
Compiling is no problem, but my testet examples (http://elinux.org/Jetson/Installing_OpenCV - Testing OpenCV) give the same Error like above or this one:

HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /hdd/buildbot/slaves/slave_jetson_tk1/52-O4T-L4T/opencv/modules/highgui/src/window.cpp, line 483
terminate called after throwing an instance of ‘cv::Exception’
what(): /hdd/buildbot/slaves/slave_jetson_tk1/52-O4T-L4T/opencv/modules/highgui/src/window.cpp:483: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvNamedWindow

also tried:
sudo apt-get install libgtk2.0-dev
sudo apt-get install pkg-config

got the same problems on 3 different Jetson-Boards!

CAN ANYONE HELP?
Maybe some of the NVIDIA people, seems to be a problem of the package!? But a package for OCV without any working examples?

I’ve been using the old R19.3 OS with CUDA 6.0 to avoid these issues. The new ‘Jetpack’ is out now though. Has anyone tried that?

Hi, i got the same error with oepncv 2.4.10.1 and tried the newest ‘JetPack’. I got the problem that the opencv 2.4.9.1 which comes with the JetPack seems to need CUDA 6.0 but CUDA 6.5 is delivered. Now i will go with the “solution” of bobtheblob.

this was exactly my workflow from start on.

-Installing R21.1 with Jetpack
-integrated OCV 2.4.9.1 seems to need CUDA 6.0 (why is it integrated when it dosent work with their own package??)
-downloaded 2.4.10.1 and followed the instruction of “OpenCV4Tegra README” (just like iwaki)
-also tried: sudo apt-get install libgtk2.0-dev / sudo apt-get install pkg-config
-getting the errors already mentioned :(

does someone tried an older CUDA at R21.1 and something less den OCV 2.4.10.1?

Regarding the JetPack including OpenCV 2.4.9.1 opposed to 2.4.10.1. We are aware of this issue and an updated version of the JetPack installer will be available on the Embedded Computing Zone by the end of the week.

On the OpenCV 2.4.10.1 issues, we are looking into this issue.

Thanks!

Any updates? Exactly the same workflow as melektronik. I downloaded JetPack yesterday and it still included OpenCV 2.4.9.1 (incompatible with CUDA 6.5). I downloaded OpenCV 2.4.10.1 from https://developer.nvidia.com/linux-tegra-rel-21 and am having the same issues as iwaki2009 (not fixed by installing libgtk2.0-dev and pkg-config, then reinstalling OpenCV 2.4.10.1).

Any updates on troubleshooting OpenCV 2.4.10.1? I saw it’s the same version number for the new R21.2 release, so I haven’t bothered reflashing and trying again.

Today I downloded OpenCV4Tegra for L4T 21.x from
http://developer.download.nvidia.com/embedded/OpenCV/L4T_21.2/libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb

Link is same as before, but file size is different.

This time, my program works well and Window is displayed.

thanks

I subsequently (in time relative to iwaki2009 post above) also downloaded from
http://developer.download.nvidia.com/embedded/OpenCV/L4T_21.2/libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb

and did
sudo dpkg -i libopencv4tegra_2.4.10.1_armhf.deb
sudo dpkg -i libopencv4tegra-dev_2.4.10.1_armhf.deb
That went well (whereas the 2.4.9.1 that came in the jetpack did not).

Then compile the sample edge.cpp
g++ edge.cpp -lopencv_core -lopencv_imgproc -lopencv_highgui -o edge
which also seemed to go fine.

However, when I run
./edge
I still get the same error:
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /hdd/buildbot/slaves/slave_jetson_tk1/52-O4T-L4T/opencv/modules/highgui/src/window.cpp, line 483

I’m wondering if iwaki2009 might have done something in addition since it works for him.

sorry

Link is same as before -> Lisk is diffrent

I got opencv4tegra with this command
wget http://developer.download.nvidia.com/embedded/OpenCV/L4T_21.2/libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb

file info
-rw-rw-r-- 1 ubuntu ubuntu 20589684 Dec 9 10:42 libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb

install command
sudo dpkg -i libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb
sudo apt-get update
sudo apt-get install libopencv4tegra libopencv4tegra-dev

opencv configration info with cv::getBuildInformation() API

GUI:
QT: NO
GTK+ 2.x: YES (ver 2.24.23)
GThread : YES (ver 2.40.2)
GtkGlExt: NO
OpenGL support: NO
VTK support: NO

this version GTK+2.x is enable

Hi all, Edge example compiled and ran okay. However, I get the following error when compiling either the Laplace and Houghlines examples…

/usr/bin/ld: cannot find -lopencv_nonfree
collect2: error: ld returned 1 exit status

Anyone know why lopencv_nonfree is missing from the libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb install file and how can I obtain it if I needed it?

Same problem here. I’m trying to compile a program that I just did using OpenCV.

/usr/bin/ld: cannot find -lopencv_nonfree
collect2: error: ld returned 1 exit status
ubuntu@tegra-ubuntu:~/Downloads$

nVidia does not intentionally suport nonfree module.

Here is General configuration for libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf

OpenCV modules:
To be built: core flann imgproc highgui features2d calib3d ml objdetect video contrib legacy photo gpu stitching tegra videostab esm_panorama facedetect imuvstab python superres ts vstab
Disabled: nonfree world

And, also TBB is not suported.

If I build OpenCV by my self, I enable nonfree module and TBB function, however, optimaization for tegra is disabled.

I hope nvidia engineer will release new version with non free module and TBB.

yup seems I have similar problem did anyone file a bug?

https://devtalk.nvidia.com/default/topic/802681/

I posted the 2 options for nonfree module onto the Wiki: http://elinux.org/Jetson/Installing_OpenCV#Prebuilt_OpenCV_library_versus_Building_the_OpenCV_library_from_source

Is there no way to enable opengl (which speeds up the frame rate of imshow on a window) without native compiling?

So, I had several issues - the first of which, I could not compile an opencv sample… not the ones on the wiki - those compiled just fine… and still cannot compile gpu/stereo_match.cpp against opencv4tegra?? BUT, I can run my compiled sample against an installation of opencv4tegra… very strange.

However, I got around this ‘originally stated issue’:

OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. 
If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) 
in cvShowImage, file $/modules/highgui/src/window.cpp, line 501

…as was stated above, by the following:

First, you have to check out opencv and build it on your machine. This is because, if you read the opencv documentation, you need to first install several dev packages on your machine.
see: http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html

sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

Also, if you install any of these after you’ve already started an opencv build… you need to first delete your build directory (as ‘make clean’ will not reconfigure your build). And then rerun ‘cmake’ inside your directory again to get the CMakeCache.txt properly linked to the dev packages, in particular libgtk2.0-dev headers used by highgui.so

You have to do this:

git clone https://github.com/Itseez/opencv.git <opencv-checkout-dir>
mkdir <opencv-checkout-dir>/build
cd <opencv-checkout-dir>/build
cmake ..

Then you will need to modify a few things in the build/CMakeCache.txt file:

BUILD_EXAMPLES:BOOL=ON
CMAKE_BUILD_TYPE:STRING=RELEASE
CMAKE_INSTALL_PREFIX:PATH=/usr/local
ENABLE_NEON:BOOL=ON
WITH_CUDA:BOOL=ON
CUDA_ARCH_BIN:STRING="3.2"
CUDA_ARCH_PTX:STRING="3.2"

I’m still not sure about the ARCH_BIN and ARCH_PTX numbers… the wiki for the nvidia says that 3.0 to 3.5 are acceptable. But, you know… I don’t know, it works… so, if it isn’t broke, as they say… http://en.wikipedia.org/wiki/Kepler_(microarchitecture)

After you do that, you have to build the whole thing, which could take about 1-2hrs.

make all
(optional) sudo make install

Note that if you perform ‘sudo make uninstall’… the guys at willow garage were nice enough to also output the file: build/install_manifest.txt which will give a list of all the files to uninstall after testing… if so curious, read the cmake.

That will fix you highgui.so issue to run your compiled sample against it. MY original issue was, how the heck do I compile an opencv sample with g++ and not get linker errors??? …and it turns out the answer was in the cmake also. Since, the gpu module is included there you can’t just run a command line compile on the samples unless you include the nvidia directory (and possibly the non-free stuff).

I think I’ve decided to just stick with make from here on out…