some small fixes

This commit is contained in:
Mari Wahl 2014-09-30 23:29:07 -04:00
parent 4f8d5148af
commit 16757b10ac
412 changed files with 139509 additions and 0 deletions

View file

@ -0,0 +1,30 @@
#!/usr/bin/env python
__author__='bt3gl'
'''
Compare two aligned images of the same size.
Usage: python compare.py first-image second-image
'''
import sys
from scipy.misc import imread, imsave
def compare_images(img1, img2):
diff = img1 + img2
imsave('sum.png', diff)
diff = img1 - img2
imsave('diff.png', diff)
def main():
file1, file2 = sys.argv[1:1+2]
img1 = imread(file1).astype(float)
img2 = imread(file2).astype(float)
compare_images(img1, img2)
if __name__ == "__main__":
main()