-
[OpenCV] Mat() constructor 및 method를 이용한 초기화 방법Study/OpenCV 2014. 1. 3. 13:21
1. Constructor를 이용한 방법
cv::Mat(int width, int height, int type, cv;:Scalar value);
ex) cv::Mat image(100, 100, CV_8UC3, cv::Scalar(0,0,0));
2. Method를 이용한 방법
ones(int width, int height, int type), zeros(int width, int height, int type)
ex) cv::Mat image = cv::Mat::zeros(100, 100, CV_8U);
'Study > OpenCV' 카테고리의 다른 글
Python 3.x에서 OpenCV 설치 (윈도우 환경) (0) 2018.01.05 [OpenCV] 귀찮은 경고 (Warning) 메세지 숨기기 (1) 2012.10.19 [OpenCV] pyrMeanShiftFiltering (0) 2012.09.27 [OpenCV] 2D sequence 만들기 (0) 2011.06.30 [OpenCV] [펌] OpenCV 자주쓰는 기능들 모음 (0) 2010.09.06