I am trying to run a code on image stitching using opencv Stitcher module on Windows.
Here is a code:
import cv2
import numpy as np
import glob
images = []
for file in glob.glob("path_to_images/*.png"):
n= cv2.imread(file)
images.append(n)
result = images[0]
for i in images:
stitcher = cv2.createStitcher(False)
result = stitcher.stitch(result, images[i])
cv2.imwrite("C:/Users/user/Desktop/mosaicing/island/out1.jpg", result[1])
I receive an error:
TypeError: only integer scalar arrays can be converted to a scalar index
I would appreciate any hints on how to solve it. TIA