Skip to content

mergetiles.py

Chris Churas edited this page Jun 6, 2017 · 10 revisions

mergetiles.py merges all images in a directory of into single image by taking maximum intensity found for each pixel. This tool is more built as an internal tool that is part of the pipeline to run CHM.

NOTE: mergetiles.py assumes all images in the directory are the same size.

merge tiles graphic

Basic command:

mergetiles.py <directory containing images> <output image file>

Example usage:

mergetiles.py ./imagedir mergedimage.png

For help run:

mergetiles.py --help

Example below uses the following two images:

example probability image with data on left side

example probability image with data on right side

Example usage with no extra options

The following command will merge the two images under images directory.

Note: If wget is not available, mergetiles1d4.png and mergetiles2d4.png can be manually downloaded and put in images/ subdirectory before invoking mergetiles.py line below.

mkdir images
cd images
wget https://github.com/wiki/CRBS/chmutil/images/mergetiles1d4.png
wget https://github.com/wiki/CRBS/chmutil/images/mergetiles2d4.png
cd ..
mergetiles.py ./images mergetilesd4.png

The above command should generate mergetilesd4.png which should look like the following image:

merged probability image

Clone this wiki locally