Created
April 5, 2011 02:22
-
-
Save unot/902908 to your computer and use it in GitHub Desktop.
色差計算
This file contains 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
#!/usr/bin/sh | |
# | |
#@(#) deltaE.sh 色差を計算 | |
#@(#) Copyleft 2008, 2009 UNO, Takashi | |
# Usage: deltaE.sh file1 file2 | |
if [ $# -ne 2 ]; then | |
echo "Usage: `basename $0` file1 file2" 2>&1 | |
exit 1 | |
fi | |
#for INFILE in $1 $2; do | |
# tail -n +8 $INFILE | cut -f1-3 >${INFILE}.lab | |
#done | |
paste ${1} ${2} | awk '{ print sqrt(($1 - $4)^2 + ($2 - $5)^2 + ($3 - $6)^2) }' | |
#rm -f ${1}.lab ${2}.lab | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment