OpenCV Stitcher

时间:2018-03-05 19:28:35

标签: python opencv

我有一个可以在相机周围移动的步进电机。我正在编写一些python软件,它可以移动步进电机并拍照,然后将图像缝合到之前拼接的图像上。这似乎运作良好,但最终OpenCV的缝合器在拍摄7-8张图像后无法拼接图像。

问题是为什么它最终会失败?我该怎么做才能解决它?

代码摘要:

移动步进器, 拍摄pic1.jpg 移动步进, 拍摄pic2.jpg缝合pic1.jpg称之为final.jpg, 移动步进, 用final.jpg拍摄pic3.jpg stitch, 移动步进, 用final.jpg拍摄pic4.jpg ... 没能用final.jpg缝合pic8.jpg

    stitcher = cv2.createStitcher(False)
    newImg = cv2.imread(imageFile)
    stitchedImg = cv2.imread("final.jpg")
    result = stitcher.stitch((stitchedImg,newImg))
    cv2.imwrite("final.jpg", result[1])
    #code example of functions I'm using

谢谢!

0 个答案:

没有答案