How to install OpenCV 3.2.0 on TK1?

Hi,

I have a Jetson TK1 board where I have installed JetPack, which contains OpenCV 2.4 . However, my application will need OpenCV 3.2.0. So how can I install it on the board?

TIA

You have to get opencv-3.2.0 sources, build opencv and then install on TK1.
You can follow this: http://dev.t7.ai/jetson/opencv/.
[EDIT: The link was for TX1. For TK1, you may also read this: https://devtalk.nvidia.com/default/topic/998885/jetson-tk1/jetson-tk1-and-opencv-3-2-0/post/5106075/#5106075]

Be aware that sources and build require a lot of disk space, so I strongly advice to use a USB disk with at least 4GB free on a Linux partition for that.

Once opencv-3.2.0 will be installed on your TK1 with:

sudo make install

be also sure to pass opencv-3.2.0 include path (with -I) and libraries path (with -L) to gcc for building your application, otherwise (if not removed) the opencv4tegra-2.4 version installed in standard path /usr would be used instead.

Note that you may also have to add path to opencv-3.2.0 libs to your shell environment variable LD_LIBRARY_PATH for execution of your application.

Thanks for the reply. I followed the above mentioned link and tried installing Opencv. I am using an internal drive for handling memory problem. However, I got the following error:

cc1plus: error: /media/ubuntu/F85C90D55C908FCC/opencv/modules/calib3d/test/test_modelest.cpp: Input/output error
make[2]: *** [modules/calib3d/CMakeFiles/opencv_test_calib3d.dir/test/test_modelest.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [modules/calib3d/CMakeFiles/opencv_test_calib3d.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Maybe your disk is full. Had it 4GB free before ?

df -H

should display stats about your disks.

The output of df -H is as follows:

ubuntu@tegra-ubuntu:/media/ubuntu/F85C90D55C908FCC$ df -H
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  8.6G  5.4G  62% /
devtmpfs        984M  4.1k  984M   1% /dev
none            4.1k     0  4.1k   0% /sys/fs/cgroup
none            199M  787k  198M   1% /run
none            5.3M     0  5.3M   0% /run/lock
none            993M   78k  993M   1% /run/shm
none            105M   46k  105M   1% /run/user
/dev/sda9        79G   70M   79G   1% /media/ubuntu/cinemas
/dev/sda8        54G   70M   54G   1% /media/ubuntu/videos
/dev/sda7        54G  4.1G   50G   8% /media/ubuntu/F85C90D55C908FCC

The build directory for opencv is in /media/ubuntu/F85C90D55C908FCC.

If you retry make (without -j3), does it get further ?

I tried without -j3. But still getting the same error

Is /dev/sda7 a linux partition (such as ext4) ?

Otherwise, the Input/output error could be related to communication errors with this disk (or hw failure). In such case you should see errors in dmesg.

If sda7 is mounted then use “df -H -T” to see the file system type.

Partition types are actually a separate topic from file system type, e.g., run “fdisk -l /dev/sda” and you’ll see an “Id” or “Code” (Id is listed under fdisk, Code is listed under gdisk…use fdisk unless the partition has GPT labels…it doesn’t hurt to try both, but try “fdisk -l” first). Each Id or Code also has a “Name” or “Type” (depending on whether you used fdisk or gdisk to list…either way it is just a human-readable description of the Id or Code).

NOTE: I don’t know what the result would be if a non-Linux partition had a Linux file system, or vice-versa.