Пример #1
0
def testStitchStata():
    im1 = io.imread("stata/stata-1.png")
    im2 = io.imread("stata/stata-2.png")
    pointList1 = [np.array([209, 218, 1]), np.array([425, 300, 1]), np.array([209, 337, 1]), np.array([396, 336, 1])]
    pointList2 = [np.array([232, 4, 1]), np.array([465, 62, 1]), np.array([247, 125, 1]), np.array([433, 102, 1])]
    listOfPairs = zip(pointList1, pointList2)
    out = a6.stitch(im1, im2, listOfPairs)
    io.imwrite(out, "stata_stitch.png")
def testStitchMIT():
    im1=io.imread('mit1.png')
    im2=io.imread('mit0.png')
    pointList1=[np.array([196, 245, 1], dtype=np.float64), np.array([250, 320, 1], dtype=np.float64), np.array([138, 306, 1], dtype=np.float64), np.array([113, 260, 1], dtype=np.float64)]
    pointList2=[np.array([200, 48, 1], dtype=np.float64), np.array([255, 115, 1], dtype=np.float64), np.array([150, 109, 1], dtype=np.float64), np.array([119, 65, 1], dtype=np.float64)]
    listOfPairs=zip(pointList1, pointList2)
    out = a6.stitch(im1, im2, listOfPairs)
    io.imwrite(out, "MyPano.png")
def testStitchScience():
    im1=io.imread('science/science-1.png')
    im2=io.imread('science/science-2.png')
    pointList1=[np.array([307, 15, 1], dtype=np.float64), np.array([309, 106, 1], dtype=np.float64), np.array([191, 102, 1], dtype=np.float64), np.array([189, 47, 1], dtype=np.float64)]
    pointList2=[np.array([299, 214, 1], dtype=np.float64), np.array([299, 304, 1], dtype=np.float64), np.array([182, 292, 1], dtype=np.float64), np.array([183, 236, 1], dtype=np.float64)]
    listOfPairs=zip(pointList1, pointList2)
    out = a6.stitch(im1, im2, listOfPairs)
    io.imwrite(out, "science_stitch.png")
Пример #4
0
def testStitchFun():
    im1=io.imread('fun/room1.png')
    im2=io.imread('fun/room2.png')
    pointList1=[np.array([327, 258, 1], dtype=np.float64), np.array([75, 437, 1], dtype=np.float64), np.array([224, 364, 1], dtype=np.float64), np.array([423, 449, 1], dtype=np.float64)]
    pointList2=[np.array([294, 50, 1], dtype=np.float64), np.array([50, 227, 1], dtype=np.float64), np.array([190, 161, 1], dtype=np.float64), np.array([366, 240, 1], dtype=np.float64)]
    listOfPairs=zip(pointList1, pointList2)
    out = a6.stitch(im1, im2, listOfPairs)
    io.imwrite(out, "MyPano.png")
Пример #5
0
def makeBostonPano():
    boston1 = io.imread("boston1/boston1-2.png")
    boston2 = io.imread("boston1/boston1-3.png")
    pointList1 = [
        np.array([207, 215, 1], dtype=np.float64),
        np.array([243, 324, 1], dtype=np.float64),
        np.array([252, 195, 1], dtype=np.float64),
        np.array([274, 247, 1], dtype=np.float64),
    ]
    pointList2 = [
        np.array([208, 55, 1], dtype=np.float64),
        np.array([249, 162, 1], dtype=np.float64),
        np.array([256, 33, 1], dtype=np.float64),
        np.array([277, 90, 1], dtype=np.float64),
    ]
    listOfPairs = zip(pointList1, pointList2)
    out = a6.stitch(boston1, boston2, listOfPairs)
    io.imwrite(out, "MyPano.png")