Building Sample Code for VizionSDK on Linux
  • 27 Oct 2023
  • 1 Minute to read
  • Dark
    Light
  • PDF

Building Sample Code for VizionSDK on Linux

  • Dark
    Light
  • PDF

Article Summary

Introduction

This article will explain how to build sample code for VizionSDK on Linux.

You can download the Sample code on Linux from here.

[step1]:Open a terminal.

[step2]: Run the following commands to install the necessary libraries

sudo apt update
sudo apt install build-essential cmake libv4l-dev

If you are on an embedded system,please install below libraries

sudo apt install g++-aarch64-linux-gnu 

To build the Sample code, please follow the steps below

[step3]:Create a new directory for the 'build'(or named by yourself)

mkdir build
cd build

[step4]:Create a new directory for the buildCkeck your directory in 'build' and run the following commands to build the sample code.

cmake ..

[step5]:Ckeck your directory 'build' whether the 'makefile' is generated.

make 

image.png

[step6]:Execute the 'Sample' bin file in the 'build' directory.

./Sample 

image.png

1.If you are on an embedded system,please remember to copy the built executable file and library to the device.
2.The path of the library of VizionViewerâ„¢ SDK, which the Sample executable file depends on, can be placed in "${CMAKE_SOURCE_DIR}/lib/" or "/usr/lib/" on the device.

[step7]:If the execution is completed, you will see:"++++Sample code test finish++++". And you will find the photo taken by the camera "image.raw" in the 'build' directory.

image.png


Was this article helpful?