From 73bf163e9d4f8cccbeee5eaf5a1e5ef04a0fed83 Mon Sep 17 00:00:00 2001 From: "Christopher L. Crutchfield" Date: Wed, 6 Nov 2024 15:06:28 -0800 Subject: [PATCH] make it harder to select images --- fishsense_video_frame_extractor/commands/extract_frames.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fishsense_video_frame_extractor/commands/extract_frames.py b/fishsense_video_frame_extractor/commands/extract_frames.py index 95026f7..08b4ef4 100644 --- a/fishsense_video_frame_extractor/commands/extract_frames.py +++ b/fishsense_video_frame_extractor/commands/extract_frames.py @@ -39,7 +39,7 @@ def update(self, file: Path, frame: int): def __diff_images(a: np.ndarray, b: np.ndarray, skip_count: int) -> bool: b = cv2.resize(b, (a.shape[1], a.shape[0]), interpolation=cv2.INTER_AREA) ssim_score = metrics.structural_similarity(a, b, channel_axis=2) - threshold = 0.7 + float(skip_count) / 1500.0 + threshold = 0.65 + float(skip_count) / 1500.0 return ssim_score < threshold