refractor for HHD and depth backend

This commit is contained in:
bluepulsar
2026-02-18 10:56:30 +08:00
parent ef3a25a158
commit 54baf1ecde
4 changed files with 494 additions and 609 deletions
+2 -8
View File
@@ -1,14 +1,8 @@
import numpy as np
import cv2
# Try to import CuPy for GPU acceleration
try:
import cupy as cp
CUPY_AVAILABLE = True
except ImportError:
cp = None
CUPY_AVAILABLE = False
from .backend_availability import CUPY_AVAILABLE, get_cupy
cp = get_cupy()
# 缓存形态学操作的核,避免重复创建
_morphology_kernels = {}