在章节:jeston TX1&TX2使用sdkmanager 安装cuda等环境_机器人虎哥的博客-CSDN博客 jeston TX1&TX2使用sdkmanager 安装cuda等环境我们安装了官方配置好的环境,这一部分我们分享一下安装完毕后,如何实验VisionWorks跑自带的demo。
我们的EdgeBox_EHub_tx1_tx2_E100是使用TX1核心模块,系统迁移到了64G的SD卡,使用jetpack4.6刷的,看网上很多之前的人都说Jetson 上的demo在什么什么下面有快速傅里叶-海动图,车辆识别加框sample什么的,然而我的家目录下面并没有这些玩意儿,只有个VisionWorks-SFM-0.90-Samples的文件夹,有这个文件夹我们的VisionWorks理论上就刷上去了。
官网上是这样评价VisionWorks的 VisionWorks 1.5.3 | NVIDIA Developer VisionWorks的核心功能专为以下解决方案而设计:
机器人与无人机
自动驾驶
智能视频分析
增强现实
sudo lsb_release -a
head -n 1 /etc/nv_tegra_release
说明使用的是jetpack4.6。
jetson_release -v
上面已经交代了需要的环境支持和,使用官方组件安装后,就自带了这些demo。
#进入目录
cd /usr/share/visionworks
#有的话要把这个地方的文件复制一份到其他目录,这里的文件是只读的
#为了不搞坏就勉强复制一次吧,别给它权限直接搞了
#把visionworks复制到家目录下
cp -r /usr/share/visionworks ~
cd ~
进入后看到一个user_guide_linux.md的文件,这里面把demo操作写的很清楚
cd /home/nvidia/visionworks/sources
打开文件,得到内容如下:
vim user_guide_linux.md
Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
@cond !NVX_DOCS_EXPERIMENTAL
Linux: Building and Running Samples and Demos
@brief Shows how to build samples and demos using native or cross compilation on Linux.
## Native Compilation of Sample Applications and Demos ##
The only method you can use to build the sample applications and demos is a
native build on the target system.
Sources for all samples and demos are provided in the `libvisionworks-samples` package.
After the package installation, source code and make files are located in the
`/usr/share/visionworks/sources` directory. The directory is protected from changes,
so you need to copy its content to any directory with write access.
Here we use your home folder as an example.
All samples use `make` as a build tool.
$ /usr/share/visionworks/sources/install-samples.sh ~/
$ cd ~/VisionWorks--Samples/
$ make -j4 # add dbg=1 to make debug build
You can build an individual sample from its directory but the executable will
not be created there nor in a sub-directory. The executable is created in the same directory
as when all samples are built from the top-level directory.
## Running Samples and Demos ##
**Applies to:** ARM devices only. Start the X window manager:
$ export DISPLAY=:0
$ X -ac &
$ blackbox $
Go to the samples directory:
$ cd ~/VisionWorks--Samples/sources/bin/[arch]/linux/release
Run each sample of interest by using the name of the sample. For example, to run `nvx_demo_feature_tracker`, execute:
$ ./nvx_demo_feature_tracker
@endcond
#安装,这个官方库安装的时候就已经安装过了
/usr/share/visionworks/sources/install-samples.sh ~/
#根目录下这个文件夹也是存在的
cd ~/VisionWorks--Samples/
#只需要执行这步编辑即可
make -j4 # add dbg=1 to make debug build
执行编译后就开始等待吧......
编译成功,没有报错。
cd ~/visionworks/sources/bin/aarch64/linux/release
编译成功后的输出文件。
还是接好显示器,或者使用nomachine这样的桌面工具登录执行测试,需要桌面显示支持。
我这里使用nomachine登录后执行
cd ~/visionworks/sources/bin/aarch64/linux/release
./nvx_demo_feature_tracker
./nvx_demo_feature_tracker_nvxcu
./nvx_demo_hough_transform
./nvx_demo_video_stabilizer
./nvx_sample_object_tracker_nvxcu