From 6953da2e0c25137f32d3b4067dcad51ba245ff2f Mon Sep 17 00:00:00 2001 From: semnisem Date: Tue, 20 Aug 2024 19:09:11 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=EB=A7=88=EC=8A=A4=ED=82=B9=20?= =?UTF-8?q?=EC=BB=AC=EB=9F=AC=20=EA=B5=AC=EA=B0=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hue를 105~135에서 95~120으로 변경 --- app/ColorRemover.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ColorRemover.py b/app/ColorRemover.py index 6a2b111..c3d116b 100644 --- a/app/ColorRemover.py +++ b/app/ColorRemover.py @@ -31,8 +31,8 @@ def combine_alpha(self, image_rgb): def masking(self, image_rgb): # important image_mask = image_rgb.copy() image_hsv = cv2.cvtColor(image_mask, cv2.COLOR_BGR2HSV) - lower_bound = np.array([105, 10, 30]) # blue's hue is 105~135 - upper_bound = np.array([135, 255, 255]) + lower_bound = np.array([95, 10, 30]) # blue's hue is 105~120 + upper_bound = np.array([120, 255, 255]) self.masks = cv2.inRange(image_hsv, lower_bound, upper_bound) if self.size > 1024 * 1536: From 5de9d267359d7e18b96941b9b841fa81d291d16d Mon Sep 17 00:00:00 2001 From: semnisem Date: Tue, 20 Aug 2024 19:09:52 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=EC=9D=B8=ED=8E=98=EC=9D=B8=ED=8C=85?= =?UTF-8?q?=20=EB=B2=94=EC=9C=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit radius를 5에서 4로 축소 --- app/ColorRemover.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ColorRemover.py b/app/ColorRemover.py index c3d116b..0625e47 100644 --- a/app/ColorRemover.py +++ b/app/ColorRemover.py @@ -42,7 +42,7 @@ def masking(self, image_rgb): # important def inpainting(self, image_rgb): if self.masks is not None and isinstance(self.masks, np.ndarray): inpainted_image = image_rgb.copy() - inpainted_image = cv2.inpaint(inpainted_image, self.masks, 5, cv2.INPAINT_TELEA) + inpainted_image = cv2.inpaint(inpainted_image, self.masks, 4, cv2.INPAINT_TELEA) # blurred_region = cv2.GaussianBlur(inpainted_image, (10, 10), 1.5) # inpainted_image[self.masks != 0] = blurred_region[self.masks != 0] return inpainted_image