Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list index out of range #1

Open
iliesaya opened this issue Mar 16, 2020 · 0 comments
Open

list index out of range #1

iliesaya opened this issue Mar 16, 2020 · 0 comments

Comments

@iliesaya
Copy link

after updating this line to make it work with openCV4 :
stitcher = cv2.createStitcher()
with
stitcher = cv2.Stitcher_create()

(venv) aya@MacBook-Pro-16 src % python myPanorama.py
len(hpair) = 3 m=1
len(hpair) = 3 m=1
len(hpair) = 0 m=-1
Traceback (most recent call last):
File "myPanorama.py", line 127, in
main()
File "myPanorama.py", line 122, in main
generatePanoramaExamples()
File "myPanorama.py", line 83, in generatePanoramaExamples
Htot = accumulateHomographies(homography_list, m)
File "/Users/aya/GIT/Panorama_Stitching/src/panoramaStitching.py", line 60, in accumulateHomographies
H_im = np.linalg.inv(Hpair[m])
IndexError: list index out of range

I added this line print(f"len(hpair) = {len(Hpair)} m={m}")
just before H_im = np.linalg.inv(Hpair[m])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant