This program currently only works with ethernet cameras
This repository hold an example program to interface with the SwissRanger ToF Camera. I also added the drivers needed to connect to the camera since they are hard to get because Mesa Imaging no longer exists. This code is based on austinoboyle/swissranger-driver and gurbain/ORF_standalone.
This program has 2 modes of operation:
- pcl
- gui
pcl mode will open a connection to the camera and save a text tile with points to a specified location. This points file can be opened in MeshLab
gui mode will open a connection to the camera and show you the following video streams:
- Amplitude image (greyscale)
- Depth image
- Confidence image
The amplitude image is just a greyscale image of what the camera sees.
The Depth image shows you the depth that the camera sees. White means far away. Black is close to the camera.
The confidence map shows how confident the camera is about its measurement at every pixel. White means very confident, black means not.
This program only runs on linux. I tested it on Ubuntu 18.04 in WSL2.
First clone the repository and cd into it:
git clone https://github.com/egidiusmengelberg/mesa4k.git
cd mesa4k
Install the required tools and libraries:
- g++
- cmake
- OpenCV
- LibMesaSr
To install these run the following commands
# install g++
sudo apt-get install build-essential gdb
# install cmake
sudo apt-get install cmake
# install OpenCV
sudo apt-get install libopencv-dev
# install LibMesaSr
sudo install_driver.sh
Build the code
# create build directory
mkdir build
# cd into build directory
cd build
# run cmake
cmake ..
# run make and build the code
make
Run the program
please specify the mode, ip address of the camera and if you chose pcl the filename as an argument
./Mesa4K pcl 192.168.1.2 ../../points.txt
./Mesa4K gui 192.168.1.2
press ctrl-c in the terminal to exit the program
Please create an issue if something does not work or you need help.