-
Notifications
You must be signed in to change notification settings - Fork 1
createprobmapoverlay.py
Creates new image by overlaying a probability map, set to a user specified color, semi-transparently on top of a base image.
Example usage:
createprobmapoverlay.py baseimage.png probmap.png overlay.png
For help run:
createprobmapoverlay.py --help
Examples below use the following image from Pixabay as input converted to grayscale with createchmimage.py:
and some of the examples use this probability map image:
How to download the above two images using wget:
wget https://raw.githubusercontent.com/wiki/CRBS/chmutil/images/corgi_small_grayonly.png
wget https://raw.githubusercontent.com/wiki/CRBS/chmutil/images/corgi_small_probmap.png
The command below takes the images above and overlays them with default parameters. createprobmapoverlay.py by default uses blue for the overlay color and a threshold of 30% and a default opacity of 70.
createprobmapoverlay.py corgi_small_grayonly.png corgi_small_probmap.png \
corgi_small_overlay.png
The command below takes the images above and overlays them with added --opacity option set to 250. --opacity values can range between 0 and 255, where 0 means completely transparent and 255 is opaque.
createprobmapoverlay.py corgi_small_grayonly.png corgi_small_probmap.png \
corgi_small_overlay250.png --opacity 250