Improve Stitch Pano Performance

Hi OpenCV community!

I have a fairly basic Image Stitching problem. My Goal is to take a full 360 view and stitch it together. In total there are 12 images (30 degrees off). I’m following the boiler plate stitcher method.

What other techniques are there to improve the stitch performance. If you look at two of the example images that don’t stitch together below, there is huge amounts of overlap. What am I missing for the param tweaks?

Also sometimes my stitches return this error: ** On entry to DLASCL, parameter number 4 had an illegal value. Where does this come from?

Current code:

for imagePath in imagePaths:
    print(imagePath)
    image = cv2.imread(imagePath)
    images.append(image)

stitcher = cv2.Stitcher_create()
stitcher.setPanoConfidenceThresh(0.4)
(status, stitched) = stitcher.stitch(images)

Example image 1
Example image 2