Beispiel #1
0
# This file will be the base for alignment and intensity normalization
if base_image is not None:
    idx = frames.index(base_image)
    f = frames.pop(idx)
    frames.insert(0,f)

if verbose:
    print "%s will be used as base image" % frames[0]

# Determine image size
base_img_fname = frames[0]
if verbose:
    print "Reading %s" % base_img_fname
img = PMImage(base_img_fname)
w,h = img.size().width(), img.size().height()
if img.monochrome():
    c = 1
else:
    c = 3

print "Detected image size is %d x %d (width x height)" % (w,h)

print "%s will be used as base image" % frames[0]
img = IMtoNumpy(img,pre_usm,verbose=verbose)

# Get data used for aligning images
align_ref_data = None
if align_ref_loc is not None:
    xc = align_ref_loc[0]
    yc = align_ref_loc[1]
    d = align_ref_loc[2]