Tutorial: Create OpenCV Project
Prepare Project Workspace
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\TutorialC:\Users\yourID\source\repos\DLIP\Include
Save Property Sheet
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:
OpenCV Install and SetupCreate a New Project in VS
Create a new C++ project in Visual Studio Community
์ ํ๋ก์ ํธ ๋ง๋ค๊ธฐ > ๋น ํ๋ก์ ํธ(C++)
Project Name and Location
Project Name:
DLIP_OpenCV_Simple_DemoProject Folder:
~\DLIP\Tutorial\

Setup of Project Property
Include the already created OpenCV property sheets
(Debug x64)
VS ๋ฉ๋ด๋ฐ:
๋ณด๊ธฐ>๋ค๋ฅธ ์ฐฝ>์์ฑ ๊ด๋ฆฌ์์ ํ์์ฑ ๊ด๋ฆฌ์ ํญ:
ํ๋ก์ ํธ๋ช > Debugx64RightClick.๊ธฐ์กด ์์ฑ ์ํธ ์ถ๊ฐ์ ํ ํ ์ ์ฅ๋ " opencv-4.9.0_debug_x64.props " ์ถ๊ฐIt should be located in "
~\DLIP\Include\"

(Release x64)
์์ฑ ๊ด๋ฆฌ์ ํญ:
ํ๋ก์ ํธ๋ช > Releasex64RightClick.๊ธฐ์กด ์์ฑ ์ํธ ์ถ๊ฐ์ ํ ํ ์ ์ฅ๋ " opencv-4.9.0_release_x64.props " ์ถ๊ฐ
Create Demo Program
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

Last updated
Was this helpful?