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
##############################################
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');

subplot(2,3,1);
Example #3
0
from pylab import *;
from pydao.io import Lox_Stack,ImgArray;
from pydao.ohdf import OGroup;
import os;

dirname = r"D:\2014_12_CLSPEEM\141213";
filename = "141213016.tif";

tif_filename = os.path.join(dirname,filename);
img = ImgArray(tif_filename);
img.read();
#img.savebmp();

figure();
img_array = img.get('img_array');
imshow(img_array);
colorbar();
show();
Example #4
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');
Example #5
0
from pylab import *;
from pydao.io import Lox_Stack,ImgArray;
from pydao.ohdf import OGroup;
import os;

dirname = r"E:\2014_08_CLS\140801\140801020";
filename_pre = "140801020#1.tif"; 
filename = "140801020#107.tif"; 

tif_filename_pre = os.path.join(dirname,filename_pre);
img_pre = ImgArray(tif_filename_pre);

tif_filename = os.path.join(dirname,filename);
img = ImgArray(tif_filename);

img_array_pre = img_pre.get('img_array');
img_array = img.get('img_array');

subplot(2,2,1);
imshow(img_array_pre);
colorbar();

subplot(2,2,2);
imshow(img_array);
colorbar();

subplot(2,2,3);
imshow(img_array/img_array_pre);
colorbar();

show();
Example #6
0
from pylab import *
from pydao.io import Lox_Stack, ImgArray
from pydao.ohdf import OGroup
import os

dirname = r"D:\2014_12_CLSPEEM\141213"
filename = "141213016.tif"

tif_filename = os.path.join(dirname, filename)
img = ImgArray(tif_filename)
img.read()
#img.savebmp();

figure()
img_array = img.get('img_array')
imshow(img_array)
colorbar()
show()