WillBrennan / ImageStitching

Conducts image stitching upon an input video to generate a panorama in 3D
272 stars 58 forks source link

there's a problem when stitching more than 34 images #5

Closed MugleLei closed 4 years ago

MugleLei commented 7 years ago

video_stitching has a bug: Traceback (most recent call last): File "video_stitching.py", line 46, in cap = cv2.VideoCapture(args.video_path) TypeError: an integer is required

so I use image_stitching to stitch images captured from video, but I can't stitch 35 images at a time while stitch 34 images are fine. Also when stitching 80 images, No.1-34 disappear and No.35-80 are fine. I run the program in both opencv2.4 and opencv3.2 and they have the same problem. Is there any limitation in the code? I'm not familiar with opencv so I can't find the limitation myself.

when stitching 34 images: stitched_34

when stitching 35 images: stitched_35

when stitching 36 images: stitched_36

when stitching 80 images: stitched_80

WillBrennan commented 4 years ago

This method isn't taking into account lens distortion when stitching the images. This is okay on mobile phone footage, but it looks like you're using a lens with distortion.

Usually you have to undistort the images and stitch them.