The mapflow models require 8-bit RBG images. The preprocessing of the 16-bit and\or multispectal data can be carried out with your own tools, but we recommend to use our script for better results.
Python 3.4
- Clone or download this repository
- Open terminal in its folder and run
pip install -r requirements.txt
python to8bit.py {{input}} {{output}} [--channels {R G B}]
input
, output
- absolute or relative paths to input and output tif files
--channels
- optional argument to specify the R,G,B
channel positions in the file. Defaults to 1 2 3
Example, running the data preprocessing for multispectral image where red is channel 4, green - channel 3, blue - channel 2:
python to8bit.py ./input.tif ./output.tif --channels 4 3 2