SlideShare une entreprise Scribd logo
1  sur  20
BUILDING OPENCV
3.0.0 YOURSELF
André Moreira
June, 2014
WHO I AM ...
# My name is André de Souza Moreira;
# Msc. Candidate at PUC-RIO;
# Researcher at Instituto Tecgraf in Computer Graphics;
# Before: Researcher at NCA in Medical Image Processing.
andredsm.com
WHAT IS OPENCV?
# It’s an open source library written in C++ for computer vision.
# It was originally designed by Intel.
# There are several bidings to others languagens like Python and Java.
# Runs on Windows, Android, Linux, OS X and others.
# Offers CUDA and OpenCL Interface.
# Its last release version is 2.4.9 but you can acquire 3.0.0 version (under development) on
github (June, 2014).
GOALS
# Making a simple building of OpenCV 3.0.0 with Visual Studio 2013;
# Running an OpenCV example;
# Linking the library against a new project in Visual Studio 2013.
BEFORE
YOU BUILD
Step :
Get the Source Code
# Available at https://github.com/Itseez/opencv
# Option 1: Download directly from the website
1
Step :
Get the Source COde
# Option 2: Clone the git repository:
# The advantage of this method consists of tracking changes from the original repository.
So, you can rebuild the library whenever there is a new feature...
1
$ git clone git@github.com:Itseez/opencv.git
Step :
Install dependencies
# There are a lot dependencies you can use in opencv building, such as: Qt, Python,
Opengl, pdflatex to generate the documentation, CUDA, OpenCL and others...
# For example, you can install the python 2.7.x and numpy in order to build python
wrapper.
2
# Install the Cmake Tool
• Available on http://www.cmake.org/
# Open cmake-gui, configure where the library’s source code is (1) and where the project’s
files will be generated (2). Finally, click in Configure button (3).
Step :
Preparing the Project
3
(1)
(2)
(3)
# Select the project that will be generated.
• In our case is Visual Studio 2013. (No, I did not choose the wrong option, the
generator for Visual Studio 2013 is really called Visual Studio 12!) ;P
Step :
Preparing the Project
3
# Cmake will show you some build options:
• BUILD: set what gonna be built.
• WITH: The library takes advantage of others technologies like CUDA.
• INSTALL: Which files will be put in the installation folder.
• CMAKE/CMAKE_INSTAL_PREFIX:
Set the default installation folder.
# After choosing, click Configure button
again. If everything is OK, all the red
background will disappear.
# Finally, click in the Generate button.
Step :
Preparing the Project
3
My Options:
BUILDING THE PROJECT
# Go to the build folder and open the Visual Studio Solution (Opencv.sln)
# Select the build mode (1) and then build the project ALL_BUILD (2). (This step will build all
the projects shown in the Solution Explorer Guide)
# If no errors occurs, build the INSTALL project (3). (Installs the artifacts)
Step :
Building the Project
4
(1)
(2)
(3)
# Copy all the .dll in {INSTALL_DIRECTORY} x64vc12bin to:
• C:WindowsSystem32 if the library was built in x64
• C:WindowsSysWOW64 if the library was built in x86
# At this point, you can run any sample and it should works without error.
# Copy all files in {INSTALL_DIRECTORY} x64vc12lib to
{VISUALSTUDIO_DIRECTORY}VClib (x86) or {VISUALSTUDIO_DIRECTORY}VClibamd64
(x64)
# Copy the two folders in {INSTALL_DIRECTORY} include to
{VISUALSTUDIO_DIRECTORY}VCinclude
Step :
Installing the library
5
RUN THE SAMPLES
# You can run the examples from {INSTALL_DIRECTORY} x64vc12samples* and check if
everything is OK.
• Running cppcpp-example-delaunay2.exe:
Link Against the Library
# Create a new project (CTRL+SHIFT+N).
# Go to DEBUG > {projectName} Properties (Alt + F7)
# List the modules’ name you need in Linker > Input > Additional Dependencies:
• Example:
Link Against the Library
# Create a cpp file (CTRL+SHIFT+A) and run it (CTRL+F5):
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <stdlib.h>
#include <stdio.h>
using namespace cv;
/** @function main */
int main(int argc, char** argv)
{
Mat src, src_gray, dst;
int kernel_size = 3;
int scale = 1;
int delta = 0;
int ddepth = CV_16S;
char* window_name = "Laplace Demo";
/// Load your image
src = imread("myImage.jpg");
if (!src.data)
{
return -1;
}
/// Remove noise by blurring with a Gaussian filter
GaussianBlur(src, src, Size(3, 3), 0, 0, BORDER_DEFAULT);
/// Convert the image to grayscale
cvtColor(src, src_gray, COLOR_RGB2GRAY);
/// Create window
namedWindow(window_name, WINDOW_AUTOSIZE);
/// Apply Laplace function
Mat abs_dst;
Laplacian(src_gray, dst, ddepth, kernel_size, scale, delta, BORDER_DEFAULT);
convertScaleAbs(dst, abs_dst);
/// Show what you got
imshow(window_name, abs_dst);
waitKey(0);
return 0;
}
The Result
Ref: http://docs.opencv.org/doc/tutorials/imgproc/imgtrans/laplace_operator/laplace_operator.html
Need Help?
# The Official Documentation:
• http://www.teste.com
# The Stackoverflow Community:
• http://stackoverflow.com/questions/tagged/opencv
# OpenCV’s Install Guide:
• http://docs.opencv.org/trunk/doc/tutorials/introduction/windows_install/windows_install.html
# This Great Book: ;)
OpenCV Computer Vision Application Programming Cookbook (2nd Edition),
Robert Laganiere.
ISBN-13: 9781782161486
Publisher: Packt Publishing
Publication date: 8/1/2014
Pages: 390

Contenu connexe

Tendances

Computer Vision, Deep Learning, OpenCV
Computer Vision, Deep Learning, OpenCVComputer Vision, Deep Learning, OpenCV
Computer Vision, Deep Learning, OpenCVFarshid Pirahansiah
 
Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)DroidConTLV
 
Android Native Development Kit
Android Native Development KitAndroid Native Development Kit
Android Native Development KitPeter R. Egli
 
Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)Xavier Hallade
 
Better Code: Concurrency
Better Code: ConcurrencyBetter Code: Concurrency
Better Code: ConcurrencyPlatonov Sergey
 
Introduction to the Android NDK
Introduction to the Android NDKIntroduction to the Android NDK
Introduction to the Android NDKBeMyApp
 
DLL Design with Building Blocks
DLL Design with Building BlocksDLL Design with Building Blocks
DLL Design with Building BlocksMax Kleiner
 
Native code in Android applications
Native code in Android applicationsNative code in Android applications
Native code in Android applicationsDmitry Matyukhin
 
Verilator: Fast, Free, But for Me?
Verilator: Fast, Free, But for Me? Verilator: Fast, Free, But for Me?
Verilator: Fast, Free, But for Me? DVClub
 
On technology transfer: experience from the CARP project... and beyond
On technology transfer: experience from the CARP project... and beyondOn technology transfer: experience from the CARP project... and beyond
On technology transfer: experience from the CARP project... and beyonddividiti
 
Objective-C Runtime overview
Objective-C Runtime overviewObjective-C Runtime overview
Objective-C Runtime overviewFantageek
 
Functional Reactive Programming on Android
Functional Reactive Programming on AndroidFunctional Reactive Programming on Android
Functional Reactive Programming on AndroidSam Lee
 
Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014Paris Android User Group
 

Tendances (20)

OpenCV Workshop
OpenCV WorkshopOpenCV Workshop
OpenCV Workshop
 
Computer Vision, Deep Learning, OpenCV
Computer Vision, Deep Learning, OpenCVComputer Vision, Deep Learning, OpenCV
Computer Vision, Deep Learning, OpenCV
 
Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)
 
NDK Introduction
NDK IntroductionNDK Introduction
NDK Introduction
 
Android ndk
Android ndkAndroid ndk
Android ndk
 
Android Native Development Kit
Android Native Development KitAndroid Native Development Kit
Android Native Development Kit
 
Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)
 
Better Code: Concurrency
Better Code: ConcurrencyBetter Code: Concurrency
Better Code: Concurrency
 
Android NDK
Android NDKAndroid NDK
Android NDK
 
Android ndk: Entering the native world
Android ndk: Entering the native worldAndroid ndk: Entering the native world
Android ndk: Entering the native world
 
Introduction to the Android NDK
Introduction to the Android NDKIntroduction to the Android NDK
Introduction to the Android NDK
 
DLL Design with Building Blocks
DLL Design with Building BlocksDLL Design with Building Blocks
DLL Design with Building Blocks
 
Native code in Android applications
Native code in Android applicationsNative code in Android applications
Native code in Android applications
 
Verilator: Fast, Free, But for Me?
Verilator: Fast, Free, But for Me? Verilator: Fast, Free, But for Me?
Verilator: Fast, Free, But for Me?
 
On technology transfer: experience from the CARP project... and beyond
On technology transfer: experience from the CARP project... and beyondOn technology transfer: experience from the CARP project... and beyond
On technology transfer: experience from the CARP project... and beyond
 
Objective-C Runtime overview
Objective-C Runtime overviewObjective-C Runtime overview
Objective-C Runtime overview
 
Functional Reactive Programming on Android
Functional Reactive Programming on AndroidFunctional Reactive Programming on Android
Functional Reactive Programming on Android
 
Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014
 
Modern c++
Modern c++Modern c++
Modern c++
 
Android JNI
Android JNIAndroid JNI
Android JNI
 

En vedette

PyCon 2012: Militarizing Your Backyard: Computer Vision and the Squirrel Hordes
PyCon 2012: Militarizing Your Backyard: Computer Vision and the Squirrel HordesPyCon 2012: Militarizing Your Backyard: Computer Vision and the Squirrel Hordes
PyCon 2012: Militarizing Your Backyard: Computer Vision and the Squirrel Hordeskgrandis
 
OpenCV 3.0 - Latest news and the Roadmap
OpenCV 3.0 - Latest news and the RoadmapOpenCV 3.0 - Latest news and the Roadmap
OpenCV 3.0 - Latest news and the RoadmapEugene Khvedchenya
 
Object detection
Object detectionObject detection
Object detectionSomesh Vyas
 
Raspberry jam bogota 2016 - Raspberry Pi en el movimiento maker y la educacion
Raspberry jam bogota 2016 - Raspberry Pi en el movimiento maker y la educacionRaspberry jam bogota 2016 - Raspberry Pi en el movimiento maker y la educacion
Raspberry jam bogota 2016 - Raspberry Pi en el movimiento maker y la educacionjaviertecteos
 
Open Cv 2005 Q4 Tutorial
Open Cv 2005 Q4 TutorialOpen Cv 2005 Q4 Tutorial
Open Cv 2005 Q4 Tutorialantiw
 
Raspberry jam Bogota 2016 - Sistema de visión artificial aplicados a procesos...
Raspberry jam Bogota 2016 - Sistema de visión artificial aplicados a procesos...Raspberry jam Bogota 2016 - Sistema de visión artificial aplicados a procesos...
Raspberry jam Bogota 2016 - Sistema de visión artificial aplicados a procesos...javiertecteos
 
Using openCV 2.0 with Dev C++
Using openCV 2.0 with Dev C++Using openCV 2.0 with Dev C++
Using openCV 2.0 with Dev C++Wei-Wen Hsu
 
이기종 멀티코어 기반의 Open cv 응용 사례 및 효율적인 어플리케이션 디자인
이기종 멀티코어 기반의 Open cv 응용 사례 및 효율적인 어플리케이션 디자인이기종 멀티코어 기반의 Open cv 응용 사례 및 효율적인 어플리케이션 디자인
이기종 멀티코어 기반의 Open cv 응용 사례 및 효율적인 어플리케이션 디자인Seunghwa Song
 
Что-то с памятью моей стало… Сколько стоит доступ в память, и что с этим дела...
Что-то с памятью моей стало… Сколько стоит доступ в память, и что с этим дела...Что-то с памятью моей стало… Сколько стоит доступ в память, и что с этим дела...
Что-то с памятью моей стало… Сколько стоит доступ в память, и что с этим дела...Ontico
 
Basic openCV Functions Using CPP
Basic openCV Functions Using CPPBasic openCV Functions Using CPP
Basic openCV Functions Using CPPWei-Wen Hsu
 
Face Recognition with OpenCV and scikit-learn
Face Recognition with OpenCV and scikit-learnFace Recognition with OpenCV and scikit-learn
Face Recognition with OpenCV and scikit-learnShiqiao Du
 
Installing Python on Mac
Installing Python on MacInstalling Python on Mac
Installing Python on MacWei-Wen Hsu
 
Running openCV project on Mac OS
Running openCV project on Mac OSRunning openCV project on Mac OS
Running openCV project on Mac OSWei-Wen Hsu
 
Concise Notes on Python
Concise Notes on PythonConcise Notes on Python
Concise Notes on PythonWei-Wen Hsu
 
10 color image processing
10 color image processing10 color image processing
10 color image processingbabak danyal
 

En vedette (20)

PyCon 2012: Militarizing Your Backyard: Computer Vision and the Squirrel Hordes
PyCon 2012: Militarizing Your Backyard: Computer Vision and the Squirrel HordesPyCon 2012: Militarizing Your Backyard: Computer Vision and the Squirrel Hordes
PyCon 2012: Militarizing Your Backyard: Computer Vision and the Squirrel Hordes
 
OpenCV 3.0 - Latest news and the Roadmap
OpenCV 3.0 - Latest news and the RoadmapOpenCV 3.0 - Latest news and the Roadmap
OpenCV 3.0 - Latest news and the Roadmap
 
Object detection
Object detectionObject detection
Object detection
 
Raspberry jam bogota 2016 - Raspberry Pi en el movimiento maker y la educacion
Raspberry jam bogota 2016 - Raspberry Pi en el movimiento maker y la educacionRaspberry jam bogota 2016 - Raspberry Pi en el movimiento maker y la educacion
Raspberry jam bogota 2016 - Raspberry Pi en el movimiento maker y la educacion
 
Open Cv 2005 Q4 Tutorial
Open Cv 2005 Q4 TutorialOpen Cv 2005 Q4 Tutorial
Open Cv 2005 Q4 Tutorial
 
Lec2
Lec2Lec2
Lec2
 
Raspberry jam Bogota 2016 - Sistema de visión artificial aplicados a procesos...
Raspberry jam Bogota 2016 - Sistema de visión artificial aplicados a procesos...Raspberry jam Bogota 2016 - Sistema de visión artificial aplicados a procesos...
Raspberry jam Bogota 2016 - Sistema de visión artificial aplicados a procesos...
 
Visual Search
Visual SearchVisual Search
Visual Search
 
Using openCV 2.0 with Dev C++
Using openCV 2.0 with Dev C++Using openCV 2.0 with Dev C++
Using openCV 2.0 with Dev C++
 
Introduction to OpenCV
Introduction to OpenCVIntroduction to OpenCV
Introduction to OpenCV
 
Deep Learning
Deep LearningDeep Learning
Deep Learning
 
이기종 멀티코어 기반의 Open cv 응용 사례 및 효율적인 어플리케이션 디자인
이기종 멀티코어 기반의 Open cv 응용 사례 및 효율적인 어플리케이션 디자인이기종 멀티코어 기반의 Open cv 응용 사례 및 효율적인 어플리케이션 디자인
이기종 멀티코어 기반의 Open cv 응용 사례 및 효율적인 어플리케이션 디자인
 
Что-то с памятью моей стало… Сколько стоит доступ в память, и что с этим дела...
Что-то с памятью моей стало… Сколько стоит доступ в память, и что с этим дела...Что-то с памятью моей стало… Сколько стоит доступ в память, и что с этим дела...
Что-то с памятью моей стало… Сколько стоит доступ в память, и что с этим дела...
 
Basic openCV Functions Using CPP
Basic openCV Functions Using CPPBasic openCV Functions Using CPP
Basic openCV Functions Using CPP
 
Face Recognition with OpenCV and scikit-learn
Face Recognition with OpenCV and scikit-learnFace Recognition with OpenCV and scikit-learn
Face Recognition with OpenCV and scikit-learn
 
Installing Python on Mac
Installing Python on MacInstalling Python on Mac
Installing Python on Mac
 
OpenCV Introduction
OpenCV IntroductionOpenCV Introduction
OpenCV Introduction
 
Running openCV project on Mac OS
Running openCV project on Mac OSRunning openCV project on Mac OS
Running openCV project on Mac OS
 
Concise Notes on Python
Concise Notes on PythonConcise Notes on Python
Concise Notes on Python
 
10 color image processing
10 color image processing10 color image processing
10 color image processing
 

Similaire à Guide: How to Build OpenCV 3.0.0

How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocksTech Bikram
 
A "Box" Full of Tools and Distros
A "Box" Full of Tools and DistrosA "Box" Full of Tools and Distros
A "Box" Full of Tools and DistrosDario Faggioli
 
From Zero to Hero - All you need to do serious deep learning stuff in R
From Zero to Hero - All you need to do serious deep learning stuff in R From Zero to Hero - All you need to do serious deep learning stuff in R
From Zero to Hero - All you need to do serious deep learning stuff in R Kai Lichtenberg
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'acorehard_by
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Ambassador Labs
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...Ambassador Labs
 
Kinect Workshop Part 1/2
Kinect Workshop Part 1/2Kinect Workshop Part 1/2
Kinect Workshop Part 1/2Seiya Konno
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandTroublemaker Khunpech
 
DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and YouBalaBit
 
Machine learning in cybersecutiry
Machine learning in cybersecutiryMachine learning in cybersecutiry
Machine learning in cybersecutiryVishwas N
 
Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Asher Martin
 
openGl configuration_in visual studio 2019.pptx
openGl configuration_in visual studio 2019.pptxopenGl configuration_in visual studio 2019.pptx
openGl configuration_in visual studio 2019.pptxMuhammadUmer787617
 
codeblocks-instructions.pdf
codeblocks-instructions.pdfcodeblocks-instructions.pdf
codeblocks-instructions.pdfRavinderKSingla
 
Kinect installation guide
Kinect installation guideKinect installation guide
Kinect installation guidegilmsdn
 

Similaire à Guide: How to Build OpenCV 3.0.0 (20)

How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocks
 
Smiley033
Smiley033Smiley033
Smiley033
 
Android studio
Android studioAndroid studio
Android studio
 
A "Box" Full of Tools and Distros
A "Box" Full of Tools and DistrosA "Box" Full of Tools and Distros
A "Box" Full of Tools and Distros
 
From Zero to Hero - All you need to do serious deep learning stuff in R
From Zero to Hero - All you need to do serious deep learning stuff in R From Zero to Hero - All you need to do serious deep learning stuff in R
From Zero to Hero - All you need to do serious deep learning stuff in R
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
 
Kinect Workshop Part 1/2
Kinect Workshop Part 1/2Kinect Workshop Part 1/2
Kinect Workshop Part 1/2
 
C++Basics2022.pptx
C++Basics2022.pptxC++Basics2022.pptx
C++Basics2022.pptx
 
Cpb2010
Cpb2010Cpb2010
Cpb2010
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
Docker Starter Pack
Docker Starter PackDocker Starter Pack
Docker Starter Pack
 
DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and You
 
Machine learning in cybersecutiry
Machine learning in cybersecutiryMachine learning in cybersecutiry
Machine learning in cybersecutiry
 
Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3
 
openGl configuration_in visual studio 2019.pptx
openGl configuration_in visual studio 2019.pptxopenGl configuration_in visual studio 2019.pptx
openGl configuration_in visual studio 2019.pptx
 
Programming
ProgrammingProgramming
Programming
 
codeblocks-instructions.pdf
codeblocks-instructions.pdfcodeblocks-instructions.pdf
codeblocks-instructions.pdf
 
Kinect installation guide
Kinect installation guideKinect installation guide
Kinect installation guide
 

Dernier

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Dernier (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Guide: How to Build OpenCV 3.0.0

  • 2. WHO I AM ... # My name is André de Souza Moreira; # Msc. Candidate at PUC-RIO; # Researcher at Instituto Tecgraf in Computer Graphics; # Before: Researcher at NCA in Medical Image Processing. andredsm.com
  • 3. WHAT IS OPENCV? # It’s an open source library written in C++ for computer vision. # It was originally designed by Intel. # There are several bidings to others languagens like Python and Java. # Runs on Windows, Android, Linux, OS X and others. # Offers CUDA and OpenCL Interface. # Its last release version is 2.4.9 but you can acquire 3.0.0 version (under development) on github (June, 2014).
  • 4. GOALS # Making a simple building of OpenCV 3.0.0 with Visual Studio 2013; # Running an OpenCV example; # Linking the library against a new project in Visual Studio 2013.
  • 6. Step : Get the Source Code # Available at https://github.com/Itseez/opencv # Option 1: Download directly from the website 1
  • 7. Step : Get the Source COde # Option 2: Clone the git repository: # The advantage of this method consists of tracking changes from the original repository. So, you can rebuild the library whenever there is a new feature... 1 $ git clone git@github.com:Itseez/opencv.git
  • 8. Step : Install dependencies # There are a lot dependencies you can use in opencv building, such as: Qt, Python, Opengl, pdflatex to generate the documentation, CUDA, OpenCL and others... # For example, you can install the python 2.7.x and numpy in order to build python wrapper. 2
  • 9. # Install the Cmake Tool • Available on http://www.cmake.org/ # Open cmake-gui, configure where the library’s source code is (1) and where the project’s files will be generated (2). Finally, click in Configure button (3). Step : Preparing the Project 3 (1) (2) (3)
  • 10. # Select the project that will be generated. • In our case is Visual Studio 2013. (No, I did not choose the wrong option, the generator for Visual Studio 2013 is really called Visual Studio 12!) ;P Step : Preparing the Project 3
  • 11. # Cmake will show you some build options: • BUILD: set what gonna be built. • WITH: The library takes advantage of others technologies like CUDA. • INSTALL: Which files will be put in the installation folder. • CMAKE/CMAKE_INSTAL_PREFIX: Set the default installation folder. # After choosing, click Configure button again. If everything is OK, all the red background will disappear. # Finally, click in the Generate button. Step : Preparing the Project 3
  • 14. # Go to the build folder and open the Visual Studio Solution (Opencv.sln) # Select the build mode (1) and then build the project ALL_BUILD (2). (This step will build all the projects shown in the Solution Explorer Guide) # If no errors occurs, build the INSTALL project (3). (Installs the artifacts) Step : Building the Project 4 (1) (2) (3)
  • 15. # Copy all the .dll in {INSTALL_DIRECTORY} x64vc12bin to: • C:WindowsSystem32 if the library was built in x64 • C:WindowsSysWOW64 if the library was built in x86 # At this point, you can run any sample and it should works without error. # Copy all files in {INSTALL_DIRECTORY} x64vc12lib to {VISUALSTUDIO_DIRECTORY}VClib (x86) or {VISUALSTUDIO_DIRECTORY}VClibamd64 (x64) # Copy the two folders in {INSTALL_DIRECTORY} include to {VISUALSTUDIO_DIRECTORY}VCinclude Step : Installing the library 5
  • 16. RUN THE SAMPLES # You can run the examples from {INSTALL_DIRECTORY} x64vc12samples* and check if everything is OK. • Running cppcpp-example-delaunay2.exe:
  • 17. Link Against the Library # Create a new project (CTRL+SHIFT+N). # Go to DEBUG > {projectName} Properties (Alt + F7) # List the modules’ name you need in Linker > Input > Additional Dependencies: • Example:
  • 18. Link Against the Library # Create a cpp file (CTRL+SHIFT+A) and run it (CTRL+F5): #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/opencv.hpp> #include <stdlib.h> #include <stdio.h> using namespace cv; /** @function main */ int main(int argc, char** argv) { Mat src, src_gray, dst; int kernel_size = 3; int scale = 1; int delta = 0; int ddepth = CV_16S; char* window_name = "Laplace Demo"; /// Load your image src = imread("myImage.jpg"); if (!src.data) { return -1; } /// Remove noise by blurring with a Gaussian filter GaussianBlur(src, src, Size(3, 3), 0, 0, BORDER_DEFAULT); /// Convert the image to grayscale cvtColor(src, src_gray, COLOR_RGB2GRAY); /// Create window namedWindow(window_name, WINDOW_AUTOSIZE); /// Apply Laplace function Mat abs_dst; Laplacian(src_gray, dst, ddepth, kernel_size, scale, delta, BORDER_DEFAULT); convertScaleAbs(dst, abs_dst); /// Show what you got imshow(window_name, abs_dst); waitKey(0); return 0; }
  • 20. Need Help? # The Official Documentation: • http://www.teste.com # The Stackoverflow Community: • http://stackoverflow.com/questions/tagged/opencv # OpenCV’s Install Guide: • http://docs.opencv.org/trunk/doc/tutorials/introduction/windows_install/windows_install.html # This Great Book: ;) OpenCV Computer Vision Application Programming Cookbook (2nd Edition), Robert Laganiere. ISBN-13: 9781782161486 Publisher: Packt Publishing Publication date: 8/1/2014 Pages: 390