fix import

This commit is contained in:
bluepulsar
2026-02-16 17:02:58 +08:00
parent 46bf5bdd1c
commit 88d75f63a3
2 changed files with 29 additions and 28 deletions
+5 -5
View File
@@ -177,17 +177,17 @@ class Sensor:
# Start processing timing
t_processing_start = time.perf_counter()
self.frame = frame.copy()
# self.frame = frame.copy()
self.frame = frame
# Extract and stitch tiles
self.stitcher.get_stitch_unit(frame)
# self.stitcher.get_stitch_unit(frame)
self._extract_tiles(frame)
img = np.ascontiguousarray(self.stitcher.stitch_rt_optimized())
self.img_size_raw = img.shape
# Resize
img = cv2.resize(img, tuple(self._config_resolution_stitch), interpolation=cv2.INTER_CUBIC)
img = cv2.resize(img, tuple(self._config_resolution_stitch), interpolation=cv2.INTER_LINEAR)
if self.mirror:
img = cv2.flip(img, 1)
@@ -201,7 +201,7 @@ class Sensor:
self._fps = 1.0 / (time.perf_counter() - self.last_log_time)
self.last_log_time = time.perf_counter()
return self.img.copy()
return None
def detect_motion(self, threshold=4):
if self.initial_img is None: