Eagle Stitch is a dockerized system aims to stitch multiple images
- Python version >=3.6 (related issue)
- Python ASAB Framework as the base code
- Zenoh PubSub
- Mongo Database
- Zenoh API wrapper: Zenoh-as-a-Service
- Rust as the base code of Zenoh
- Fish Shell and Oh-My-Fish (OPTIONAL, but recommended)
- Install Rust toolchain (for Zenoh usage)
- Install rustop:
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Install
Rustup
plugin:$ omf install rustup
- Instal toolchain:
$ rustup toolchain install nightly
- Install rustop:
- Update and install
pip3
$ sudo apt update
$ sudo apt install python3-pip
- Update Host Machine's python3 pip version:
$ pip3 install --upgrade pip
- Install following package in Host Maching:
- Eclipse-Zenoh:
$ pip3 install eclipse-zenoh
- Eclipse-Zenoh:
- Go to main project directory
- Install requirements:
$ pip install -r requirements.txt
- Install openCV:
$ pip install opencv-python
- Install and deploy mongo container:
$ docker run -d --name mongo-service --network host mongo
- Install Rust toolchain (for Zenoh usage)
- Install rustop:
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Load cargo:
$ source $HOME/.cargo/env
- Instal toolchain:
$ rustup toolchain install nightly
- Install rustop:
- Update Host Machine's python3 pip version:
$ pip3 install --upgrade pip
- Install following package in Host Maching:
- Maturin:
$ pip3 install maturin
- Eclipse-Zenoh:
$ pip3 install eclipse-zenoh
- Maturin:
- Go to main project directory
- Install python virtual environment:
$ python3 -m venv venv
- Activate python virtual environment:
$ . venv/bin/activate.fish
- Install requirements:
$ pip install -r requirements.txt
- IMPORTANT NOTE: Package
eclipse-zenoh
is already installed instep-3
- IMPORTANT NOTE: Package
- Install openCV:
$ pip install opencv-python
- Install Zenoh API connector (with Rust-based Zenoh):
- Go to
venv
directory:$ cd venv
- Clone zenoh:
$ git clone https://github.com/eclipse-zenoh/zenoh-python.git
- Go to cloned Zenoh directory:
$ cd zenoh-python
- Build the package:
$ maturin develop —release
- IF ERROR happened, use this command instead:
$ pip install . --use-feature=in-tree-build
- IF ERROR happened, use this command instead:
- Go to
- Go to root project directory:
$ cd /../eaglestitch/
- Activate python virtual environment:
$ . venv/bin/activate.fish
- If you are not using a virtual environment, run following command:
- Format:
$ export PYTHONPATH=:<ROOT_PROJECT>/eaglestitch/pycore/
- Server:
$ export PYTHONPATH=:/home/popeye/devel/eaglestitch/pycore/
- Server:
$ export PYTHONPATH=:/home/eagles/devel/eaglestitch/pycore/
- Format:
- If you are not using a virtual environment, run following command:
- Run the script:
$ python eaglestitch.py -c etc/eaglestitch.conf
- Running Zenoh publisher:
$ python3 tests/net_publisher_img_camera.py -e tcp/localhost:7446 --cvout -v /home/ardi/devel/nctu/IBM-Lab/eaglestitch/data/videos/samer/0312_1_LtoR_1.mp4
- Sample send to EagleStitch Server:
$ python3 tests/net_publisher_img_camera.py -e tcp/192.168.1.11:7446
- You can change
localhost
to a specific IP, and - You can change
/home/ardi/devel/nctu/IBM-Lab/eaglestitch/data/videos/samer/0312_1_LtoR_1.mp4
into:- Another video file (with full path), or
- Change it into
0
to read camera - e.g.:
/home/eagles/devel/eaglestitch/data/videos/0312_1_LtoR_1.mp4
- Sample send to EagleStitch Server:
- RestAPI URL:
$ http://<domain>:8888
- Get all stithing results:
GET /stitching
- Get a specific stithing result:
GET /stitching/{stitching_id}
- Ask system to START the stitching processor:
GET /stitching/trigger/start
- Ask system to STOP the stitching processor:
GET /stitching/trigger/stop
- Homepage:
http://localhost:8888
- Show stitching result:
http://localhost:8888/webview/{stitching_id}
Reference:
- Stitching pipeline: https://github.com/tranleanh/image-panorama-stitching/blob/master/multi_image_pano.py
- Black region cropping for panorama image: https://www.pyimagesearch.com/2018/12/17/image-stitching-with-opencv-and-python/