[OpenCV Practice 15-2] 이미지 컨투어 feature (Image Contour - feature 1)
import cv2 import numpy as np import matplotlib.pyplot as plt Contours Contour는 동일한 색 또는 동일한 픽셀값(강도, intensity)을 가지고 있는 영역의 경계선 정보이다. 물체의 윤곽선, 외형을 파악하는데 사용된다. openCV의 findContour 함수로 이미지의 Contour 정보와 Contour 계층구조(hierarchy) 정보를 출력한다. 흑백 이미지 또는 이진화된 이미지에만 적용할 수 있다. findContours 함수로 반환받는 Contour 값은 Contour를 구성하는 점들로 이루어진 배열의 리스트로 len(contours)로는 hierarchy의 갯수를, len(contours[i])로는 각각의 hierarchy를 이루..
데이터 분석 & 시각화/OpenCV
2020. 12. 18. 14:32
최근댓글