PART I - A very brief introduction

Size: px
Start display at page:

Download "PART I - A very brief introduction"

Transcription

1 Università del Salento Facoltà di Ingegneria Image Processing (Elaborazione delle Immagini) A.A. 2013/2014 PART I - A very brief introduction Dario Cazzato, INO CNR dario.cazzato@unisalento.it dario.cazzato@ino.it

2 } What is OpenCV? } Installation } Key Concepts of the library } Examples Source Code Only notes and doc snapshots here } Resources } Study cases in the next lesson } Our (INO-CNR) activities, trends, hot topics in research in the third part

3 } This is not a guide. } This is not a complete tutorial. } This is not enough for your project. } At the end of this lesson, you will know something about this very wide environment, something about the philosophy behind, and will see some beginners application. } The next part will cover real examples. } Presentation + OpenCV code.

4

5

6 } Open Source Computer Vision Library. } It s an open source (BSD License) library for image processing. } Written in optimized C. } It runs on Linux, Windows, Mac OS. } Developed by Intel: Completely free Intel s Integrated Performance Primitives (IPP) libraries with fee

7 } Intel IPP provides high performance low-level routines for audio, video, imaging, cryptography, signal processing and codecs. } Customers need to have the Intel IPP binaries installed in order to take advantage of the Intel IPP optimizations. Otherwise, all the functionality is implemented by the OpenCV open source code. } Anyway, IPPs are loaded at run-time. } Intel Integrated Performance Primitives 8.0: $199 (commercial use) / $99 (academic use)

8 } MIT Media Lab had well-developed and internally open computer vision infrastructures, code that was passed from student to student. } 1999: OpenCV Project Started. } 2000: The first alpha version of OpenCV was released to the public at the IEEE Conference on Computer Vision and Pattern Recognition. } 2006: The first 1.0 version was released. } 2008: Willow Garage corporate support. } 2009, September: OpenCV v2.0, major changes to the C++ interface (think to Memory Management!). } 2010, April: OpenCV v2.1. } Today: OpenCV v2.4.6, Mobile, CUDA, Kinect.

9 } Strong focus on real-time applications. } Library for C/C++. } Only? NO! Python, Java... } Linux, Windows, Mac OS Android, ios. } Necessary Restyling : OpenCV v2.4. Some problem getting up-to-date material. Some problem looking for solutions surfing forums. } Solution: Learn the new syntax, but be able to fully understand the old one.

10 } OpenCV Modules: cv (Main OpenCV functions); cvaux (Auxiliary OpenCV functions); cxcore (Data structures and linear algebra support); highgui (GUI functions). } Just use the full documentation! All the objects are explained. Several tutorials are available (growing section!). User Guide for a first usage. Android, ios Reference. Old version full documented.

11 } } } } } } } } core - a compact module defining basic data structures, including the dense multi-dimensional array Mat and basic functions used by all other modules. imgproc - an image processing module that includes linear and nonlinear image filtering, geometrical image transformations (resize, affine and perspective warping, generic table-based remapping), color space conversion, histograms, and so on. video - a video analysis module that includes motion estimation, background subtraction, and object tracking algorithms. calib3d - basic multiple-view geometry algorithms, single and stereo camera calibration, object pose estimation, stereo correspondence algorithms, and elements of 3D reconstruction. features2d - salient feature detectors, descriptors, and descriptor matchers. objdetect - detection of objects and instances of the predefined classes (for example, faces, eyes, mugs, people, cars, and so on). highgui - an easy-to-use interface to video capturing, image and video codecs, as well as simple UI capabilities. gpu - GPU-accelerated algorithms from different OpenCV modules.

12 } Two applications from the web:

13

14 } On Windows: Run the EXE and choose the Path; Include the libraries to your project; Configure your favourite IDE (Visual Studio, Eclipse). } On Linux Install dependencies (search Google); Unpack the Tarball archive (*.tar.gz) in a folder like / <working_dir>/opencv-*/ ; Create a subfolder /release to run Cmake; Configure Cmake (cmake-gui); Launch the Install Script (sudo make install); Options for GCC: pkg-config --cflags - libs opencv (for g++ also); Link it to an IDE (Eclipse, Code::Blocks).

15

16 } On Macintosh, use the MacPort system: sudo port selfupdate; sudo port install opencv; OpenCV in /opt/local/ (default in Mac OS X 10.6); And then, include headers in your project or configure Xcode Look for tutorials based on your OS version. N.B.:You can use pkg-config to compile with g++

17

18

19 } All the OpenCV classes and functions are placed into the cv namespace. } So, these snippets are equivalent:

20 } Exceptions and error handling: C++ Style. Class cv::exception (derivative of std exception class). How to throw exception. 2 macros: CV_Error(errcode, description); CV_Assert(condition).

21 } Example: Example 1

22 } FOUNTAMDENTAL CLASS } No more hierarchies to learn (OpenCV v1.x)! } We see images. We talk about image processing. } Computers see matrixes. They use Matrix algebra to process data and OpenCV process instances of the Class Mat! } Two parts: Header (Fixed Size); Pointer to the Data (Variable Size). In real application, which is bigger?

23 } In image processing tasks, you need to pass a matrix to some function. } Solution to avoid time-consuming copies: Reference counter. Data can be shared between 2 matrices with their own header. When a copy is needed: Copy the header: fast! Copy the pointer to the matrix (NOT the matrix itself!) Reference counter is increased. When an header is cleared (user, scope, function ) Reference counter is decreased. The last survivor destroy the data.

24 } Will increment the counter: Mat MyMat1, Mat MyMat2; //declarations Mat MyMat1(MyMatSrc); //constructor Mat M1 = M2; //assigment - O(1), shared data Mat ROIMat(A, Rect(10,10,50,50)); //ROI } Will copy headers + data: Mat MyMat= A.clone(); A.copyTo(MyMat); Example 2

25 } No more nested loops to show data:

26 } Some parameter: rows The number of matrix rows cols The number of matrix columns size The matrix size: Size(cols, rows). Note that in the Size() constructor the number of rows and the number of columns go in the reverse order. type The matrix type, use CV_8UC1,..., CV_64FC4 to create 1-4 channel matrices, or CV_8UC(n),..., CV_64FC(n) to create multi-channel (up to CV_MAX_CN channels) matrices s The optional value to initialize each matrix element with. To set all the matrix elements to the particular value after the construction, use the assignment operator Mat::operator=(const Scalar& value). data Pointer to the user data. step The data buddy. This optional parameter specifies the number of bytes that each matrix row occupies. The value should include the padding bytes in the end of each row, if any. If the parameter is missing (set to cv::auto_step ), no padding is assumed and the actual step is calculated as cols*elemsize(), see Mat::elemSize (). img Pointer to the old-style IplImage image structure. By default, the data is shared between the original image and the new matrix, but when copydata is set, the full copy of the image data is created. expr Matrix expression. See Matrix Expressions.

27 } One of unsigned char, bool, signed char, unsigned short, signed short, int, float, double. } CV_<bit-depth>{U S F} C<number_of_channels>. } Examples: CV_8UC1: 8-bit single-channel matrix; CV_32FC2: 2-channel (i.e. complex) floating-point; cv::mat M(4,4,CV_32FC2,Scalar(1,3)): 4x4 complex matrix filled with 1+3j.

28

29 } List of depths: CV_8U: 8-bit unsigned integers (0..255) CV_8S: 8-bit signed integers ( ) CV_16U: 16-bit unsigned integers ( ) CV_16S: 16-bit signed integers ( ) CV_32S: 32-bit signed integers ( ) CV_32F: 32-bit floating-point numbers (-FLT_MAX..FLT_MAX, INF, NAN) CV_64F: 64-bit floating-point numbers (-DBL_MAX..DBL_MAX, INF, NAN)

30 } Example cv::mat img(size(320,240),cv_8uc3); } Create an image of size 320x240, 8-bit, 3- channels. } It s like having 3 2-D matrixes with values in the range [0,255] } RGB!

31

32 } Addition, subtration, negation: A+B, A-B, A+s, -A. } Scaling, multiplication, dot product: alpha*a, A*B, A.dot(B). } Transposition: A.t(). } Element-wise min,max, abs: min(a,b), max(a,b). } Advanced functions: Determinant, invert, trace, eigenvalues, LA solver Example 3

33 } Point: 2D point specified by x and y. Examples: Point2f, Point3i. Example: Point (stands for Point2i). If you initialize Point with float, the integer part will be taken. } Size: Used to specify the size of an image or a rectangle. 2 members: width, height. Examples: Size2i, Size2f, Size (stands for Size2i). Useful to create easy initializations.

34 } Rect: 2D rectangle. Specified by x,y, width, height, i.e. the top-left corner, the widht (from left to right), the height (from top to bottom). } Scalar: 4-elements vector. Used to pass pixel values. Derived from Vec.

35 } Vec:

36 } Many OpenCV functions process dense 2-dimensional or multidimensional numerical arrays. Usually, such functions take Mat as parameters, but in some cases it s more convenient to use std::vector<> (for a point set, for example) or Matx<> (for 3x3 homography matrix and such). To avoid many duplicates in the API, special proxy classes have been introduced. The base proxy class is InputArray. It is used for passing read-only arrays on a function input. The derived from InputArray class OutputArray is used to specify an output array for a function. Normally, you should not care of those intermediate types (and you should not declare variables of those types explicitly) - it will all just work automatically. You can assume that instead of InputArray/OutputArray you can always use Mat, std::vector<>, Matx<>, Vec<> or Scalar. When a function has an optional input or output array, and you do not have or do not want one, pass cv::noarray().

37 } CvMat: Multichannel 2D Matrix. cvmat* cvcreatemat(int rows, int cols, int type); Possible to create just the header or the data: cvcreatematheader(). cvcreatematdata(). You must release it! cvreleasemat(cvmat **mat);

38 } IplImage Foundamental! Theory is like cv::mat. See the reference for its syntax. Example: DEPTH.

39 Hierarchy: The three structures are related to each other by inheritance. It s not the C++ or Java inheritance. OpenCV was made using C, so there s no such concept. Anyway, their relation mimics inheritance.

40

41

42 } For the most of the C functions and structures from OpenCV v1.x you may find the direct counterparts in the new C++ interface. The name is usually formed by omitting cv or Cv prefix and turning the first letter to the low case (unless it s a own name, like Canny, Sobel etc). In case when there is no the new-style counterpart, it s possible to use the old functions with the new structures.

43 Let s see OpenCV in action!

44 } } Point stands for Point2i Use always the complete notation for readability! class RotatedRect Constructor:

45 } How to draw line

46 } How to draw rectangle

47 } How to manage (very quickly introduction!) windows imshow

48 } How to manage (very quickly introduction!) windows waitkey

49 } Mat imread(const string& filename, int flags = 1); Flags let you load already in grayscale! } bool imwrite(const string& filename, InputArray img, const vector<int>& params=vector<int>()) Params? } Old C prototypes: IplImage* cvloadimage(const char* filename, int iscolor=cv_load_image_color ) int cvsaveimage(const char* filename, const CvArr* image, const int* params=0 )

50

51 } Changing contrast of an image:

52

53 } Without going deep into details, how to invert a matrix? Use LU decomposition for a non-singualr matrix Use SVD for a singular (or even non-square) matrix

54 } } ROI: Region of interest, is a selected subset of samples within a dataset identified for a particular purpose (the boundaries of an object) Smoothing: blur, Gaussian, median, bilateral

55

56 but you can create also your own filter using the class BaseFilter, or using filter2d!

57

58

59

60

61

62

63

64

65 Alternative (maybe less modular, imagine to specify a method using xml, but probably easier to use and customize):

66 Note: you could also manually use the resize function

67

68

69 GPU?

70 } How to open a cam using OpenCV? Old struct: CvCapture: The structure CvCapture does not have public interface and is used only as a parameter for video capturing functions. CvCapture* cvcapturefromcam(int device) CvCapture* cvcapturefromfile(const char* filename) cvqueryframe: grabs a frame from camera or video file, decompresses and returns it. cvsetcaptureproperty to set properties The function cvreleasecapture releases the CvCapture allocated structure. New class: VideoCapture Constructor: VideoCapture::open VideoCapture::isOpened VideoCapture::release VideoCapture::set

71 } } VideoCapture::set bool VideoCapture::set(int propid, double value) cvsetcaptureproperty int cvsetcaptureproperty(cvcapture* capture, int property_id, double value)

72 } Classifier: CascadeClassifier to detect objects load to load classifier file (xml) detectmultiscale to perform detection } All details in:

73 } } } OpenCV already provides a long list of functions. The problems you ll find at the beginning, are the same problems the other beginners already had (and solved), use the web to look for their solutions and study them. Features that are not part OpenCV, are in third part libraries (mathematics, efficient data structures, more with matrixes, GUI ) PCL ( Boost ( Qt ( } Don t reinvent the wheel, but also try to be a wise user of the material!

74 } Books: Learning OpenCV: Computer Vision with the OpenCV Library (O Reilly). OpenCV 2 Computer Vision Application Programming Cookbook. The OpenCV Reference Manual:

75 } OpenCV Download: } OpenCV Documentation: } Yahoo! Group (> users), with a forum: } IEEE Conference on Computer Vision and Pattern Recognition (CVPR) } Youtube OpenCV Channel:

76 } Tutorials: } Tutorial about cv::mat (the first you should read after being able to write, compile and launch Hello World ): mat_the_basic_image_container/ mat_the_basic_image_container.html

77 } OpenCV with Android: android_binary_package/o4a_sdk.html } OpenCV with ios: table_of_content_ios/table_of_content_ios.html (trunk!) } Me: dario.cazzato@ino.it dario.cazzato@unisalento.it

LAB SESSION 1 INTRODUCTION TO OPENCV

LAB SESSION 1 INTRODUCTION TO OPENCV COMPUTER VISION AND IMAGE PROCESSING LAB SESSION 1 INTRODUCTION TO OPENCV DR. FEDERICO TOMBARI, DR. SAMUELE SALTI The OpenCV library Open Computer Vision Library: a collection of open source algorithms

More information

OpenCV. OpenCV Tutorials OpenCV User Guide OpenCV API Reference. docs.opencv.org. F. Xabier Albizuri

OpenCV. OpenCV Tutorials OpenCV User Guide OpenCV API Reference. docs.opencv.org. F. Xabier Albizuri OpenCV OpenCV Tutorials OpenCV User Guide OpenCV API Reference docs.opencv.org F. Xabier Albizuri - 2014 OpenCV Tutorials OpenCV Tutorials: Introduction to OpenCV The Core Functionality (core module) Image

More information

Visual Computing in OpenCV Lecture 2: Dense Matrices

Visual Computing in OpenCV Lecture 2: Dense Matrices Computer Vision Laboratory Visual Computing in OpenCV Lecture 2: Dense Matrices Michael Felsberg michael.felsberg@liu.se Johan Wiklund johan.wiklund@liu.se OpenCV Types Before looking into matrices, some

More information

Robot Vision Systems Lecture 3: Methods for Dense Matrices in OpenCV

Robot Vision Systems Lecture 3: Methods for Dense Matrices in OpenCV Computer Vision Laboratory Robot Vision Systems Lecture 3: Methods for Dense Matrices in OpenCV Michael Felsberg michael.felsberg@liu.se Further Methods Mat::diag(int d=0) (d0 lower half) Mat::convertTo(OutputArray,int

More information

OpenCV Introduction. CS 231a Spring April 15th, 2016

OpenCV Introduction. CS 231a Spring April 15th, 2016 OpenCV Introduction CS 231a Spring 2015-2016 April 15th, 2016 Overview 1. Introduction and Installation 2. Image Representation 3. Image Processing Introduction to OpenCV (3.1) Open source computer vision

More information

Multimedia Retrieval Exercise Course 2 Basic of Image Processing by OpenCV

Multimedia Retrieval Exercise Course 2 Basic of Image Processing by OpenCV Multimedia Retrieval Exercise Course 2 Basic of Image Processing by OpenCV Kimiaki Shirahama, D.E. Research Group for Pattern Recognition Institute for Vision and Graphics University of Siegen, Germany

More information

1. Introduction to the OpenCV library

1. Introduction to the OpenCV library Image Processing - Laboratory 1: Introduction to the OpenCV library 1 1. Introduction to the OpenCV library 1.1. Introduction The purpose of this laboratory is to acquaint the students with the framework

More information

OpenCV. Basics. Department of Electrical Engineering and Computer Science

OpenCV. Basics. Department of Electrical Engineering and Computer Science OpenCV Basics 1 OpenCV header file OpenCV namespace OpenCV basic structures Primitive data types Point_ Size_ Vec Scalar_ Mat Basics 2 OpenCV Header File #include .hpp is a convention

More information

Introduction to OpenCV. Marvin Smith

Introduction to OpenCV. Marvin Smith Introduction to OpenCV Marvin Smith Introduction OpenCV is an Image Processing library created by Intel and maintained by Willow Garage. Available for C, C++, and Python Newest update is version 2.2 Open

More information

Real-time image processing and object recognition for robotics applications. Adrian Stratulat

Real-time image processing and object recognition for robotics applications. Adrian Stratulat Real-time image processing and object recognition for robotics applications Adrian Stratulat What is computer vision? Computer vision is a field that includes methods for acquiring, processing, analyzing,

More information

Introduction to Computer Vision

Introduction to Computer Vision Introduction to Computer Vision Dr. Gerhard Roth COMP 4102A Winter 2015 Version 2 General Information Instructor: Adjunct Prof. Dr. Gerhard Roth gerhardroth@rogers.com read hourly gerhardroth@cmail.carleton.ca

More information

Introduction to Computer Vision Laboratories

Introduction to Computer Vision Laboratories Introduction to Computer Vision Laboratories Antonino Furnari furnari@dmi.unict.it www.dmi.unict.it/~furnari/ Computer Vision Laboratories Format: practical session + questions and homeworks. Material

More information

Multimedia Retrieval Exercise Course 2 Basic Knowledge about Images in OpenCV

Multimedia Retrieval Exercise Course 2 Basic Knowledge about Images in OpenCV Multimedia Retrieval Exercise Course 2 Basic Knowledge about Images in OpenCV Kimiaki Shirahama, D.E. Research Group for Pattern Recognition Institute for Vision and Graphics University of Siegen, Germany

More information

Modern C++ for Computer Vision and Image Processing. Igor Bogoslavskyi

Modern C++ for Computer Vision and Image Processing. Igor Bogoslavskyi Modern C++ for Computer Vision and Image Processing Igor Bogoslavskyi Outline Generic programming Template functions Template classes Iterators Error handling Program input parameters OpenCV cv::mat cv::mat

More information

IMPLEMENTATION OF COMPUTER VISION TECHNIQUES USING OPENCV

IMPLEMENTATION OF COMPUTER VISION TECHNIQUES USING OPENCV IMPLEMENTATION OF COMPUTER VISION TECHNIQUES USING OPENCV Anu Suneja Assistant Professor M. M. University Mullana, Haryana, India From last few years, the thrust for automation and simulation tools in

More information

CS 376b Computer Vision

CS 376b Computer Vision CS 376b Computer Vision 09 / 25 / 2014 Instructor: Michael Eckmann Today s Topics Questions? / Comments? Enhancing images / masks Cross correlation Convolution C++ Cross-correlation Cross-correlation involves

More information

Eigen Tutorial. CS2240 Interactive Computer Graphics

Eigen Tutorial. CS2240 Interactive Computer Graphics CS2240 Interactive Computer Graphics CS2240 Interactive Computer Graphics Introduction Eigen is an open-source linear algebra library implemented in C++. It s fast and well-suited for a wide range of tasks,

More information

OpenCV on Zynq: Accelerating 4k60 Dense Optical Flow and Stereo Vision. Kamran Khan, Product Manager, Software Acceleration and Libraries July 2017

OpenCV on Zynq: Accelerating 4k60 Dense Optical Flow and Stereo Vision. Kamran Khan, Product Manager, Software Acceleration and Libraries July 2017 OpenCV on Zynq: Accelerating 4k60 Dense Optical Flow and Stereo Vision Kamran Khan, Product Manager, Software Acceleration and Libraries July 2017 Agenda Why Zynq SoCs for Traditional Computer Vision Automated

More information

GeoInt Accelerator Platform to start developing with GPUs GPU access, GPU-accelerated apps and libraries Register to learn more:

GeoInt Accelerator Platform to start developing with GPUs GPU access, GPU-accelerated apps and libraries Register to learn more: GeoInt Accelerator Platform to start developing with GPUs GPU access, GPU-accelerated apps and libraries Register to learn more: http://goo.gl/eui6k6 Webinar Feedback Submit your feedback for a chance

More information

EL2310 Scientific Programming

EL2310 Scientific Programming (yaseminb@kth.se) Overview Overview Roots of C Getting started with C Closer look at Hello World Programming Environment Discussion Basic Datatypes and printf Schedule Introduction to C - main part of

More information

A Tutorial on VLFeat

A Tutorial on VLFeat A Tutorial on VLFeat Antonino Furnari Image Processing Lab Dipartimento di Matematica e Informatica Università degli Studi di Catania furnari@dmi.unict.it 17/04/2014 MATLAB & Computer Vision 2 MATLAB offers

More information

Interaction Technology

Interaction Technology Faculty of Science Information and Computing Sciences 2017 Introduction Computer Vision Coert van Gemeren 8 maart 2017 Information and Computing Sciences TODAY 1.Computer Vision 2.Programming C/C++ OpenCV

More information

Introduction to OpenCV

Introduction to OpenCV Introduction to OpenCV Stefan Holzer, David Joseph Tan Chair for Computer Aided Medical Procedures Technische Universität München Germany Introduction to OpenCV Where to get OpenCV?

More information

Benchmarking of Vision-Based Prototyping and Testing Tools

Benchmarking of Vision-Based Prototyping and Testing Tools Benchmarking of Vision-Based Prototyping and Testing Tools Master Thesis Submitted in Fulfillment of the Requirements for the Academic Degree M.Sc. Dept. of Computer Science Chair of Computer Engineering

More information

Professor Terje Haukaas University of British Columbia, Vancouver C++ Programming

Professor Terje Haukaas University of British Columbia, Vancouver  C++ Programming C++ Programming C++ code is essentially a collection of statements terminated by a semicolon, such as (spaces not needed): a = b + c; Most C++ code is organized into header files and cpp files, i.e., C++

More information

6. Pointers, Structs, and Arrays. 1. Juli 2011

6. Pointers, Structs, and Arrays. 1. Juli 2011 1. Juli 2011 Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 1 of 50 Outline Recapitulation Pointers Dynamic Memory Allocation Structs Arrays Bubble Sort Strings Einführung

More information

CSCI 171 Chapter Outlines

CSCI 171 Chapter Outlines Contents CSCI 171 Chapter 1 Overview... 2 CSCI 171 Chapter 2 Programming Components... 3 CSCI 171 Chapter 3 (Sections 1 4) Selection Structures... 5 CSCI 171 Chapter 3 (Sections 5 & 6) Iteration Structures

More information

Advanced Computer Graphics

Advanced Computer Graphics G22.2274 001, Fall 2010 Advanced Computer Graphics Project details and tools 1 Projects Details of each project are on the website under Projects Please review all the projects and come see me if you would

More information

Stereo and Epipolar geometry

Stereo and Epipolar geometry Previously Image Primitives (feature points, lines, contours) Today: Stereo and Epipolar geometry How to match primitives between two (multiple) views) Goals: 3D reconstruction, recognition Jana Kosecka

More information

MA400: Financial Mathematics

MA400: Financial Mathematics MA400: Financial Mathematics Introductory Course Lecture 1: Overview of the course Preliminaries A brief introduction Beginning to program Some example programs Aims of this course Students should have

More information

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++ Introduction to Programming in C++ Course Text Programming in C++, Zyante, Fall 2013 edition. Course book provided along with the course. Course Description This course introduces programming in C++ and

More information

Welcome Back. CSCI 262 Data Structures. Hello, Let s Review. Hello, Let s Review. How to Review 8/19/ Review. Here s a simple C++ program:

Welcome Back. CSCI 262 Data Structures. Hello, Let s Review. Hello, Let s Review. How to Review 8/19/ Review. Here s a simple C++ program: Welcome Back CSCI 262 Data Structures 2 - Review What you learned in CSCI 261 (or equivalent): Variables Types Arrays Expressions Conditionals Branches & Loops Functions Recursion Classes & Objects Streams

More information

12.1 Introduction OpenCV4Android SDK Getting the SDK

12.1 Introduction OpenCV4Android SDK Getting the SDK Chapter 12 OpenCV For Android 12.1 Introduction OpenCV (Open Source Computer Vision Library) is a popular open source software library designed for computer vision application and machine learning. Its

More information

An Implementation on Object Move Detection Using OpenCV

An Implementation on Object Move Detection Using OpenCV An Implementation on Object Move Detection Using OpenCV Professor: Dr. Ali Arya Reported by: Farzin Farhadi-Niaki Department of Systems and Computer Engineering Carleton University Ottawa, Canada I. INTRODUCTION

More information

CITS2401 Computer Analysis & Visualisation

CITS2401 Computer Analysis & Visualisation FACULTY OF ENGINEERING, COMPUTING AND MATHEMATICS CITS2401 Computer Analysis & Visualisation SCHOOL OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING Topic 3 Introduction to Matlab Material from MATLAB for

More information

Computer Programming : C++

Computer Programming : C++ The Islamic University of Gaza Engineering Faculty Department of Computer Engineering Fall 2017 ECOM 2003 Muath i.alnabris Computer Programming : C++ Experiment #1 Basics Contents Structure of a program

More information

Computer Science 2500 Computer Organization Rensselaer Polytechnic Institute Spring Topic Notes: C and Unix Overview

Computer Science 2500 Computer Organization Rensselaer Polytechnic Institute Spring Topic Notes: C and Unix Overview Computer Science 2500 Computer Organization Rensselaer Polytechnic Institute Spring 2009 Topic Notes: C and Unix Overview This course is about computer organization, but since most of our programming is

More information

Motivation was to facilitate development of systems software, especially OS development.

Motivation was to facilitate development of systems software, especially OS development. A History Lesson C Basics 1 Development of language by Dennis Ritchie at Bell Labs culminated in the C language in 1972. Motivation was to facilitate development of systems software, especially OS development.

More information

SECTION 1: INTRODUCTION. ENGR 112 Introduction to Engineering Computing

SECTION 1: INTRODUCTION. ENGR 112 Introduction to Engineering Computing SECTION 1: INTRODUCTION ENGR 112 Introduction to Engineering Computing 2 Course Overview What is Programming? 3 Programming The implementation of algorithms in a particular computer programming language

More information

CE221 Programming in C++ Part 1 Introduction

CE221 Programming in C++ Part 1 Introduction CE221 Programming in C++ Part 1 Introduction 06/10/2017 CE221 Part 1 1 Module Schedule There are two lectures (Monday 13.00-13.50 and Tuesday 11.00-11.50) each week in the autumn term, and a 2-hour lab

More information

Programming for Engineers Iteration

Programming for Engineers Iteration Programming for Engineers Iteration ICEN 200 Spring 2018 Prof. Dola Saha 1 Data type conversions Grade average example,-./0 class average = 23450-67 893/0298 Grade and number of students can be integers

More information

CSE 145/237D FINAL REPORT. 3D Reconstruction with Dynamic Fusion. Junyu Wang, Zeyangyi Wang

CSE 145/237D FINAL REPORT. 3D Reconstruction with Dynamic Fusion. Junyu Wang, Zeyangyi Wang CSE 145/237D FINAL REPORT 3D Reconstruction with Dynamic Fusion Junyu Wang, Zeyangyi Wang Contents Abstract... 2 Background... 2 Implementation... 4 Development setup... 4 Real time capturing... 5 Build

More information

OpenCV introduction. Mašinska vizija, 2017.

OpenCV introduction. Mašinska vizija, 2017. OpenCV introduction Mašinska vizija, 2017. OpenCV -History OpenCV (Open Source Computer Vision) is a library of programming functions mainly aimed at real-time computer vision. Intel team from Nizhny Novgorod

More information

Multimedia-Programmierung Übung 3

Multimedia-Programmierung Übung 3 Multimedia-Programmierung Übung 3 Ludwig-Maximilians-Universität München Sommersemester 2016 Ludwig-Maximilians-Universität München Multimedia-Programmierung 1-1 Today Ludwig-Maximilians-Universität München

More information

Arrays array array length fixed array fixed length array fixed size array Array elements and subscripting

Arrays array array length fixed array fixed length array fixed size array Array elements and subscripting Arrays Fortunately, structs are not the only aggregate data type in C++. An array is an aggregate data type that lets us access many variables of the same type through a single identifier. Consider the

More information

A brief introduction to C programming for Java programmers

A brief introduction to C programming for Java programmers A brief introduction to C programming for Java programmers Sven Gestegård Robertz September 2017 There are many similarities between Java and C. The syntax in Java is basically

More information

Broad field that includes low-level operations as well as complex high-level algorithms

Broad field that includes low-level operations as well as complex high-level algorithms Image processing About Broad field that includes low-level operations as well as complex high-level algorithms Low-level image processing Computer vision Computational photography Several procedures and

More information

Ekalavya, Summer Internship, Scilab Computer Vision Toolbox. Scilab Computer Vision Toolbox

Ekalavya, Summer Internship, Scilab Computer Vision Toolbox. Scilab Computer Vision Toolbox Computer Computer Computer Ekalavya, 2016 Asmita Bhar Deepshikha Diwakar Bhardwaj Kevin George Rohit Suri Shashank Shekhar Sridhar Reddy Choubey Tanmay Chaudhari Umang Summer Internship, 2016 Computer

More information

Scientific Computing

Scientific Computing Scientific Computing Martin Lotz School of Mathematics The University of Manchester Lecture 1, September 22, 2014 Outline Course Overview Programming Basics The C++ Programming Language Outline Course

More information

The NAO Robot, a case of study Robotics Franchi Alessio Mauro

The NAO Robot, a case of study Robotics Franchi Alessio Mauro The NAO Robot, a case of study Robotics 2013-2014 Franchi Alessio Mauro alessiomauro.franchi@polimi.it Who am I? Franchi Alessio Mauro Master Degree in Computer Science Engineer at Politecnico of Milan

More information

Report on the Language A

Report on the Language A Report on the Language A Nick Foti, Eric Kee, Ashwin Ramaswamy May 27, 2008 Abstract In this work we describe the language A, which is designed to provide native use of one-dimensional arrays and also

More information

April 4-7, 2016 Silicon Valley VISIONWORKS A CUDA ACCELERATED COMPUTER VISION LIBRARY S6783. Elif Albuz, April 4, 2016

April 4-7, 2016 Silicon Valley VISIONWORKS A CUDA ACCELERATED COMPUTER VISION LIBRARY S6783. Elif Albuz, April 4, 2016 April 4-7, 2016 Silicon Valley VISIONWORKS A CUDA ACCELERATED COMPUTER VISION LIBRARY S6783 Elif Albuz, April 4, 2016 Motivation Introduction to VisionWorks AGENDA VisionWorks Software Stack VisionWorks

More information

ROS : Robot Operating System

ROS : Robot Operating System ROS : Robot Operating System Weipeng He 2he@informatik.uni-hamburg.de 5 November, 2012 Outline Introduction Motivation Software Structure Community Conclusion Introduction What is ROS? ROS is Robot Operating

More information

Motivation was to facilitate development of systems software, especially OS development.

Motivation was to facilitate development of systems software, especially OS development. A History Lesson C Basics 1 Development of language by Dennis Ritchie at Bell Labs culminated in the C language in 1972. Motivation was to facilitate development of systems software, especially OS development.

More information

Basic program The following is a basic program in C++; Basic C++ Source Code Compiler Object Code Linker (with libraries) Executable

Basic program The following is a basic program in C++; Basic C++ Source Code Compiler Object Code Linker (with libraries) Executable Basic C++ Overview C++ is a version of the older C programming language. This is a language that is used for a wide variety of applications and which has a mature base of compilers and libraries. C++ is

More information

Objectives. Chapter 2: Basic Elements of C++ Introduction. Objectives (cont d.) A C++ Program (cont d.) A C++ Program

Objectives. Chapter 2: Basic Elements of C++ Introduction. Objectives (cont d.) A C++ Program (cont d.) A C++ Program Objectives Chapter 2: Basic Elements of C++ In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates

More information

Using the GeoX Framework

Using the GeoX Framework Using the GeoX Framework Michael Wand February 3rd, 2014 1. Introduction GeoX is a collection of C++ libraries for experimenting with geometric modeling techniques (GeoX = geometry experiments). It consists

More information

OpenCV 비디오처리 김성영교수 금오공과대학교 컴퓨터공학과

OpenCV 비디오처리 김성영교수 금오공과대학교 컴퓨터공학과 OpenCV 비디오처리 김성영교수 금오공과대학교 컴퓨터공학과 학습내용 Reading video sequences Seeking video sequences Writing video sequences Foreground extraction 2 Reading video sequences VideoCapture: class for video capturing from

More information

Chapter 2: Basic Elements of C++

Chapter 2: Basic Elements of C++ Chapter 2: Basic Elements of C++ Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates

More information

Chapter 2: Basic Elements of C++ Objectives. Objectives (cont d.) A C++ Program. Introduction

Chapter 2: Basic Elements of C++ Objectives. Objectives (cont d.) A C++ Program. Introduction Chapter 2: Basic Elements of C++ C++ Programming: From Problem Analysis to Program Design, Fifth Edition 1 Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers

More information

Dietrich Paulus Joachim Hornegger. Pattern Recognition of Images and Speech in C++

Dietrich Paulus Joachim Hornegger. Pattern Recognition of Images and Speech in C++ Dietrich Paulus Joachim Hornegger Pattern Recognition of Images and Speech in C++ To Dorothea, Belinda, and Dominik In the text we use the following names which are protected, trademarks owned by a company

More information

6. Pointers, Structs, and Arrays. March 14 & 15, 2011

6. Pointers, Structs, and Arrays. March 14 & 15, 2011 March 14 & 15, 2011 Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 1 of 47 Outline Recapitulation Pointers Dynamic Memory Allocation Structs Arrays Bubble Sort Strings Einführung

More information

McTutorial: A MATLAB Tutorial

McTutorial: A MATLAB Tutorial McGill University School of Computer Science Sable Research Group McTutorial: A MATLAB Tutorial Lei Lopez Last updated: August 2014 w w w. s a b l e. m c g i l l. c a Contents 1 MATLAB BASICS 3 1.1 MATLAB

More information

Lecture 04 FUNCTIONS AND ARRAYS

Lecture 04 FUNCTIONS AND ARRAYS Lecture 04 FUNCTIONS AND ARRAYS 1 Motivations Divide hug tasks to blocks: divide programs up into sets of cooperating functions. Define new functions with function calls and parameter passing. Use functions

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. OpenCV

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. OpenCV About the Tutorial OpenCV is a cross-platform library using which we can develop real-time computer vision applications. It mainly focuses on image processing, video capture and analysis including features

More information

Using Xcode with OpenCV

Using Xcode with OpenCV Using Xcode with OpenCV Instructor - Simon Lucey 16-623 - Advanced Computer Vision Apps Today Insights into Mobile Computer Vision. Extremely Brief Intro to Objective C Using OpenCV in Xcode. Balancing

More information

Assumptions. History

Assumptions. History Assumptions A Brief Introduction to Java for C++ Programmers: Part 1 ENGI 5895: Software Design Faculty of Engineering & Applied Science Memorial University of Newfoundland You already know C++ You understand

More information

6.096 Introduction to C++ January (IAP) 2009

6.096 Introduction to C++ January (IAP) 2009 MIT OpenCourseWare http://ocw.mit.edu 6.096 Introduction to C++ January (IAP) 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. Welcome to 6.096 Lecture

More information

Matlab Tutorial, CDS

Matlab Tutorial, CDS 29 September 2006 Arrays Built-in variables Outline Operations Linear algebra Polynomials Scripts and data management Help: command window Elisa (see Franco next slide), Matlab Tutorial, i.e. >> CDS110-101

More information

Introduction to C++: Part 1 tutorial version 0.2. Brian Gregor Research Computing Services

Introduction to C++: Part 1 tutorial version 0.2. Brian Gregor Research Computing Services Introduction to C++: Part 1 tutorial version 0.2 Brian Gregor Research Computing Services Getting started with the room B27 terminals Log on with your BU username On the desktop is a Training Files folder.

More information

Introduction to Programming using C++

Introduction to Programming using C++ Introduction to Programming using C++ Lecture One: Getting Started Carl Gwilliam gwilliam@hep.ph.liv.ac.uk http://hep.ph.liv.ac.uk/~gwilliam/cppcourse Course Prerequisites What you should already know

More information

PieNum Language Reference Manual

PieNum Language Reference Manual PieNum Language Reference Manual October 2017 Hadiah Venner (hkv2001) Hana Fusman (hbf2113) Ogochukwu Nwodoh( ocn2000) Index Introduction 1. Lexical Convention 1.1. Comments 1.2. Identifiers 1.3. Keywords

More information

Programming, numerics and optimization

Programming, numerics and optimization Programming, numerics and optimization Lecture A-4: Object-oriented programming Łukasz Jankowski ljank@ippt.pan.pl Institute of Fundamental Technological Research Room 4.32, Phone +22.8261281 ext. 428

More information

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS Contents Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS 1.1. INTRODUCTION TO COMPUTERS... 1 1.2. HISTORY OF C & C++... 3 1.3. DESIGN, DEVELOPMENT AND EXECUTION OF A PROGRAM... 3 1.4 TESTING OF PROGRAMS...

More information

Welcome Back. CSCI 262 Data Structures. Hello, Let s Review. Hello, Let s Review. How to Review 1/9/ Review. Here s a simple C++ program:

Welcome Back. CSCI 262 Data Structures. Hello, Let s Review. Hello, Let s Review. How to Review 1/9/ Review. Here s a simple C++ program: Welcome Back CSCI 262 Data Structures 2 - Review What you learned in CSCI 261 (or equivalent): Variables Types Arrays Expressions Conditionals Branches & Loops Functions Recursion Classes & Objects Streams

More information

Module 6: Array in C

Module 6: Array in C 1 Table of Content 1. Introduction 2. Basics of array 3. Types of Array 4. Declaring Arrays 5. Initializing an array 6. Processing an array 7. Summary Learning objectives 1. To understand the concept of

More information

Programming in C - Part 2

Programming in C - Part 2 Programming in C - Part 2 CPSC 457 Mohammad Reza Zakerinasab May 11, 2016 These slides are forked from slides created by Mike Clark Where to find these slides and related source code? http://goo.gl/k1qixb

More information

Introduction to Matlab/Octave

Introduction to Matlab/Octave Introduction to Matlab/Octave February 28, 2014 This document is designed as a quick introduction for those of you who have never used the Matlab/Octave language, as well as those of you who have used

More information

Object Oriented Programming. Assistant Lecture Omar Al Khayat 2 nd Year

Object Oriented Programming. Assistant Lecture Omar Al Khayat 2 nd Year Object Oriented Programming Assistant Lecture Omar Al Khayat 2 nd Year Syllabus Overview of C++ Program Principles of object oriented programming including classes Introduction to Object-Oriented Paradigm:Structures

More information

About Codefrux While the current trends around the world are based on the internet, mobile and its applications, we try to make the most out of it. As for us, we are a well established IT professionals

More information

Image Processing (2) Point Operations and Local Spatial Operations

Image Processing (2) Point Operations and Local Spatial Operations Intelligent Control Systems Image Processing (2) Point Operations and Local Spatial Operations Shingo Kagami Graduate School of Information Sciences, Tohoku University swk(at)ic.is.tohoku.ac.jp http://www.ic.is.tohoku.ac.jp/ja/swk/

More information

+ Inheritance. Sometimes we need to create new more specialized types that are similar to types we have already created.

+ Inheritance. Sometimes we need to create new more specialized types that are similar to types we have already created. + Inheritance + Inheritance Classes that we design in Java can be used to model some concept in our program. For example: Pokemon a = new Pokemon(); Pokemon b = new Pokemon() Sometimes we need to create

More information

Design Principles for a Beginning Programming Language

Design Principles for a Beginning Programming Language Design Principles for a Beginning Programming Language John T Minor and Laxmi P Gewali School of Computer Science University of Nevada, Las Vegas Abstract: We consider the issue of designing an appropriate

More information

IMPORTANT QUESTIONS IN C FOR THE INTERVIEW

IMPORTANT QUESTIONS IN C FOR THE INTERVIEW IMPORTANT QUESTIONS IN C FOR THE INTERVIEW 1. What is a header file? Header file is a simple text file which contains prototypes of all in-built functions, predefined variables and symbolic constants.

More information

Bindel, Fall 2011 Applications of Parallel Computers (CS 5220) Tuning on a single core

Bindel, Fall 2011 Applications of Parallel Computers (CS 5220) Tuning on a single core Tuning on a single core 1 From models to practice In lecture 2, we discussed features such as instruction-level parallelism and cache hierarchies that we need to understand in order to have a reasonable

More information

Table of Contents EVALUATION COPY

Table of Contents EVALUATION COPY Table of Contents Introduction... 1-2 A Brief History of Python... 1-3 Python Versions... 1-4 Installing Python... 1-5 Environment Variables... 1-6 Executing Python from the Command Line... 1-7 IDLE...

More information

Computer Vision CSCI-GA Assignment 1.

Computer Vision CSCI-GA Assignment 1. Computer Vision CSCI-GA.2272-001 Assignment 1. September 22, 2017 Introduction This assignment explores various methods for aligning images and feature extraction. There are four parts to the assignment:

More information

Computer and Machine Vision

Computer and Machine Vision Computer and Machine Vision Lecture Week 12 Part-1 Additional Programming Considerations March 29, 2014 Sam Siewert Outline of Week 12 Computer Vision APIs and Languages Alternatives to C++ and OpenCV

More information

Quick Multitouch Apps using kivy and Python

Quick Multitouch Apps using kivy and Python Quick Multitouch Apps using kivy and Python About Me! Python and Kivy + Setting up Kivy... 1) in Linux 2) in Windows 3) Mac OSX Hello World in Kivy :) Controlling the Environment Many environment variables

More information

Introduction to C++ with content from

Introduction to C++ with content from Introduction to C++ with content from www.cplusplus.com 2 Introduction C++ widely-used general-purpose programming language procedural and object-oriented support strong support created by Bjarne Stroustrup

More information

Code Blocks Cannot Find Compiler Executable Windows 7

Code Blocks Cannot Find Compiler Executable Windows 7 Code Blocks Cannot Find Compiler Executable Windows 7 Windows. Once you've installed a new compiler, be sure to read the I couldn't find a way to force CB to use a unix-link shell, but was able to find

More information

Java Programming. Atul Prakash

Java Programming. Atul Prakash Java Programming Atul Prakash Java Language Fundamentals The language syntax is similar to C/ C++ If you know C/C++, you will have no trouble understanding Java s syntax If you don't, it will be easier

More information

COMP322 - Introduction to C++ Lecture 02 - Basics of C++

COMP322 - Introduction to C++ Lecture 02 - Basics of C++ COMP322 - Introduction to C++ Lecture 02 - Basics of C++ School of Computer Science 16 January 2012 C++ basics - Arithmetic operators Where possible, C++ will automatically convert among the basic types.

More information

Python Working with files. May 4, 2017

Python Working with files. May 4, 2017 Python Working with files May 4, 2017 So far, everything we have done in Python was using in-memory operations. After closing the Python interpreter or after the script was done, all our input and output

More information

CS1114: Matlab Introduction

CS1114: Matlab Introduction CS1114: Matlab Introduction 1 Introduction The purpose of this introduction is to provide you a brief introduction to the features of Matlab that will be most relevant to your work in this course. Even

More information

Topic 6: A Quick Intro To C

Topic 6: A Quick Intro To C Topic 6: A Quick Intro To C Assumption: All of you know Java. Much of C syntax is the same. Also: Many of you have used C or C++. Goal for this topic: you can write & run a simple C program basic functions

More information

Matlab? Chapter 3-4 Matlab and IPT Basics. Working Environment. Matlab Demo. Array. Data Type. MATLAB Desktop:

Matlab? Chapter 3-4 Matlab and IPT Basics. Working Environment. Matlab Demo. Array. Data Type. MATLAB Desktop: Matlab? Lecture Slides ME 4060 Machine Vision and Vision-based Control Chapter 3-4 Matlab and IPT Basics By Dr. Debao Zhou 1 MATric LABoratory data analysis, prototype and visualization Matrix operation

More information

CHAPTER 1 Introduction to Computers and Programming CHAPTER 2 Introduction to C++ ( Hexadecimal 0xF4 and Octal literals 031) cout Object

CHAPTER 1 Introduction to Computers and Programming CHAPTER 2 Introduction to C++ ( Hexadecimal 0xF4 and Octal literals 031) cout Object CHAPTER 1 Introduction to Computers and Programming 1 1.1 Why Program? 1 1.2 Computer Systems: Hardware and Software 2 1.3 Programs and Programming Languages 8 1.4 What is a Program Made of? 14 1.5 Input,

More information

Objectives. In this chapter, you will:

Objectives. In this chapter, you will: Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates arithmetic expressions Learn about

More information

CSCE574 Robotics Spring 2014 Notes on Images in ROS

CSCE574 Robotics Spring 2014 Notes on Images in ROS CSCE574 Robotics Spring 2014 Notes on Images in ROS 1 Images in ROS In addition to the fake laser scans that we ve seen so far with This document has some details about the image data types provided by

More information