SSARCandy / panoramas-image-stitching

🖼 Stitching images into 360 panoramas

Home Page:https://ssarcandy.tw/2017/05/26/panorama-image-stitching/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shift direction not same as previous shift

Kaustubh-trivedi opened this issue · comments

PS D:\Vdsai\panoramas-image-stitching-master\src> python ./main.py ../input_image/100_0040/
Warp images to cylinder
Computing .... 2/26

  • Find features in previous img .... 5682 features extracted.
  • Find features in img_2 .... 14032 features extracted.
  • Feature matching .... 114 features matched.
  • Find best shift using RANSAC .... best shift [-9 17]
  • Stitching image .... Saved.
    Computing .... 3/26
  • Find features in previous img .... 14032 features extracted.
  • Find features in img_3 .... 2212 features extracted.
  • Feature matching .... 44 features matched.
  • Find best shift using RANSAC .... best shift [0 0]
  • Stitching image .... Saved.
    Computing .... 4/26
  • Find features in previous img .... 2212 features extracted.
  • Find features in img_4 .... 7695 features extracted.
  • Feature matching .... 28 features matched.
  • Find best shift using RANSAC .... best shift [-30 508]
  • Stitching image .... Saved.
    Computing .... 5/26
  • Find features in previous img .... 7695 features extracted.
  • Find features in img_5 .... 32659 features extracted.
  • Feature matching .... 123 features matched.
  • Find best shift using RANSAC .... best shift [0 0]
  • Stitching image .... Saved.
    Computing .... 6/26
  • Find features in previous img .... 32659 features extracted.
  • Find features in img_6 .... 1123 features extracted.
  • Feature matching .... 105 features matched.
  • Find best shift using RANSAC .... best shift [ -5 -13]
  • Stitching image .... Saved.
    Computing .... 7/26
  • Find features in previous img .... 1123 features extracted.
  • Find features in img_7 .... 2641 features extracted.
  • Feature matching .... 40 features matched.
  • Find best shift using RANSAC ....

Best shift: [24 60]
Traceback (most recent call last):
File "D:\Vdsai\panoramas-image-stitching-master\src\main.py", line 72, in
shift = stitch.RANSAC(matched_pairs, shifts[-1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Vdsai\panoramas-image-stitching-master\src\stitch.py", line 53, in RANSAC
raise ValueError('Shift direction NOT same as previous shift.')
ValueError: Shift direction NOT same as previous shift.

How to make shift direction same as previous shift?
Can you please help?

make sure your image list is in order