Created
July 28, 2015 16:12
-
-
Save tatic0/dc52254d6f9a04b556f0 to your computer and use it in GitHub Desktop.
generates false color images from grayscale images from Flir Dev Kit (Lepton) infrared sensor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# put all grayscale images on ~/gs | |
# and create ~/fc for new false color images from this script | |
# needs imagemagick installed | |
function gradientgen { | |
#convert xc:white xc:yellow xc:red xc:green xc:cyan xc:blue xc:violet xc:black +append -filter Cubic -rotate 90 -resize 20x80\! gradient_IR_4-rainbow.jpg | |
convert xc:white xc:yellow xc:orange xc:red xc:brown xc:cyan xc:blue xc:violet xc:black +append -filter Cubic -rotate 90 -resize 20x80\! gradient_IR.jpg | |
} | |
function fcgen () { | |
convert -verbose $1 \( gradient_IR.jpg -flip \) -clut -resize 500% fc_$1 | |
} | |
if [ -a gradient_IR.jpg ] | |
then echo "gradient file exists" | |
else | |
gradientgen | |
fi | |
for i in ../gs/*.png | |
do cp -v "$i" gs_`basename $i` | |
done | |
for i in *.png | |
do fcgen "$i" | |
done | |
rm -vf gs_*.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment