Example #1
0
##############################################
data0 = loadtxt(file0)
data1 = loadtxt(file1)
data0 = data0 - data0.min()
data1 = data1 - data1.min()

print data0.shape
print data1.shape

#data0 = data0[:,100:320];
data0 = data0[:, 200:400]

#############################################
## process of the images
#############################################
img0 = ImgArray()
img0.set('img_array', data0)
img1 = ImgArray()
img1.set('img_array', data1)

nslope = 2
img0.remove_spikes(nslope=nslope)
img1.remove_spikes(nslope=nslope)

new_mimg, paras = img0.find_match(img1, paras0=None)

#############################################
## plot the images
#######################################
data0 = img0.get('img_array')
data1 = img1.get('img_array')
Example #2
0
from pylab import *;
from pydao.io import Lox_Stack,ImgArray;
from pydao.ohdf import OGroup;
import os;

dirname = r"D:\2014_12_CLSPEEM\141212";

files = os.listdir(dirname);

for file in files:
	if file.endswith('.tif'):
		tif_filename = os.path.join(dirname,file);
		img = ImgArray(tif_filename);
		img.read(dtype=0);
		img.savebmp(renormalize='minmax');