OpenCV(Python/C++) Combine frames of parts of an object in movement, without using keypoints
Hello, I'm trying to combine images of parts of an object, not a panorama, from several frames, in order to get one image of the hole object.
I tried using the Opencv Stitcher class, for a test with two images of the object, but not enough keypoints were found and an empty image was returned.
Here is the code.
import cv2
import numpy as np
import imutils
RESIZE = 200
stitcher = cv2.createStitcher(False)
packageSx = cv2.imread("package1.jpg")
packageDx = cv2.imread("package2.jpg")
result = stitcher.stitch((packageSx,packageDx))
imutils.resize(packageSx, width=RESIZE)
imutils.resize(packageDx, width=RESIZE)
cv2.imwrite("result.jpg", result[1])
cv2.imshow("Result", result[1])
cv2.waitKey(0)
cv2.destroyAllWindows()
This are the tset test images of the object, a small part of the images overlaps.
Can anyone suggest another approach for stitching frames of a specific object in motion, in real time?
Thank you!