My images have become blurred in certain areas after stitching. Could you please explain why this happens and which parameter can be adjusted to resolve it?
My code:
import os
import cv2
import numpy as np
from PIL import Image, ImageFilter
from stitching import Stitcher, AffineStitcher
from tqdm import tqdm
panorama = None
for i in tqdm(range(0, len(image_files), dynamic_block_size), desc="processing"):
block = image_files[i:i + dynamic_block_size]
images = [cv2.imread(img_file) for img_file in block]
if any(img is None for img in images):
continue
if panorama is None:
if len(images) == 1:
result = images[0]
else:
result = stitcher.stitch(images)
else:
tmp_images = []
tmp_images = [] + images + [panorama]
result = stitcher.stitch(tmp_images)
if result is None:
continue
else:
panorama = result
My settings parameters are as follows:
settings = {
"detector": "sift",
# "nfeatures": 1000,
"confidence_threshold": 0.5,
"crop": False,
"estimator": "affine",
"wave_correct_kind": "no",
"matcher_type": "affine",
"adjuster": "affine",
"warper_type": "affine",
"compensator": "no",
"medium_megapix": 0.8, # 0.5
"low_megapix": 0.5, # 0.1
"final_megapix": -1,
"range_width": -1,
"nr_feeds": 1,
"block_size": 32,
"try_use_gpu": True,
"blender_type": 'multiband',
"blend_strength": 1,
}