SlideShare a Scribd company logo
Using	openCV 3.1.0	
with	Visual	Studio	
Express	2015
David	Hsu
openCV 3.1.0	ft.	Visual	Studio	2015
• openCV 3.1.0
http://opencv.org/
• Visual	Studio	Express	2015
https://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx
Other	versions
• This	tutorial	works	under	the	platform	of	windows	10	pro,	with	
openCV 3.1.0 using	Visual	Studio	Express	2015.	It	is	also	
applicable	to	other	versions	but	with	some	differences	in	setting.
• OpenCV provides	the	official	built-in	libraries	for	visual	studio	
according	to	specific	versions	of	compilers.	Please	check	if	there	is	
the	corresponding	built-in	library	in	the	opencv package	to	the	IDE	
you	have.
• vc14	:	built	for	Visual	Studio	2015
vc12	:	built	for	Visual	Studio	2013
vc11	:	built	for	Visual	Studio	2012
vc10	:	built	for	Visual	Studio	2010
• For	opencv 3.1.0,	it	supports	Visual	Studio	2013	and	2015.
Install	opencv 3.1.0	
• Extract	the	opencv-3.1.0.exe	under	C	drive
Set	up	System	Environment	Path
• Choose	Advanced	system	settings	in	System panel
• Click	Environment	Variables in	System	Properties
Set	up	System	Environment	Path
• Double	click	Path to	edit
Set	up	System	Environment	Path
• Add	path	:	C:opencvbuildx64vc14bin
Reboot	the	computer	after	setting
• It	is	recommended	to	reboot	the	computer	after	setting.
New	a	Project	in	Visual	Studio	
• Open	Visual	Studio	and	click	New	Project…
New	a	Project	in	Visual	Studio	
• Choose	Win32	Console	Application
• Name	the	project		(e.g.	cvProject)
Win32	Application	Wizard
• Next
Application	Settings
• Check	“Console	application”	and	“Empty	project”
Add	Resource	Files
• Right	click	“Resource	Files”	to	add	.cpp files
Add	Resource	Files
• Add	main.cpp file
Set	up	project’s	Properties
• Right	click	the	project	and	choose	Properties
Configuration	Manager…
•
Choose	platform	to	x64
•
Choose	All	Configurations
•
Additional	Include	Directories
•
Additional	Include	Directories
•
Additional	Include	Directories
• Add	directory	:	C:opencvbuildinclude
Additional	Include	Directories
• Add	directory	:	C:opencvbuildincludeopencv
Additional	Include	Directories
• Add	directory	:	C:opencvbuildincludeopencv2
Additional	Include	Directories
• Additional	Include	Directories:		C:opencvbuildinclude		
C:opencvbuildincludeopencv
C:opencvbuildincludeopencv2
Additional	Library	Directories
•
Additional	Library	Directories
• Add	directory	:	C:opencvbuildx64vc14lib
Additional	Library	Directories
• Add	directory	:	C:opencvbuildx64vc14lib
Additional	Library	Directories
• Add	directory	:	C:opencvbuildx64vc14lib
Change	Configuration	to	Debug
•
Save	the	settings
•
Additional	Dependencies	(Debug)
•
Additional	Dependencies	(Debug)
opencv_world310d.lib	
•
Change	Configuration	to	Release
•
Save	the	settings
•
Additional	Dependencies	(Release)
• Similar	steps	for	Release	mode
Additional	Dependencies	(Release)
opencv_world310.lib
•
Complete	project’s	settings
•
main.cpp
main.cpp
#include	<opencv2/core/core.hpp>
#include	<opencv2/highgui/highgui.hpp>
#include	<iostream>
using	namespace	cv;
using	namespace	std;
int main()
{
Mat	image;
image	=	imread("lena.bmp",	CV_LOAD_IMAGE_COLOR);			//	Read	the	file
if(!	image.data )																														//	Check	for	invalid	input
{
cout <<		"Could	not	open	or	find	the	image"	<<	std::endl ;
system(“PAUSE”);
return	-1;
}
namedWindow(	"Display	window",	WINDOW_AUTOSIZE	);//	Create	a	window	for	display.
imshow(	"Display	window",	image	);																			//	Show	our	image	inside	it.
waitKey(0);																																										//	Wait	for	a	keystroke	in	the	window
return	0;
}
Resource	image
• Place	the	image	under	the	same	folder	with	main.cpp	file
• Or	use	image’s	direct	directory	to	open	the	image.
Build	and	Run	the	project
•
Load	and	display	an	image
• Use	this	project	as	a	template	to	develop	opencv projects	in	
the	future.

More Related Content

PDF
Using openCV 2.0 with Dev C++
PPTX
Guide: How to Build OpenCV 3.0.0
PDF
Installing OpenCV 2.3.1 with Qt
PDF
Installing OpenCV 2.4.x with Qt
PPTX
Using openCV 3.2.0 with CodeBlocks
PDF
Using open cv 249 with vs2012
PPTX
Load Testing with k6 framework
PPTX
PVS-Studio, a static analyzer detecting errors in the source code of C/C++/C+...
Using openCV 2.0 with Dev C++
Guide: How to Build OpenCV 3.0.0
Installing OpenCV 2.3.1 with Qt
Installing OpenCV 2.4.x with Qt
Using openCV 3.2.0 with CodeBlocks
Using open cv 249 with vs2012
Load Testing with k6 framework
PVS-Studio, a static analyzer detecting errors in the source code of C/C++/C+...

What's hot (20)

PPTX
PVS-Studio static analyzer: advanced features
PDF
TestExec SL 7.1
PPTX
XPDays-2018
PDF
IVI-COM Action
PDF
"Making OpenCV Code Run Fast," a Presentation from Intel
PPTX
IoT 개발자를 위한 Embedded C에서 Test Coverage를 추출해보자
PDF
PVS-Studio confesses its love for Linux
PPTX
C++ Unit testing - the good, the bad & the ugly
PPTX
Slow, Flaky and Legacy Tests: FTFY - Our New Testing Strategy at Net-A-Porter...
PDF
PDF
Playing with SIMBL - Mobile Jazz Inspirational Talks
PPTX
Working with c++ legacy code
PDF
All about PVS-Studio
PDF
Life-cycle is too short not to use ElasTest
DOCX
Dev c++using
PDF
How to Work with Dev-C++
PDF
Bgoug 2019.11 building free, open-source, plsql products in cloud
PDF
Better Code: Concurrency
PPTX
Image filters
PDF
ElasTest Webinar
PVS-Studio static analyzer: advanced features
TestExec SL 7.1
XPDays-2018
IVI-COM Action
"Making OpenCV Code Run Fast," a Presentation from Intel
IoT 개발자를 위한 Embedded C에서 Test Coverage를 추출해보자
PVS-Studio confesses its love for Linux
C++ Unit testing - the good, the bad & the ugly
Slow, Flaky and Legacy Tests: FTFY - Our New Testing Strategy at Net-A-Porter...
Playing with SIMBL - Mobile Jazz Inspirational Talks
Working with c++ legacy code
All about PVS-Studio
Life-cycle is too short not to use ElasTest
Dev c++using
How to Work with Dev-C++
Bgoug 2019.11 building free, open-source, plsql products in cloud
Better Code: Concurrency
Image filters
ElasTest Webinar
Ad

Similar to Using openCV 3.1.0 with vs2015 (20)

DOCX
Tutorial test driven development with Visual Studio 2012
PPS
Visual Studio 2015 Product Lineup
PDF
openCV and Java - Face Detection
PPTX
Octopus Deploy @Erie Day of Code
PDF
Introducing Deployit 3.9
PDF
Comparing Functionalities of PVS-Studio and CppCat Static Code Analyzers
PDF
Testingfor continuousdeliverywithvisualstudio2012
PPTX
Vagrant to-aws-flow
PDF
Intelligent Projects with Maven - DevFest Istanbul
PDF
My first deployment pipeline
PPTX
What's new in ALM using Visual Studio 2013 and Team Foundation Service
PDF
PVS-Studio Now Supports Any Build System under Windows and Any Compiler. Easy...
PDF
Creating, debugging and deploying extension packages for Microsoft Visual Stu...
PPT
MOTODEV Studio for Testing A platform testing based on Eclipse
PPTX
Develop android application with mono for android
PDF
Eclipse IDE, 2019.09, Java Development
PDF
jenkins.pdf
PDF
Jenkins_1679702972.pdf
PPTX
Azure DevOps Deployment Group
PPTX
Accelerating time to delivery - Modern tools for COBOL development
Tutorial test driven development with Visual Studio 2012
Visual Studio 2015 Product Lineup
openCV and Java - Face Detection
Octopus Deploy @Erie Day of Code
Introducing Deployit 3.9
Comparing Functionalities of PVS-Studio and CppCat Static Code Analyzers
Testingfor continuousdeliverywithvisualstudio2012
Vagrant to-aws-flow
Intelligent Projects with Maven - DevFest Istanbul
My first deployment pipeline
What's new in ALM using Visual Studio 2013 and Team Foundation Service
PVS-Studio Now Supports Any Build System under Windows and Any Compiler. Easy...
Creating, debugging and deploying extension packages for Microsoft Visual Stu...
MOTODEV Studio for Testing A platform testing based on Eclipse
Develop android application with mono for android
Eclipse IDE, 2019.09, Java Development
jenkins.pdf
Jenkins_1679702972.pdf
Azure DevOps Deployment Group
Accelerating time to delivery - Modern tools for COBOL development
Ad

More from Wei-Wen Hsu (7)

PDF
openCV with python
PDF
Python for data science
PDF
Running openCV project on Mac OS
PDF
Installing Python on Mac
PDF
Basic openCV Functions Using CPP
PDF
Concise Notes on Python
PDF
Installing Python on Windows OS
openCV with python
Python for data science
Running openCV project on Mac OS
Installing Python on Mac
Basic openCV Functions Using CPP
Concise Notes on Python
Installing Python on Windows OS

Recently uploaded (20)

PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
medical staffing services at VALiNTRY
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPT
Introduction Database Management System for Course Database
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Transform Your Business with a Software ERP System
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Digital Strategies for Manufacturing Companies
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
assetexplorer- product-overview - presentation
Odoo Companies in India – Driving Business Transformation.pdf
medical staffing services at VALiNTRY
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Introduction Database Management System for Course Database
Upgrade and Innovation Strategies for SAP ERP Customers
How to Migrate SBCGlobal Email to Yahoo Easily
2025 Textile ERP Trends: SAP, Odoo & Oracle
Which alternative to Crystal Reports is best for small or large businesses.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Wondershare Filmora 15 Crack With Activation Key [2025
PTS Company Brochure 2025 (1).pdf.......
Transform Your Business with a Software ERP System
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Digital Systems & Binary Numbers (comprehensive )
Reimagine Home Health with the Power of Agentic AI​
Digital Strategies for Manufacturing Companies
How to Choose the Right IT Partner for Your Business in Malaysia
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
assetexplorer- product-overview - presentation

Using openCV 3.1.0 with vs2015