Hello everyone,
I would like to ask if there is any OpenCV function or method suitable for correctly stitching together very long and narrow grayscale images with the following characteristics:
- 16-bit grayscale images
- 96 PPI resolution
- Size of each image: approximately 3200 × 18000 pixels (around 4 × 225 cm)
- Images overlap laterally by exactly 2 cm (the amount of overlap along the X-axis is known and constant for all images)
- Between consecutive images, there is an unknown shift along the Y-axis.
I have done several tests using both Stitcher.SCANS
and cv2.findTransformECC
, but I encountered some problems:
- With
Stitcher.SCANS
, I can only align the images if the overlap is at least 75%. Moreover, when working with a set of 10 images, the algorithm can only stitch about 5 images at a time — the others are skipped. - With
findTransformECC
, I was able to fix the X offset while allowing Y to vary, but due to the elongated shape of the images, ECC seems unable to compute the correct vertical shift (Y displacement) between the images.
I am attaching a sample image showing the alignment along the X-axis only, with a known overlap between 25 images.
Is there any recommended approach for stitching long and narrow images like these, given that the lateral offset is fixed and only the vertical displacement needs to be estimated?
Any advice or alternative methods would be greatly appreciated!
Thank you very much!