검색결과 리스트
글
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #include <iostream> #include "opencv2/highgui.hpp" #include "opencv2/core.hpp" using namespace cv; using namespace std; int main() { // init mat Mat img, grayImg; // load image img = imread("이미지 파일 경로", cv::IMREAD_COLOR); grayImg = imread("이미지 파일 경로", cv::IMREAD_GRAYSCALE); // check image if (img.empty() || grayImg.empty()) { cout <<"image loading fail" << std::endl; return -1; } // show image imshow("ori image", img); imshow("gray image", grayImg); // wait waitKey(0); return 0; } | cs |
'Computer > Coding' 카테고리의 다른 글
[MFC] 폴더 선택 다이얼로그[MFC] 폴더 선택 다이얼로그 (0) | 2021.04.14 |
---|---|
[opencv] image segmentation (Mask-RCNN) (0) | 2021.01.13 |
char -> string 변환 (0) | 2021.01.04 |
윈도우 폴더 안의 파일 경로 가져오기 (0) | 2021.01.04 |
[opencv] C++ 동영상 배경제거(Background Subtraction) 소스코드 (1) | 2020.12.30 |
RECENT COMMENT