OpenCV - 캡챠 문자 검출하기
import cv2 import numpy as numpy import matplotlib.pyplot as plt img = cv2.imread('./characters.PNG') img = cv2.blur(img, (10, 10), anchor=(-1, -1), borderType=cv2.BORDER_DEFAULT) # 블러처리(떨어진 조각을 붙이기) img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # 회색 전환 img_gray = 255 - img_gray # 이미지 반전 res, thr = cv2.threshold(img_gray, 90, 255, cv2.THRESH_BINARY) # 이진화 cv2.imshow('gray', thr) contours, hie..
2022. 5. 18.