[OpenCV Practice 15-3] 이미지 컨투어 feature (Image Contour - feature 2)
import cv2 import numpy as np import matplotlib.pyplot as plt Contour Features 1. Contour Approximation (Contour 근사) cv2.findContours 함수를 통해 찾은 Contours line에는 각각의 Contours point를 가지고 있다. 보통은 이 Point를 drawContours 함수를 이용하여 Line을 그리게 된다. 이 때 우리가 지정한 정밀도에 따라 Point의 꼭짓점의 수를 줄여가면서 기존의 Contours line에 근사한 line을 그릴 수 있다. 이 Point의 수를 줄이는데 Douglas-Peucker 알고리즘을 사용한다. cv2.approxPolyDP(curve, epsilon, clos..
데이터 분석 & 시각화/OpenCV
2020. 12. 19. 16:21
최근댓글