https://github.com/lagadic/visp_sample
ViSP sample code used as code snippet in ViSP doxygen documentation
https://github.com/lagadic/visp_sample
Last synced: over 1 year ago
JSON representation
ViSP sample code used as code snippet in ViSP doxygen documentation
- Host: GitHub
- URL: https://github.com/lagadic/visp_sample
- Owner: lagadic
- Created: 2020-02-05T11:28:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-01-03T11:18:03.000Z (over 1 year ago)
- Last Synced: 2025-01-03T12:26:33.205Z (over 1 year ago)
- Language: C++
- Size: 1.83 MB
- Stars: 2
- Watchers: 6
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# visp_sample
ViSP sample code used as code snippet in ViSP doxygen [documentation](https://visp-doc.inria.fr/doxygen/visp-daily/index.html).
This project uses [ViSP](https://github.com/lagadic/visp) that needs to be build with the following as 3rd-parties:
- OpenCV
- librealsense
- libxml2
- PCL
## 1. Prerequisities
### 1.1. Install required 3rd parties
- On ubuntu
- Install required packages:
```
$ sudo apt-get update
$ sudo apt-get install pkg-config libopencv-dev libxml2-dev libpcl-dev
```
- Install librealsense from source following these [instructions](https://visp-doc.inria.fr/doxygen/visp-daily/tutorial-install-ubuntu.html#install_ubuntu_3rdparty_realsense)
- On OSX
```
$ brew update; brew upgrade
$ brew install opencv librealsense libxml2 pcl
```
### 1.2. Build and install ViSP from source
See ViSP installation from source [tutorials](https://visp-doc.inria.fr/doxygen/visp-daily/tutorial_install_src.html).
```
$ cd $VISP_WS
$ git clone https://github.com/lagadic/visp.git
$ mkdir $VISP_WS/visp-build
$ cd $VISP_WS/visp-build
$ cmake ../visp -DCMAKE_INSTALL_PREFIX=/tmp/usr/local
$ make -j4 install
```
Once ViSP is build, you can build `visp_sample` project using one of the 5 different ways that are given in the next sections.
## 2. Build visp_sample project
### 2.1. Build visp_sample with ViSP from build tree
```
$ cd $ViSP_WS
$ git clone https://github.com/lagadic/visp_sample
$ mkdir visp_sample-build
$ cd visp_sample-build
$ cmake ../visp_sample -DVISP_DIR=$ViSP_WS/visp-build
$ make -j4
```
### 2.2. Build visp_sample using `visp-config` from build tree
```
$ cd $ViSP_WS/visp_sample
$ make -j4 -f Makefile.visp-config VISP_INSTALL_PREFIX=$ViSP_WS/visp-build
$ make -j4 -f Makefile.visp-config clean
```
### 2.3. Build visp_sample with ViSP from install tree
```
$ cd $ViSP_WS
$ git clone https://github.com/lagadic/visp_sample
$ mkdir visp_sample-build
$ cd visp_sample-build
$ cmake ../visp_sample -DVISP_DIR=/tmp/usr/local/lib/cmake/visp
$ make -j4
```
### 2.4. Build visp_sample using `visp.pc` from install tree
```
$ cd $ViSP_WS/visp_sample
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/tmp/usr/local/lib/pkgconfig
$ make -j4 -f Makefile.visp.pc
$ make -j4 -f Makefile.visp.pc clean
```
### 2.5. Build visp_sample using `visp-config` from install tree
```
$ cd $ViSP_WS/visp_sample
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/tmp/usr/local/lib/pkgconfig
$ make -j4 -f Makefile.visp-config VISP_INSTALL_PREFIX=/tmp/usr/local
$ make -j4 -f Makefile.visp-config clean
```