Пример #1
0
def align(y_LR,size=64,n=6):
    return quick.align(y_LR,size,n)
Пример #2
0
'201203.20120623.1110',
'201203.20120623.1120',
'201203.20120623.1130',
'201203.20120623.1140',
'201203.20120623.1150',
'201203.20120623.1200',
'201203.20120623.1210',
'201203.20120623.1230',
'201203.20120623.1240',
'201203.20120623.1250'
]

for bin_pid in bins:
    for imagename in list_images(bin_pid):
        image_url = '%s%s.tif' % (BASE_URL, imagename)
        with StagedInputFile(UrlSource(image_url)) as tif:
            imagedata = imread(tif,plugin='freeimage')
            cfa_LR = img_as_float(imagedata)
            #rgb_LR = demosaic(img_as_float(imagedata),pattern=CFA_PATTERN)
            #y_LR = rgb2gray(rgb_LR)
            # 'quick and dirty', based on rggb
            y_LR = cfa_LR[1::2,::2]
            (y,x) = align(y_LR)
            y *= 2
            x *= 2
            m = p2m(x)
            print '%s,%d,%d,%.2f' % (imagename,x,y,m) 
            sys.stdout.flush()
            #imsave('redcyan/%s.tif' % imagename, redcyan(y_LR))