Dev #19

Merged
zhangyijian merged 53 commits from dev into main 2026-09-02 21:39:04 +08:00
Showing only changes of commit 68b6dadff4 - Show all commits
+21 -2
View File
@@ -3,9 +3,22 @@ import numpy as np
import scipy.fft
from scipy import ndimage
import cv2
# from numba import njit
# @njit(cache=False)
try:
from numba import njit
_NUMBA_AVAILABLE = True
except ImportError:
_NUMBA_AVAILABLE = False
def njit(*args, **kwargs):
def decorator(fn):
return fn
return decorator
@njit(cache=False)
def _blend_kernel(blend_patch, wsum_patch, cov_patch, src_patch, w_patch):
"""Fused incremental weighted-average composite (numba-accelerated)."""
sh = src_patch.shape[0]
@@ -73,6 +86,12 @@ class Stitcher:
self._feature_stitch_pad = 5
self._feature_stitch_match_brightness = False
if self.isstitch and not _NUMBA_AVAILABLE:
print(
"Warning: numba is not installed; feature stitching will run a slow "
"Python blend path (~1 FPS). Install numba for real-time performance."
)
if self.verbose:
print(f"Stitcher initialized with config: {self.config_stitcher}")