# Map-Alignment-2D **Repository Path**: mirrors_lepy/Map-Alignment-2D ## Basic Information - **Project Name**: Map-Alignment-2D - **Description**: No description available - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-12-08 - **Last Updated**: 2023-08-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Map-Alignment-2D ================ This package has been developed for 2D Map Alignment With Region Decomposition. ![animate](https://github.com/saeedghsh/Map-Alignment-2D/blob/master/docs/mapali_hyp_gen.gif) The following article presents the method: - Saeed Gholami Shahbandi, Martin Magnusson, *2D Map Alignment With Region Decomposition*, CoRR, abs/1709.00309, 2017. [URL](https://arxiv.org/abs/1709.00309) And [*Nonrigid Optimization of Multimodal 2D Map Alignment*](https://github.com/saeedghsh/Map-Alignment-Nonrigid-Optimization-2D) builds on this work. Dependencies and Download ------------------------- Download, installing dependencies, and install package ```shell # 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](http://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html), [Polygon](https://www.j-raedler.de/projects/polygon/) and [arrangement](https://github.com/saeedghsh/arrangement/), which should be installed separately. Usage Example ------------- For simplicity and convenience, we assume both maps are provided as bitmap (occupancy grid maps). For more examples, see [Halmstad Map Collection](https://github.com/saeedghsh/Halmstad-Robot-Maps). Run this: ```shell python demo.py --img_src 'map_sample/map_src.png' --img_dst 'map_sample/map_dst.png' -multiprocessing -visualize ``` And you should see this: ![example](https://github.com/saeedghsh/Map-Alignment-2D/blob/master/docs/maps_map_src__maps_map_dst.png) Simplified Algorithm (without decomposition and arrangement) ------------------------------------------------------------ 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 ``` Laundry List ------------ - [ ] dump unused methods from ```mapali``` and ```plotting```. - [ ] api documentation. - [ ] full test suite. - [ ] profile for speed-up. - [ ] python3 compatible. License ------- Distributed with a GNU GENERAL PUBLIC LICENSE; see [LICENSE](https://github.com/saeedghsh/Map-Alignment-2D/blob/master/LICENSE). ``` Copyright (C) Saeed Gholami Shahbandi ```