Skip to content

Commit 61bc22d

Browse files
author
Hara
committed
update: 鮮明化の値を変更
1 parent fbb083e commit 61bc22d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/minifig_detector_v5.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ def detect(self, image_path: str) -> dict:
189189
print("画像読み込みエラー")
190190
return error_result
191191

192-
# v5モデル判定時のみ一時的に鮮明化処理を実行
193-
kernel = np.array([[0, -1, 0], [-1, 5, -1], [0, -1, 0]])
194-
enhanced_img = cv2.filter2D(img, -1, kernel)
192+
# v5モデル判定時のみ一時的に鮮明化処理を実行(アンシャープマスク)
193+
blurred = cv2.GaussianBlur(img, (0, 0), 2)
194+
enhanced_img = cv2.addWeighted(img, 2.5, blurred, -2.0, 0)
195195

196196
# 前処理:レターボックス+正規化(鮮明化された画像を使用)
197197
img_input, scale, pad = self.preprocess_image(enhanced_img)

0 commit comments

Comments
 (0)