install opencv on Nvidia TX1

Sorry for not installing Sogou Pinyin on TX1.

Firstly, after I have flashed the Ubuntu16.04 system and some other software(etc. cuda) into TX1, the rest space of the TX1

is only about 2GB. When I try to install opencv like the website:

http://blog.csdn.net/pjq_pjq/article/details/78345421

I got an error like this "no enough space".

So I bought a SD card from JD.com, it spent me 79 RMB.

(1)After I got the SD card. I did some things like the following commands:

sudo fdisk -l
The command is to ensure the SD card is actually recognized by your TX1. If you see like this info, congratulations, your SD card have been recognized by your TX1:

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk1p1       8192 62521343 62513152 29.8G  c W95 FAT32 (LBA)
(2) Then you should unmount the SD card because the SD card have been mount by the Ubuntu system.

umount /dev/mmcblk1p1
(3) Then format the SD card to ext4

sudo mkfs.ext4 /dev/mmcblk1p1
(4) make a new dir to mount the SD card

mkdir /media/nvidia/SD
(5) mount the SD card
sudo mount /dev/mmcblk1p1 /media/nvidia/SD
OK, the SD card is mounted successfully.

(6) Then I will install opencv with the SD card. Firstly, we should install the dependencies.

sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev 
sudo apt-get install python2.7-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
sudo apt-get install libgtkglext1 libgtkglext1-dev
sudo apt-get install qtbase5-dev
sudo apt-get install libv4l-dev v4l-utils qv4l2 v4l2ucp
(7) Then I will git the opencv code from the github website

git clonehttps://github.com/opencv/opencv.git
(8) then I will cmake the opencv. Be careful! the last parameter is the location of the opencv source code which is git by you in the previous step. My opencv source code is located in ~/Experiments/opencv-3.2.0, you can adjust the dir according to your situation.

cd /media/nvidia/SD
cmake -D WITH_CUDA=ON -D CUDA_ARCH_BIN=”5.3” -D CUDA_ARCH_PTX=”” -D WITH_OPENGL=ON -DWITH_LIBV4L=ON -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF -D CMAKE_INSTALL_PREFIX=/usr/local ~/Experiments/opencv-3.2.0/

In this step, because I enter into the SD card and install the opencv. So the intermediate files will be located in the SD card. After you finished the installing, you can delete all the intermediate files in the SD card.

(9) make and make install the opencv

sudo make -j4
sudo make install


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值