From 740be94604e4c5056195d81c0b616568526b37bc Mon Sep 17 00:00:00 2001 From: AbyssYuan0 Date: Tue, 16 Jan 2024 15:51:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E7=BB=84=E8=B6=8A=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- videoCut.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/videoCut.py b/videoCut.py index 3051a6b..3e0aced 100644 --- a/videoCut.py +++ b/videoCut.py @@ -32,7 +32,6 @@ def calculate_image_similarity(img_path1, img_path2): bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=True) matches = bf.match(des1, des2) feature_similarity = len(matches) / float(min(len(des1), len(des2))) - # 综合评分 combined_score = (hist_similarity + ssim_similarity + feature_similarity) / 3.0 @@ -59,7 +58,7 @@ def getCutList(imagePath, threshold, min_frame, max_frame): i = min_frame - 1 avg = sum(resList) / len(resList) threshold = avg * threshold - while i < len(pngList) - 1: + while i < len(resList) - 1: if num >= max_frame: num = 0 cutList.append(pngList[i])