OpenCV Tutorial. Part I Using OpenCV with Microsoft Visual Studio.net 2003. 28 November 2005. Gavin S Page gsp8334@cs.rit.edu



Similar documents
APPLICATION NOTE. Getting Started with pylon and OpenCV

Visual Studio 2008 Express Editions

Microsoft Visual Studio 2010 Instructions For C Programs

Appendix K Introduction to Microsoft Visual C++ 6.0

Generating Visual Studio Project Files

The full setup includes the server itself, the server control panel, Firebird Database Server, and three sample applications with source code.

Using Microsoft Visual Studio API Reference

Creating a Simple Visual C++ Program

DE4 NetFPGA Packet Generator Design User Guide

How To Deploy Office 2016 With Office 2016 Deployment Tool

How to deploy fonts using Configuration Manager 2012 R2

Developing, Deploying, and Debugging Applications on Windows Embedded Standard 7

Lazy OpenCV installation and use with Visual Studio

Compiler Setup and DirectX/OpenGL Setup

Drawing Text with SDL

Practice Fusion API Client Installation Guide for Windows

Using Visual C++ and Pelles C

Inteset Secure Lockdown ver. 2.0

Eclipse installation, configuration and operation

2. Installation Instructions - Windows (Download)

Word basics. Before you begin. What you'll learn. Requirements. Estimated time to complete:


Eliminate Memory Errors and Improve Program Stability

INTERNAL USE ONLY (Set it to white if you do not need it)

William Paterson University Department of Computer Science. Microsoft Visual C++.NET Tutorial Spring 2006 Release 1.0

MS Visual C++ Introduction. Quick Introduction. A1 Visual C++

INTERNAL USE ONLY (Set it to white if you do not need it)

Appendix M: Introduction to Microsoft Visual C Express Edition

What's New in BarTender 2016

DEPLOYING A VISUAL BASIC.NET APPLICATION

Junk Settings. Options

Introduction to the use of the environment of Microsoft Visual Studio 2008

OneNote 2016 Tutorial

Chapter 1: Getting Started

Programming with the Dev C++ IDE

Technical Bulletin. SQL Express Backup Utility

SonicWALL CDP 5.0 Microsoft Exchange InfoStore Backup and Restore

Instructions for setting up Junk E mail filters

Notepad++ The COMPSCI 101 Text Editor for Windows. What is a text editor? Install Python 3

MS SQL Express installation and usage with PHMI projects

How to use the VMware Workstation / Player to create an ISaGRAF (Ver. 3.55) development environment?

Tutorial on OpenCV for Android Setup

In This Issue: Introducing Outlook Outlook Today Navigation Pane

Embroidery Fonts Plus ( EFP ) Tutorial Guide Version

PEARL SETUP FOR ACCESS 2007 AND ACCESS 2010

McAfee Host Intrusion Prevention Patch 6 Software

Using CPLEX with Microsoft Visual C++

Quick Reference Guide

Witango Application Server 6. Installation Guide for Windows

BitDefender Security for Exchange

Intel Power Gadget 2.0 Monitoring Processor Energy Usage

How to Compile, Link, and Execute C or C++ Codes Using Microsoft Visual C++

Downloading Your Financial Statements to Excel

Part A: Introduction to Excel VBA

How to Configure Terminal Services for Pro-Watch in Remote Administration Mode (Windows 2000)

Microsoft PowerPoint 2011

Intel Perceptual Computing SDK My First C++ Application

DocumentsCorePack for MS CRM 2011 Implementation Guide

Como configurar o IIS Server para ACTi NVR Enterprise

1 Using CWEB with Microsoft Visual C++ CWEB INTRODUCTION 1

Getting Started with IVI Drivers

Tutorial 5: Developing Java applications

3 IDE (Integrated Development Environment)

Installing and Configuring SQL Express 2008 R2 for Supply Chain Guru

Jolly Server Getting Started Guide

TxEIS on Internet Explorer 7

Database Linker Tutorial

Outlook basics. Identify user interface elements that you can use to accomplish basic tasks.

User Guide. SysMan Utilities. By Sysgem AG

TUTORIAL 4 Building a Navigation Bar with Fireworks

Creating Dynamics User Model Dynamic Linked Library (DLL) for Various PSS E Versions

Importing Custom Reports and Dashboard In OnCommand Report

ONBASE OUTLOOK CLIENT GUIDE for 2010 and 2013

Microsoft Windows Movie Maker

Integrated Virtual Debugger for Visual Studio Developer s Guide VMware Workstation 8.0

How to Install Eclipse. Windows

Operating Instructions /10.14

Get an Easy Performance Boost Even with Unthreaded Apps. with Intel Parallel Studio XE for Windows*

Introduction. Before you begin. Installing efax from our CD-ROM. Installing efax after downloading from the internet

GETTING STARTED WITH FLEXI-CLOUD

Backup / migration of a Coffalyser.Net database

Mitigation Planning Portal (MPP) Tutorial Canned Reports Updated 5/18/2015

Registry Tuner. Software Manual

Setting Up ALERE with Client/Server Data

SCUt ils SmartAssign Guide Solution for Microsoft System Center 2012 Service Manager

1 Intel Smart Connect Technology Installation Guide:

Monitoring Oracle Enterprise Performance Management System Release Deployments from Oracle Enterprise Manager 12c

CROWNPEAK C# API SYSTEM CONFIGURATION GUIDE VERSION 3.0.1

From Data Modeling to Data Dictionary Written Date : January 20, 2014

Configuring and Integrating Oracle

Excel basics. Before you begin. What you'll learn. Requirements. Estimated time to complete:

PCSpim Tutorial. Nathan Goulding-Hotta v0.1

Administrator s Plus. Backup Process. A Get Started Guide

Step 2: Open the ODBC Data Source Administrator Panel

Transcription:

OpenCV Tutorial Part I Using OpenCV with Microsoft Visual Studio.net 2003 28 November 2005 Gavin S Page

OpenCV What is OpenCV? (from the documentation) OpenCV means Intel Open Source Computer Vision Library. It is a collection of C functions and a few C++ classes that implement some popular Image Processing and Computer Vision algorithms. The key features (from the documentation) Cross-Platform API of C functions FREE for commercial and noncommercial uses What this means You can take advantage of high speed implementations of functions commonly used in Computer Vision/Image Processing. 2

OpenCV How to obtain the library Available on Sourceforge http://sourceforge.net/projects/opencvlibrary/ (Or use your favorite search engine) How to install the library (On Windows) Download and Install the Executable 3

Configuring MSVS.net 2k3 Upon loading Visual Studio it is recommended that you adjust the profile to that of Visual C++ Developer. This will help keep things straight when I reference keyboard shortcuts later on. 4

Configuring MSVS.net 2k3 Creating the Project A project is initially created by selecting: File -> New -> Project Create a Win32 Console Project Make it an Empty Project by selecting the box under Application Settings 5

Configuring MSVS.net 2k3 Create the First File Right Click the Source Files Folder under the project name ( Tutorial in this case) Add -> Add new Item Select C++ file and give it a name Creating a file makes it possible to set Additional Include Directives in the C/C++ pane under the project properties. 6

Configuring MSVS.net 2k3 In order to build projects using OpenCV the required libraries and directives must be included in the project s properties Open the Properties Pane Right Click the name of the project and select Properties ( Tutorial in this case) 7

Configuring MSVS.net 2k3 Set Additional Include Directives Under the C/C++ tab select General Select the Additional Include Directives Add the full path to each of the folders which contain.h files required to use OpenCV Be sure to include trailing \ Utilized Directives C:\Program Files\OpenCV\cvaux\include\ C:\Program Files\OpenCV\cxcore\include\ C:\Program Files\OpenCV\cv\include\ C:\Program Files\OpenCV\otherlibs\highgui\ C:\Program Files\OpenCV\otherlibs\cvcam\include\ 8

Configuring MSVS.net 2k3 Set Additional Dependencies Under the Linker tab select Input Select the Additional Dependencies Add the full path to each of the.lib files required to use OpenCV Be sure to keep the paths in quotes Utilized Dependencies "C:\Program Files\OpenCV\lib\cv.lib "C:\Program Files\OpenCV\lib\cvaux.lib "C:\Program Files\OpenCV\lib\cxcore.lib "C:\Program Files\OpenCV\lib\cvcam.lib "C:\Program Files\OpenCV\lib\highgui.lib" 9

Testing MSVS.net 2k3 Now that the environment is configured it would be a good idea to test it to make sure that a program will correctly build and run. Testing the First Program The enclosed code can be cut and pasted into the file created in the project space to test OpenCV #include <cv.h> #include <highgui.h> /* This will pop up a small box with "Hello World" as the text. @author: Gavin Page, @date: 28 November 2005 */ int main( int argc, char** argv ) { //declare for the height and width of the image int height = 320; int width = 240; //specify the point to place the text CvPoint pt = cvpoint( height/4, width/2 ); //Create an 8 bit, 3 plane image IplImage* hw = cvcreateimage(cvsize(height, width), 8, 3); //initialize the font CvFont font; cvinitfont( &font, CV_FONT_HERSHEY_COMPLEX, 1.0, 1.0, 0, 1, CV_AA); //place the text on the image using the font cvputtext(hw, "Hello World", pt, &font, CV_RGB(150, 0, 0) ); //create the window container cvnamedwindow("hello World", 0); //display the image in the container cvshowimage("hello World", hw); //hold the output windows cvwaitkey(0); return 0; } 10

Testing MSVS.net 2k3 Building the Program The program is built by selecting: Build -> Build Solution Or by pressing F7 Running the Program The program is run by selecting: Debug -> {Start Start without Debugging} Or by pressing F5 or <Ctrl>-F5 Output of Program 11

At this point you should have a working OpenCV project. If the program is not working you should go back and carefully recheck the steps. From here you can explore the documentation to review the functions available. There are also a number of tutorials on the web including: http://www.site.uottawa.ca/~laganier/tutorial/opencv+directshow/ cvision.htm http://www.softintegration.com/products/thirdparty/opencv/demo s/ Or you can just search for them For code examples there are several example programs included in the OpenCV distribution in OpenCV/samples You should also join the OpenCV Community located at: http://groups.yahoo.com/group/opencv/ As of today there are >15000 members available to answer questions. There is also a searchable message board where you can look up previous queries. 12

Revision History Initial Creation: 28 November 2005 13