Skip to content

Commit

Permalink
Hot-Fix: 제거 이미지 쓰기 imwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
semnisem committed Nov 24, 2024
1 parent 6eeb3b2 commit 2ccb36c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/AIProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,13 @@ def inpainting(self, image, mask_total, bbox=None):

text_np = cv2.dilate(text_np, np.ones((4, 4), np.uint8), iterations=1)
text_np = cv2.erode(text_np, np.ones((2, 2), np.uint8), iterations=2)
cv2.imwrite('text_np.jpg', text_np.astype(np.uint8))
# cv2.imwrite('text_np.jpg', text_np.astype(np.uint8))

inpainted_image = image.copy()
inpainted_image[mask_total == 255] = [255, 255, 255]
inpainted_image[text_np == 255] = [30, 30, 30]
final_image = cv2.convertScaleAbs(inpainted_image, alpha=1.5, beta=15)


# inpainted_image = cv2.inpaint(image.copy(), mask_total, 15, cv2.INPAINT_TELEA)
# cv2.imwrite('test_images/inpainted_init.png', inpainted_image)
# cv2.imwrite('test_images/inpainted_final.png', final_image)
Expand Down

0 comments on commit 2ccb36c

Please sign in to comment.