Ejemplo n.º 1
0
def Visual_ASIFT(im1, im2):
    t0 = time.time()
    out1 = feature.asift2(im1, im2, 1)
    if out1.shape[0] < 15:
        out = out1
        print("Image alignment (shapes: %s,%s) took %.3fs. ASIFT found %i control points" %
              (im1.shape, im2.shape, time.time() - t0, out1.shape[0],))
    else:
        out = feature.reduce_orsa(out1)
        print("Image alignment (shapes: %s,%s) took %.3fs. ASIFT found %i control points; Reduced to %i with ORSA" %
               (im1.shape, im2.shape, time.time() - t0, out1.shape[0], out.shape[0]))
    Visual(im1, im2, out)
    return out
Ejemplo n.º 2
0
def Visual_ASIFT(im1, im2):
    t0 = time.time()
    out1 = feature.asift2(im1, im2, 1)
    if out1.shape[0] < 15:
        out = out1
        print("Image alignment (shapes: %s,%s) took %.3fs. ASIFT found %i control points" %
              (im1.shape, im2.shape, time.time() - t0, out1.shape[0],))
    else:
        out = feature.reduce_orsa(out1)
        print("Image alignment (shapes: %s,%s) took %.3fs. ASIFT found %i control points; Reduced to %i with ORSA" %
               (im1.shape, im2.shape, time.time() - t0, out1.shape[0], out.shape[0]))
    Visual(im1, im2, out)
    return out