This package has been developed for 2D Map Alignment With Region Decomposition.
The following article presents the method:
- Saeed Gholami Shahbandi, Martin Magnusson, 2D Map Alignment With Region Decomposition, CoRR, abs/1709.00309, 2017. URL
And Nonrigid Optimization of Multimodal 2D Map Alignment builds on this work.
Download, installing dependencies, and install package
# Download
git clone https://github.com/saeedghsh/Map-Alignment-2D.git
cd Map-Alignment-2D
# Install dependencies
pip install -r requirements.txt
# Install the package [optional]
python setup.py install
Most dependencies are listed in requirements.txt
.
But there are three more, namely opencv, Polygon and arrangement, which should be installed separately.
For simplicity and convenience, we assume both maps are provided as bitmap (occupancy grid maps). For more examples, see Halmstad Map Collection. Run this:
python demo.py --img_src 'map_sample/map_src.png' --img_dst 'map_sample/map_dst.png' -multiprocessing -visualize
The following psudo-code presents the gist of the alignment algorithm proposed in the paper.
# modeling
1a) perform region segmentation
1b) find the oriented minimum bounding box (OMBB) for each region (e.g. rotating calipers)
# hypotehsis generation
2a) generate hypotheses (affine transformations), by matching every pairs of OMBB from the two maps
2b) reject hypothesis that are non-similarity transformation
# match score and select a winner
3a) for each hypothesis: find the correspondence between all OMBB from one map to another
3b) calculate the match-score for each hypothesis, and select the one with highest value
- dump unused methods from
mapali
andplotting
. - api documentation.
- full test suite.
- profile for speed-up.
- python3 compatible.
Distributed with a GNU GENERAL PUBLIC LICENSE; see LICENSE.
Copyright (C) Saeed Gholami Shahbandi