Tutorial: Create OpenCV Project
Last updated
Was this helpful?
Last updated
Was this helpful?
Create the lecture workspace as C:\Users\yourID\source\repos\DLIP
e.g. C:\Users\ykkim\source\repos\DLIP
Then, create sub-directories as :
C:\Users\yourID\source\repos\DLIP\Tutorial
C:\Users\yourID\source\repos\DLIP\Include
Copy or move the OpenCV setup property sheets you have created in the Include folder.
C:\Users\yourID\source\repos\DLIP\Include
Property Sheets
opencv-4.9.0_debug_x64.props
opencv-4.9.0_release_x64.props
If you don't have property sheets, then follow the instruction:
Create a new C++ project in Visual Studio Community
새 프로젝트 만들기 > 빈 프로젝트(C++)
Project Name and Location
Project Name: DLIP_OpenCV_Simple_Demo
Project Folder: ~\DLIP\Tutorial\
Include the already created OpenCV property sheets
(Debug x64)
VS 메뉴바: 보기>다른 창>속성 관리자
선택
속성 관리자 탭: 프로젝트명 > Debugx64
RightClick.
기존 속성 시트 추가
선택 후 저장된 " opencv-4.9.0_debug_x64.props " 추가
It should be located in "~\DLIP\Include\"
(Release x64)
속성 관리자 탭: 프로젝트명 > Releasex64
RightClick.
기존 속성 시트 추가
선택 후 저장된 " opencv-4.9.0_release_x64.props " 추가
Create a new C+ source file
File Name: DLIP_OpenCV_Simple_Demo.cpp
솔루션탐색기 탭: [프로젝트] > 소스 파일 > 추가 > 새항목 > C++파일(cpp) 선택
구성 관리자를 Debug x64로 설정
Run the following demo program. You can run the program by pressing (CTRL+F5)
Demo 1: Image File Read
이미지 파일 다운로드: Click here
이미지 파일과 소스코드가 동일 폴더에 있어야 함!!
Expected Output
Demo 2: Video Cam capture
Expected Output