refractor for HHD and depth backend
This commit is contained in:
@@ -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 = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user