Skip to content

Instantly share code, notes, and snippets.

@jetsonhacks
Last active June 21, 2023 23:02
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jetsonhacks/7a84e3c4b7c3b7fc25d8 to your computer and use it in GitHub Desktop.
Save jetsonhacks/7a84e3c4b7c3b7fc25d8 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Get and install OpenCV for Tegra
# Linux for Tegra (LT4) 21.1 and CUDA 6.5 *must* be installed on the Jetson before installation!
wget http://developer.download.nvidia.com/embedded/OpenCV/L4T_21.1/libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb
sudo dpkg -i libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb
sudo apt-get update
sudo apt-get install libopencv4tegra libopencv4tegra-dev
@namp
Copy link

namp commented Nov 27, 2014

I followed the instructions and even though I compiled successfully two examples from the CPP examples folder of OpenCV (https://github.com/Itseez/opencv/tree/2.4.9.1/samples/cpp), I had the following problems when running them:

Example 1: Image Processing:

$g++ edge.cpp -lopencv_core -lopencv_imgproc -lopencv_highgui -o edge
$./edge

This sample demonstrates Canny edge detection
Call:
/.edge [image_name -- Default is fruits.jpg]

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

Example 2: Video processing

$g++ bgfg_segm.cpp -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_video -o bgfg
$./bgfg -f 768x576.avi

Do background segmentation, especially demonstrating the use of cvUpdateBGStatModel().
Learns the background at the start and then segments.
Learning is togged by the space key. Will read from file or camera
Usage:
./bgfg_segm [--camera]=<use camera, if this key is present>, [--file_name]=

-c, --camera=[true] use camera or not
-fn, --file_name=[tree.avi] movie file
can not open camera or video file

Any ideas?

Thanks

@Wesley-Lin
Copy link

Hi Jetsonhacks,

I also have the issue, can you get me some advises ?
My release is R21.3.

Thanks
Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment