Homework 3 Eye Detection

Size: px
Start display at page:

Download "Homework 3 Eye Detection"

Transcription

1 Homework 3 Eye Detection This homework purposes to detect eyes in a face image by using the technique described in the following paper Accurate Eye Center Location and Tracking Using Isophote Curvature". 1. Reading the Image and Finding Faces by Using OpenCV (2.4.5) Face Detector Main function opens image and tries to find faces by using detectfacialfeatures function: #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <opencv\cv.h> #include <opencv\highgui.h> #include <opencv\cvaux.h> #include <opencv2\highgui\highgui.hpp> #include <opencv2\imgproc\imgproc.hpp> using namespace cv; CvHaarClassifierCascade *cascade,*cascade_e,*cascade_nose,*cascade_mouth; CvMemStorage *storage; char *face_cascade="haarcascade_frontalface_alt2.xml"; char *eye_cascade="haarcascade_mcs_eyepair_big.xml"; char *ImageAdresses = "C:\\Users\\Capa\\Documents\\Visual Studio 2010\\Projects\\myNewOpenCv\\myNewOpenCv\\lena.jpg"; char *ImageOutAdresses = "C:\\Users\\Capa\\Documents\\Visual Studio 2010\\Projects\\myNewOpenCv\\myNewOpenCv\\lena_face_eye_out.jpg"; char *ImageEyeAdresses = "C:\\Users\\Capa\\Documents\\Visual Studio 2010\\Projects\\myNewOpenCv\\myNewOpenCv\\eye_out.jpg"; int main( int argc, char** argv ) { /* Variables to take the image in */ IplImage *img,*temp_img; /* Variables to show image locations in the PC */ char image[100]; */ /* load the classifier note that the file is in the same directory with this code storage = cvcreatememstorage( 0 ); cascade = ( CvHaarClassifierCascade* )cvload( face_cascade, 0, 0, 0 ); cascade_e = ( CvHaarClassifierCascade* )cvload( eye_cascade, 0, 0, 0 ); if(!(cascade cascade_e) ) { fprintf( stderr, "ERROR: Could not load classifier cascade\n" ); return -1; } /* Load the Image */ img=cvloadimage(imageadresses); 1

2 } /* Load the temp Image */ temp_img=cvloadimage(imageadresses); if(!img) { printf("could not load image file and trying once again: %s\n",image); } printf("\n curr_image = %s",imageadresses); /* detect face */ detectfacialfeatures(img,temp_img); /* Relase the Haar Classifier Cascade*/ cvreleasehaarclassifiercascade( &cascade ); cvreleasehaarclassifiercascade( &cascade_e ); /* Relase the memory storage */ cvreleasememstorage( &storage ); /* Relase the Image and Temp Image*/ cvreleaseimage(&img); cvreleaseimage(&temp_img); 2

3 detectfacialfeatures function uses cvhaardetectobjects function to detect faces and then it draws a red box for each face. void detectfacialfeatures( IplImage *img,iplimage *temp_img) { float m[6]; double factor = 1; CvMat M = cvmat( 2, 3, CV_32F, m ); int w = (img)->width; int h = (img)->height; CvSeq* faces; CvRect *r; m[0] = (float)(factor*cos(0.0)); m[1] = (float)(factor*sin(0.0)); m[2] = w*0.5f; m[3] = -m[1]; m[4] = m[0]; m[5] = h*0.5f; cvgetquadranglesubpix(img, temp_img, &M); CvMemStorage* storage=cvcreatememstorage(0); cvclearmemstorage( storage ); if( cascade ) faces = cvhaardetectobjects(img,cascade, storage, 1.2, 3, CV_HAAR_DO_CANNY_PRUNING, cvsize(20, 20)); else printf("\nfrontal face cascade not loaded\n"); printf("\n no of faces detected are %d",faces->total); /* for each face found, draw a red box */ for(int i = 0 ; i < ( faces? faces->total : 0 ) ; i++ ) { r = ( CvRect* )cvgetseqelem( faces, i ); cvrectangle( img,cvpoint( r->x, r->y ),cvpoint( r->x + r->width, r->y + r- >height ), CV_RGB( 255, 0, 0 ), 1, 8, 0 ); } printf("\n face_x=%d face_y=%d wd=%d ht=%d",r->x,r->y,r->width,r->height); /* Detect Eyes */ detecteyes(img,r); /* reset region of interest */ cvresetimageroi(img); } if(faces->total>0) { cvsaveimage( ImageOutAdresses, img ); } 3

4 detecteyes function detects eyes and draws a rectangle for eyes: /*Eyes detection*/ void detecteyes( IplImage *img,cvrect *r) { CvSeq *eyes; int eye_detect=0; /* eye detection starts */ /* Set the Region of Interest: estimate the eyes' position */ cvsetimageroi(img, /* the source image */ cvrect(r->x, /* x = start from leftmost */ r->y + (r->height/5.5), /* y = a few pixels from the top */ r->width, /* width = same width with the face */ r->height/3.0 /* height = 1/3 of face height */ ) ); /* detect the eyes */ eyes = cvhaardetectobjects(img,/* the source image, with the estimated location defined */ cascade_e, /* the eye classifier */ storage, /* memory buffer */ 1.15, 3, 0, /* tune for your app */ cvsize(25, 15) /* minimum detection scale */ ); printf("\n no of eyes detected are %d",eyes->total); /* draw a rectangle for each detected eye */ for( int i = 0; i < (eyes? eyes->total : 0); i++ ) { cvsaveimage(imageeyeadresses, img ); eye_detect++; /* get one eye */ CvRect *eye = (CvRect*)cvGetSeqElem(eyes, i); /* draw a blue rectangle */ cvrectangle(img, cvpoint(eye->x, eye->y), cvpoint(eye->x + eye->width, eye->y + eye->height), CV_RGB(0, 0, 255), 1, 8, 0 ); printf("\n eye_x=%d eye_y=%d eye_wd=%d eye_ht=%d",eye->x,eye->y,eye- >width,eye->height); } } 4

5 Original Image is showed in Figure 1. Detected face image is shown in Figure 2: Figure 1: Original Image Figure 2: Detected Face 5

6 Detected Eyes are shown in Figure 3: Result of the process is shown Figure 4: Figure 3: Detected Eyes Figure 4: Result Window 2. Considering the Rectangles Around Eyes After face and eyes are detected, the rectangle around the eyes gives an image in Figure 5: Figure 5: Rectangle Around Eyes To calculate Gradient, Displacement Vectors and Curvedness, the image is taken to the MATLAB environment. All the calculations from this step are done at the MATLAB. 6

7 a. Read The Image % Read The Image I = imread('eye_out.jpg'); % Show Original Image figure, imagesc(i),title('original Image'),impixelinfo,colormap('gray'); b. Convert Image to Grayscale Figure 6: Original Image %Convert image to grayscale J = rgb2gray(i); figure, imagesc(j),title('gray Image'),impixelinfo,colormap('gray'); Figure 7: GrayScaled Image 7

8 c. Divide Image Into Two Parts It is known that eyes are found in the image but their location is not known. It is s also known that there are two eyes in the image. Therefore, image is divided into two parts that every part has one eye. % Image is m x n matrix m=[0 size(i,1)]; n=[0 size(i,2)]; % divide image into two parts. One for each eye. Store it in variable cel %left eye eye{1}=j(1:1:size(j,1),1:1:round(0.50*size(j,2))); %right eye eye{2}=j(1:1:size(j,1),round(0.50*size(j,2)):1:size(j,2)); %create variables for location of eyes x_pixel=zeros(2); y_pixel=zeros(2); %Image matrix elements are converted to double eye{1}=im2double(eye{1}); eye{2}=im2double(eye{2}); Figure 8: Image is divided into 2 parts. Each part has 1 eye. 8

9 d. For Each Eye Start to Calculate the Eye Location Every eye image are taken and firstly smoothed by Gaussian. Following Figures shows grayscaled and smoothed eye images. %for each eye apply the algorithm based on the method specified. for index=1:1:2 % Smooth the image. h = fspecial('gaussian',[5 5],2); eye{index}=imfilter(eye{index},h,'replicate','conv'); % Display the image obtained after smoothing a = {'Image after Grayscaling and Smoothing '}; b = {num2str(index)}; ab = strcat(a, b) figure,imagesc(eye{index},'xdata',m,'ydata',n),title(ab),impixelinfo,colorm ap('gray'); Figure 9: Images are Grayscaled and also images are smoothed with Gaussian 9

10 e. Find The Gradients Of The Image. Then Calculate The Curvedness : Each eye images gradients are calculated. Curvedness is calculates by using formula: %gradients of the image [FX,FY]=gradient(eye{index}); [FXX,FXY]=gradient(FX); [FYX,FYY]=gradient(FY); % Calculate the curvedness Curvedness=sqrt(im2double(FXX.^2 + 2*FXY.^2 + FYY.^2)); % Display the curvedness a = {'Curvedness '}; b = {num2str(index)}; ab = strcat(a, b) figure,imagesc(abs(curvedness),'xdata',m,'ydata',n),title(ab),impixelinfo,c olormap('gray'); Figure 10: Curvedness 10

11 f. Calculate the Displacement Vector Displacement vector is calculated by using formula: % Calculate the displacement vectors Num = FX.^2 + FY.^2; Den = ((FY.^2).*FXX) - (2*(FX.*FXY).*FY) + ((FX.^2).*FYY); Den = - round(num./den); DLX = Den.*FX; DLY = Den.*FY; Num = Num.^(1.5); K= - round(den./num); Disp_Vector=zeros(size(eye{index},1),size(eye{index},2),2); for x=1:1:size(eye{index},1) for y=1:1:size(eye{index},2) Disp_Vector(x,y,1)=DLX(x,y); Disp_Vector(x,y,2)=DLY(x,y); Disp_Vector=round(Disp_Vector); Magnitude_Disp_Vector=sqrt(Disp_Vector(:,:,1).^2 + Disp_Vector(:,:,1).^2); % Create the weight array weight=zeros(size(eye{index},1),size(eye{index},2)); for x=1:1:size(eye{index},1) for y=1:1:size(eye{index},2) weight(x,y)=abs(curvedness(x,y)); minrad = 4; maxrad = 40; % Create the mapped image that will store the result Mapped = zeros(size(eye{index},1),size(eye{index},2)); Used_Disp_Vector = zeros(size(eye{index},1),size(eye{index},2),2); 11

12 for x=1:1:size(eye{index},1) for y=1:1:size(eye{index},2) if((disp_vector(x,y,1)~=0) (Disp_Vector(x,y,2)~=0)) if((y+disp_vector(x,y,1)>0) && (x+disp_vector(x,y,2)>0)) if((y+disp_vector(x,y,1)<=size(eye{index},2)) && (x+disp_vector(x,y,2)<=size(eye{index},1)) && (K(x,y)<0)) if((magnitude_disp_vector(x,y)>=minrad)&&(magnitude_disp_vector(x,y)<=maxra d)) % use only those displacement vectors which are within the % specified range Used_Disp_Vector(x,y,1)=Disp_Vector(x,y,1); Used_Disp_Vector(x,y,2)=Disp_Vector(x,y,2); Mapped(x+Disp_Vector(x,y,2),y+Disp_Vector(x,y,1)) = Mapped(x+Disp_Vector(x,y,2),y+Disp_Vector(x,y,1)) + weight(x,y); % plot the used displacement vectors a = {'Displacement Vector '}; b = {num2str(index)}; ab = strcat(a, b) quiver(used_disp_vector(:,:,1),used_disp_vector(:,:,2),0),title(ab); Figure 11: Displacement Vectors 12

13 g. Create the Mapped Image % smooth the mapped image Mapped=imfilter(Mapped,h,'replicate','conv'); % plot the mapped image obtained after smoothing a = {'Mapped Image after Blurring with Gaussian '}; b = {num2str(index)}; ab = strcat(a, b) figure,imagesc(mapped,'xdata',m,'ydata',n),title(ab),impixelinfo,colormap(' gray'); Figure 12: Mapped Image After Blurring with Gaussian 13

14 h. Find the maximum isocenter % Find the maximum isocenter [y_pixel(index),x_pixel(index)]=find(mapped==max(mapped(:))); Mapped(Mapped<max(Mapped(:)))=0; % plot the result a = {'Result '}; b = {num2str(index)}; ab = strcat(a, b) figure,imagesc(mapped,'xdata',m,'ydata',n),title(ab),impixelinfo,colormap(' gray'); Figure 13: Maximum Isocenters are found in each image 14

15 i. Show the result. This result gives the location of eyes and shows them in the original image: x_pixel(1)=x_pixel(1)+m(1); y_pixel(1)=y_pixel(1)+n(1); x_pixel(2)=x_pixel(2)+m(1)+0.50*size(j,2); y_pixel(2)=y_pixel(2)+n(1); % Display the resulting image. figure('name','result Image - Eye Locations Are Found'), imshow(i,[],'initialmagnification','fit'),title('result Image - Eye Locations Are Found'),impixelinfo,colormap('gray'); hold on; plot(x_pixel(1),y_pixel(1),'g*'); plot(x_pixel(2),y_pixel(2),'r*'); x_pixel(1),y_pixel(1) x_pixel(2),y_pixel(2) hold off; Figure 14: Result Image: Eye locations are found 15

16 Figure 15: Left eye is at (57,38) and Right eye is at (116,37) Left eye is found at (58, 38). Right eye is found at (116, 37). Ground truth shows that: Left eye is at (49, 32), Right eye is at (111, 33). Other Image Results: 16

17 17

18 18

Chapter 9. Face Recognition Systems

Chapter 9. Face Recognition Systems Chapter 9 Face Recognition Systems On successful completion of this course, students will be able to: Explain how to detect face in OpenCV. Develop face recognition systems using library in OpenCV. Introduction

More information

ECE 661 HW 1. Chad Aeschliman

ECE 661 HW 1. Chad Aeschliman ECE 661 HW 1 Chad Aeschliman 2008-09-09 1 Problem The problem is to determine the homography which maps a point or line from a plane in the world to the image plane h 11 h 12 h 13 x i = h 21 h 22 h 23

More information

Testing Different Classification Approaches Based on Face Recognition

Testing Different Classification Approaches Based on Face Recognition 2013 Testing Different Classification Approaches Based on Face Recognition AHMED ABULILA ECE539 FINAL PROJECT UNIVERSITY OF WISCONSIN MADISON Introduction Identity verification solutions are one of the

More information

ECE 661 HW_4. Bharath Kumar Comandur J R 10/02/2012. In this exercise we develop a Harris Corner Detector to extract interest points (such as

ECE 661 HW_4. Bharath Kumar Comandur J R 10/02/2012. In this exercise we develop a Harris Corner Detector to extract interest points (such as ECE 661 HW_4 Bharath Kumar Comandur J R 10/02/2012 1 Introduction In this exercise we develop a Harris Corner Detector to extract interest points (such as corners) in a given image. We apply the algorithm

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

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

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

Intel Technology Journal

Intel Technology Journal Volume 09 Issue 02 Published, May 19, 2005 ISSN 1535-864X DOI: 10.1535/itj.0902 Intel Technology Journal Compute-Intensive, Highly Parallel Applications and Uses Learning-Based Computer Vision with Intel

More information

ECE 661 HW6 Report. Lu Wang 10/28/2012

ECE 661 HW6 Report. Lu Wang 10/28/2012 ECE 661 HW6 Report Lu Wang 10/28/2012 1.Problem In this homework, we perform the Otsu s algorithm to segment out the interest region form a color image of the Lake Tahoe. Then extract the contour of the

More information

Duc Nguyen CSE 420 Computer Graphics 10/10/2018 Homework 1

Duc Nguyen CSE 420 Computer Graphics 10/10/2018 Homework 1 Duc Nguyen CSE 420 Computer Graphics 10/10/2018 Homework 1 1. The endpoints of a given line are (0, 0) and (18, 6). Compute the first 4 values of y manually using Bresenham's Line Algorithm as x steps

More information

- It computes the Standard Deviation by calculating the difference of each channel (R,G,B and A) of a pixel.

- It computes the Standard Deviation by calculating the difference of each channel (R,G,B and A) of a pixel. Standard Deviation: It is common to find comparison of two bitmaps in Image Processing Development. Comparison of two bitmaps means how each pixel of image1 is different from corresponding pixel of image2

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

Introduction This TP requires Windows and UNITY 5.

Introduction This TP requires Windows and UNITY 5. TP - Desktop VR: Head tracking and asymmetric frustum with OpenCVSharp and Unity This tutorial has been printed from http://henriquedebarba.com/index.php/0/0/0//, use that website if possible as copy-pasting

More information

Final Report. Terminator by Ju Zong April 22, 2014

Final Report. Terminator by Ju Zong April 22, 2014 Final Report Terminator by Ju Zong April 22, 2014 University of Florida Department of Electrical and Computer Engineering EEL 5666 Instructors: A. Antonio Arroyo, Eric M. Schwartz TAs: Josh Weaver, Andy

More information

typedef Labeling<unsigned char,short> LabelingBS; typedef Labeling<unsigned char,short>::regioninfo RegionInfoBS;

typedef Labeling<unsigned char,short> LabelingBS; typedef Labeling<unsigned char,short>::regioninfo RegionInfoBS; 2005 7 19 1 ( ) Labeling 2 C++ STL(Standard Template Library) g++ (GCC) 3.3.2 3 3.1 Labeling SrcT DstT SrcT: unsigned char, shoft DstT: short typedef 1. unsigned char, short typedef Labeling

More information

REAL-TIME FACIAL FEATURE POINT DETECTION AND TRACKING IN A VIDEO SEQUENCE

REAL-TIME FACIAL FEATURE POINT DETECTION AND TRACKING IN A VIDEO SEQUENCE Computer Modelling and New Technologies, 2013, vol.17, no.2, 48 52 Transport and Telecommunication Institute, Lomonosov 1, LV-1019, Riga, Latvia REAL-TIME FACIAL FEATURE POINT DETECTION AND TRACKING IN

More information

ECE661 Computer Vision : HW2

ECE661 Computer Vision : HW2 ECE661 Computer Vision : HW2 Kihyun Hong September 19, 2006 1 Problem Description In this homework assignment, our task is to convert a geometric distorted image to a front view image. First, warp a projective

More information

Example 1: Color-to-Grayscale Image Processing

Example 1: Color-to-Grayscale Image Processing GPU Teaching Kit Accelerated Computing Lecture 16: CUDA Parallelism Model Examples Example 1: Color-to-Grayscale Image Processing RGB Color Image Representation Each pixel in an image is an RGB value The

More information

Chapter 6. Introduction to OpenCV

Chapter 6. Introduction to OpenCV Chapter 6 Introduction to OpenCV On successful completion of this course, students will be able to: Explain the roles of Computer Vision. Install OpenCV for image processing. Use CANNY Edge detector.

More information

stanford hci group / cs377s Lecture 8: OpenCV Dan Maynes-Aminzade Designing Applications that See

stanford hci group / cs377s Lecture 8: OpenCV Dan Maynes-Aminzade Designing Applications that See stanford hci group / cs377s Designing Applications that See Lecture 8: OpenCV Dan Maynes-Aminzade 31 January 2008 Designing Applications that See http://cs377s.stanford.edu Reminders Pick up Assignment

More information

Transportation Informatics Group, ALPEN-ADRIA University of Klagenfurt. Transportation Informatics Group University of Klagenfurt 12/24/2009 1

Transportation Informatics Group, ALPEN-ADRIA University of Klagenfurt. Transportation Informatics Group University of Klagenfurt 12/24/2009 1 Machine Vision Transportation Informatics Group University of Klagenfurt Alireza Fasih, 2009 12/24/2009 1 Address: L4.2.02, Lakeside Park, Haus B04, Ebene 2, Klagenfurt-Austria 2D Shape Based Matching

More information

C = i. d(x i, ˆx i ) 2 + d( x i, Ĥˆx i) 2

C = i. d(x i, ˆx i ) 2 + d( x i, Ĥˆx i) 2 ECE661 HW5 Chad Aeschliman 10/23/08 1 Problem Statement The problem is to determine the homography between two similar images. RANSAC is to be used to prune a crude set of correspondences down to good

More information

Programming and Pictures: Computational Photography and Applications to Math and Physics. GISA 2016 Session 131 Marist School Christopher Michaud

Programming and Pictures: Computational Photography and Applications to Math and Physics. GISA 2016 Session 131 Marist School Christopher Michaud Programming and Pictures: Computational Photography and Applications to Math and Physics GISA 2016 Session 131 Marist School Christopher Michaud Purpose Explore how math and physics concepts are used to

More information

CS-211 Fall 2017 Test 1 Version Practice For Test on Oct. 2, Name:

CS-211 Fall 2017 Test 1 Version Practice For Test on Oct. 2, Name: CS-211 Fall 2017 Test 1 Version Practice For Test on Oct. 2, 2017 True/False Questions... Name: 1. (10 points) For the following, Check T if the statement is true, the F if the statement is false. (a)

More information

Introduction to Languages for Scientific Computing, winter semester 14/15: Final Exam

Introduction to Languages for Scientific Computing, winter semester 14/15: Final Exam Introduction to Languages for Scientific Computing, winter semester 14/15: Final Exam Lecture given by: Paolo Bientinesi First exam, 10.02.2015 The following document is a transcript from memory created

More information

CSE/EE-576, Final Project

CSE/EE-576, Final Project 1 CSE/EE-576, Final Project Torso tracking Ke-Yu Chen Introduction Human 3D modeling and reconstruction from 2D sequences has been researcher s interests for years. Torso is the main part of the human

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

Representation of image data

Representation of image data Representation of image data Images (e.g. digital photos) consist of a rectanglular array of discrete picture elements called pixels. An image consisting of 200 pixels rows of 300 pixels per row contains

More information

Computer Vision

Computer Vision 15-780 Computer Vision J. Zico Kolter April 2, 2014 1 Outline Basics of computer images Image processing Image features Object recognition 2 Outline Basics of computer images Image processing Image features

More information

CS-211 Fall 2017 Test 1 Version A Oct. 2, Name:

CS-211 Fall 2017 Test 1 Version A Oct. 2, Name: CS-211 Fall 2017 Test 1 Version A Oct. 2, 2017 True/False Questions... Name: 1. (10 points) For the following, Check T if the statement is true, the F if the statement is false. (a) T F : If I code a C

More information

Gaze Tracking. Introduction :

Gaze Tracking. Introduction : Introduction : Gaze Tracking In 1879 in Paris, Louis Émile Javal observed that reading does not involve a smooth sweeping of the eyes along the text, as previously assumed, but a series of short stops

More information

Math Homework 3

Math Homework 3 Math 0 - Homework 3 Due: Friday Feb. in class. Write on your paper the lab section you have registered for.. Staple the sheets together.. Solve exercise 8. of the textbook : Consider the following data:

More information

ECE661 Computer Vision : HW1

ECE661 Computer Vision : HW1 ECE661 Computer Vision : HW1 Kihyun Hong September 5, 2006 1 Problem Description In this HW, our task is to inverse the distorted images to undistorted images by calculationg the projective transform that

More information

Assignment 1 - Use OpenCV for camera calibration

Assignment 1 - Use OpenCV for camera calibration ME/CS 132A_Winter 2015 Theory Assignment 1 - Use OpenCV for camera calibration For the distortion OpenCV takes into account the radial and tangential factors. For the radial factor one uses the following

More information

ianpr SDK Version 1.7 Documentation

ianpr SDK Version 1.7 Documentation ianpr SDK Version 1.7 Documentation 2018. IntBuSoft 1 CONTENTS Introduction 1. Modules 1.1. Recognition module ianpr anprplate Structure ANPR_OPTIONS Types of recognizable numbers Type ANPR_CUSTOM_TYPE

More information

CS 223: Data Structures and Programming Techniques. Exam 2

CS 223: Data Structures and Programming Techniques. Exam 2 CS 223: Data Structures and Programming Techniques. Exam 2 Instructor: Jim Aspnes Work alone. Do not use any notes or books. You have approximately 75 minutes to complete this exam. Please write your answers

More information

Andrew Yenalavitch Homework 1 CSE Fall 2014

Andrew Yenalavitch Homework 1 CSE Fall 2014 Andrew Yenalavitch Homework 1 CSE 420 - Fall 2014 1.) ( 20 points ) In the class, we have discussed how to draw a line given by y = m x + b using Besenham's algorithm with m 1. Extend the algorithm to

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

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

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

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

Real Time Data Plotting

Real Time Data Plotting Real Time Data Plotting Introduction This lesson will show how to write a program plot data on a X-Y graph. On the Arduino, write a program to sample a sensor and print the voltage to the Serial interface.

More information

CS4670 Final Report Hand Gesture Detection and Recognition for Human-Computer Interaction

CS4670 Final Report Hand Gesture Detection and Recognition for Human-Computer Interaction CS4670 Final Report Hand Gesture Detection and Recognition for Human-Computer Interaction By, Roopashree H Sreenivasa Rao (rhs229) Jonathan Hirschberg (jah477) Index: I. Abstract II. Overview III. Design

More information

Creating an Animated Image in SFML Creating Packed Images in SFML

Creating an Animated Image in SFML Creating Packed Images in SFML Creating an Animated Image in SFML Creating Packed Images in SFML 1. Download the file names spritesheettools.zip and unzip this folder. It will be named spritesheettools 2. Inside this folder you will

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

Edge detection. Winter in Kraków photographed by Marcin Ryczek

Edge detection. Winter in Kraków photographed by Marcin Ryczek Edge detection Winter in Kraków photographed by Marcin Ryczek Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image

More information

OpenCL Implementation and Performance Verification on R-Car H3/AGL

OpenCL Implementation and Performance Verification on R-Car H3/AGL 2018 NTT DATA MSE Corporation OpenCL Implementation and Performance Verification on R-Car H3/AGL May 25th, 2018 NTT DATA MSE Corporation Yasumitsu Takahashi Agenda Introduction to our Activities System

More information

Digital Image Fundamentals. Prof. George Wolberg Dept. of Computer Science City College of New York

Digital Image Fundamentals. Prof. George Wolberg Dept. of Computer Science City College of New York Digital Image Fundamentals Prof. George Wolberg Dept. of Computer Science City College of New York Objectives In this lecture we discuss: - Image acquisition - Sampling and quantization - Spatial and graylevel

More information

CS 315 Data Structures Fall Figure 1

CS 315 Data Structures Fall Figure 1 CS 315 Data Structures Fall 2012 Lab # 3 Image synthesis with EasyBMP Due: Sept 18, 2012 (by 23:55 PM) EasyBMP is a simple c++ package created with the following goals: easy inclusion in C++ projects,

More information

Class Test 5. Create a simple paint program that conforms to the following requirements.

Class Test 5. Create a simple paint program that conforms to the following requirements. Class Test 5 Question 1 Use visual studio 2012 ultimate to create a C# windows forms application. Create a simple paint program that conforms to the following requirements. The control box is disabled

More information

Edge detection. Winter in Kraków photographed by Marcin Ryczek

Edge detection. Winter in Kraków photographed by Marcin Ryczek Edge detection Winter in Kraków photographed by Marcin Ryczek Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, edges carry most of the semantic and shape information

More information

CSE 12 Spring 2016 Week One, Lecture Two

CSE 12 Spring 2016 Week One, Lecture Two CSE 12 Spring 2016 Week One, Lecture Two Homework One and Two: hw2: Discuss in section today - Introduction to C - Review of basic programming principles - Building from fgetc and fputc - Input and output

More information

An Introduction to Video Compression in C/C++ Fore June

An Introduction to Video Compression in C/C++ Fore June 1 An Introduction to Video Compression in C/C++ Fore June 1 Chapter 1 Image and Video Storage Formats There are a lot of proprietary image and video file formats, each with clear strengths and weaknesses.

More information

Scale Invariant Feature Transform

Scale Invariant Feature Transform Scale Invariant Feature Transform Why do we care about matching features? Camera calibration Stereo Tracking/SFM Image moiaicing Object/activity Recognition Objection representation and recognition Image

More information

OpenCV Tutorial. Part II Loading Images and Using Histograms. 29 November Gavin S Page

OpenCV Tutorial. Part II Loading Images and Using Histograms. 29 November Gavin S Page OpenCV Tutorial Part II Loading Images and Using Histograms 29 November 2005 Gavin S Page Tasks The first step after establishing a working environment is to begin manipulating images. This tutorial will

More information

Question 2. [5 points] Given the following symbolic constant definition

Question 2. [5 points] Given the following symbolic constant definition CS 101, Spring 2012 Mar 20th Exam 2 Name: Question 1. [5 points] Determine which of the following function calls are valid for a function with the prototype: void drawrect(int width, int height); Assume

More information

pixelman Pixel Manipulation Language Anthony Chan tc2665 Teresa Choe tc2716 Gabriel Lucas Kramer-Garcia glk2110 Brian Tsau bt2420

pixelman Pixel Manipulation Language Anthony Chan tc2665 Teresa Choe tc2716 Gabriel Lucas Kramer-Garcia glk2110 Brian Tsau bt2420 pixelman Pixel Manipulation Language Anthony Chan tc2665 Teresa Choe tc2716 Gabriel Lucas Kramer-Garcia glk2110 Brian Tsau bt2420 1. Introduction/Rationale pixelman is a programming language that can be

More information

CSIT 691 Independent Project. Video indexing

CSIT 691 Independent Project. Video indexing CSIT 691 Independent Project Video indexing Student: Zhou Zigan Email: zzhouag@ust.hk Supervisor: Prof. David Rossiter Contents 1. INTRODUCTION... 1 2. BASIC CONCEPT... 1 2.1 VIDEO FRAME... 2 2.2 FRAME

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

Exercises C-Programming

Exercises C-Programming Exercises C-Programming Claude Fuhrer (claude.fuhrer@bfh.ch) 0 November 016 Contents 1 Serie 1 1 Min function.................................. Triangle surface 1............................... 3 Triangle

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

Homework 4: (GRADUATE VERSION)

Homework 4: (GRADUATE VERSION) Homework 4: Wavefront Path Planning and Path Smoothing (GRADUATE VERSION) Assigned: Thursday, October 16, 2008 Due: Friday, October 31, 2008 at 23:59:59 In this assignment, you will write a path planner

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

Scale Invariant Feature Transform

Scale Invariant Feature Transform Why do we care about matching features? Scale Invariant Feature Transform Camera calibration Stereo Tracking/SFM Image moiaicing Object/activity Recognition Objection representation and recognition Automatic

More information

Foot Type Measurement System by Image Processing. by Xu Chang. Advised by Prof. David Rossiter

Foot Type Measurement System by Image Processing. by Xu Chang. Advised by Prof. David Rossiter Foot Type Measurement System by Image Processing by Xu Chang Advised by Prof. David Rossiter Content 1.Introduction... 3 1.1 Background... 3 2.1 Overview... 3 2. Analysis and Design of Foot Measurement

More information

C programming basics T3-1 -

C programming basics T3-1 - C programming basics T3-1 - Outline 1. Introduction 2. Basic concepts 3. Functions 4. Data types 5. Control structures 6. Arrays and pointers 7. File management T3-2 - 3.1: Introduction T3-3 - Review of

More information

ECE264 Fall 2013 Exam 1, September 24, 2013

ECE264 Fall 2013 Exam 1, September 24, 2013 ECE264 Fall 2013 Exam 1, September 24, 2013 In signing this statement, I hereby certify that the work on this exam is my own and that I have not copied the work of any other student while completing it.

More information

Progress Review 1 Tushar Agrawal. Team A - Avengers Teammates: Adam Yabroudi, Pratik Chatrath, Sean Bryan ILR #2

Progress Review 1 Tushar Agrawal. Team A - Avengers Teammates: Adam Yabroudi, Pratik Chatrath, Sean Bryan ILR #2 Progress Review 1 Tushar Agrawal Team A - Avengers Teammates: Adam Yabroudi, Pratik Chatrath, Sean Bryan ILR #2 October 23, 2015 1. Individual Progress For the week, I was responsible for setting up the

More information

Edge Detection CSC 767

Edge Detection CSC 767 Edge Detection CSC 767 Edge detection Goal: Identify sudden changes (discontinuities) in an image Most semantic and shape information from the image can be encoded in the edges More compact than pixels

More information

B.E.I.T. ( ) 3D

B.E.I.T. ( ) 3D 1 Abstract : We propose a system for 3D Face Recognition and Detection that describes an systematic approach by taking 3D image as input than it is converted to an equivalent 2D image & then by applying

More information

The Data may not be disclosed or distributed to third parties, in whole or in part, without the prior written consent of Motion Workshop.

The Data may not be disclosed or distributed to third parties, in whole or in part, without the prior written consent of Motion Workshop. C API Reference Motion Version 2.6 www.motionnode.com www.motionshadow.com Copyright c 2017 Motion Workshop. All rights reserved. The coded instructions, statements, computer programs, and/or related material

More information

SECTION A TRUE / FALSE QUESTIONS (10 MARKS) (INSTRUCTION: Please answer all 10 questions)

SECTION A TRUE / FALSE QUESTIONS (10 MARKS) (INSTRUCTION: Please answer all 10 questions) SECTION A TRUE / FALSE QUESTIONS ( MARKS) (INSTRUCTION: Please answer all questions) 1) In pre-test loop, the condition is tested first, before executing the body of the loop. ) The while loop can be used

More information

Image Processing (1) Basic Concepts and Introduction of OpenCV

Image Processing (1) Basic Concepts and Introduction of OpenCV Intelligent Control Systems Image Processing (1) Basic Concepts and Introduction of OpenCV 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

Digital Image Processing. Image Enhancement - Filtering

Digital Image Processing. Image Enhancement - Filtering Digital Image Processing Image Enhancement - Filtering Derivative Derivative is defined as a rate of change. Discrete Derivative Finite Distance Example Derivatives in 2-dimension Derivatives of Images

More information

by modifying the glutinitwindowsize() function you can change the screen size to whatever you please.

by modifying the glutinitwindowsize() function you can change the screen size to whatever you please. Zoe Veale Lab 2 Draw2 part 1: I edited the glutinitwindowsize() function tom change the size of my screen window. int main(int argc, char** argv) glutinit(&argc, argv); //initialize toolkit glutinitdisplaymode

More information

IMAGE PROCESSING AND OPENCV. Sakshi Sinha Harshad Sawhney

IMAGE PROCESSING AND OPENCV. Sakshi Sinha Harshad Sawhney l IMAGE PROCESSING AND OPENCV Sakshi Sinha Harshad Sawhney WHAT IS IMAGE PROCESSING? IMAGE PROCESSING = IMAGE + PROCESSING WHAT IS IMAGE? IMAGE = Made up of PIXELS. Each Pixels is like an array of Numbers.

More information

Opening OpenCV. Junior Journal. Journal Name. Regular Paper

Opening OpenCV. Junior Journal. Journal Name. Regular Paper Junior Journal Journal Name Regular Paper Markus Hovorka 1, Clemens Jung 1, Thomas Langenau 1, Philipp Lütge 2,, Patrick Podest 1, Veronika Schrenk 1 and Bruno Tiefengraber 1 1 HTBLuVA Wr. Neustadt, Austria

More information

Filtering (I) Agenda. Getting to know images. Image noise. Image filters. Dr. Chang Shu. COMP 4900C Winter 2008

Filtering (I) Agenda. Getting to know images. Image noise. Image filters. Dr. Chang Shu. COMP 4900C Winter 2008 Filtering (I) Dr. Chang Shu COMP 4900C Winter 008 Agenda Getting to know images. Image noise. Image filters. 1 Digital Images An image - rectangular array of integers Each integer - the brightness or darkness

More information

Edge detection. Goal: Identify sudden. an image. Ideal: artist s line drawing. object-level knowledge)

Edge detection. Goal: Identify sudden. an image. Ideal: artist s line drawing. object-level knowledge) Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded in the edges More compact than pixels Ideal: artist

More information

Basic C Programming (2) Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

Basic C Programming (2) Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island Basic C Programming (2) Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island Data Types Basic Types Enumerated types The type void Derived types

More information

1- Write a single C++ statement that: A. Calculates the sum of the two integrates 11 and 12 and outputs the sum to the consol.

1- Write a single C++ statement that: A. Calculates the sum of the two integrates 11 and 12 and outputs the sum to the consol. 1- Write a single C++ statement that: A. Calculates the sum of the two integrates 11 and 12 and outputs the sum to the consol. B. Outputs to the console a floating point number f1 in scientific format

More information

1 SAT-DANCE-HEULE INTRO 1

1 SAT-DANCE-HEULE INTRO 1 1 SAT-DANCE-HEULE INTRO 1 May 19, 2018 at 02:31 1. Intro. Given an exact cover problem, presented on stdin in the format used by DANCE, we generate clauses for an equivalent satisfiability problem in the

More information

Filtering (I) Dr. Chang Shu. COMP 4900C Winter 2008

Filtering (I) Dr. Chang Shu. COMP 4900C Winter 2008 Filtering (I) Dr. Chang Shu COMP 4900C Winter 008 Agenda Getting to know images. Image noise. Image filters. Digital Images An image - rectangular array of integers Each integer - the brightness or darkness

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

Image Steganalysis Image Steganography

Image Steganalysis Image Steganography //Joshua Tracy #include #include #include "opencv2/opencv.hpp" #include #include #include #include using

More information

CISC 1600, Lab 2.1: Processing

CISC 1600, Lab 2.1: Processing CISC 1600, Lab 2.1: Processing Prof Michael Mandel 1 Getting set up For this lab, we will be using Sketchpad, a site for building processing sketches online using processing.js. 1.1. Go to http://cisc1600.sketchpad.cc

More information

Instruction for IVR interface

Instruction for IVR interface This document is aimed at helping users to use IVR interface developing applications that will be able to run and display on integrated computer. Instruction for IVR interface IDEALENS 2016.11.1 CONTENTS

More information

Automatically Log Off Upon Disappearance of Facial Image

Automatically Log Off Upon Disappearance of Facial Image Automatically Log Off Upon Disappearance of Facial Image Xue Dong Yang Department of Computer Science University of Regina Regina, Saskatchewan S4S 0A2 Peter Kort Department of Computer Science University

More information

Lecture 16. Daily Puzzle. Functions II they re back and they re not happy. If it is raining at midnight - will we have sunny weather in 72 hours?

Lecture 16. Daily Puzzle. Functions II they re back and they re not happy. If it is raining at midnight - will we have sunny weather in 72 hours? Lecture 16 Functions II they re back and they re not happy Daily Puzzle If it is raining at midnight - will we have sunny weather in 72 hours? function prototypes For the sake of logical clarity, the main()

More information

Recall that creating or declaring a variable can be done as follows:

Recall that creating or declaring a variable can be done as follows: Lesson 2: & Conditionals Recall that creating or declaring a variable can be done as follows:! float radius = 20;! int counter = 5;! string name = Mr. Nickel ;! boolean ispressed = true;! char grade =

More information

Project Report for EE7700

Project Report for EE7700 Project Report for EE7700 Name: Jing Chen, Shaoming Chen Student ID: 89-507-3494, 89-295-9668 Face Tracking 1. Objective of the study Given a video, this semester project aims at implementing algorithms

More information

Check the Desktop development with C++ in the install options. You may want to take 15 minutes to try the Hello World C++ tutorial:

Check the Desktop development with C++ in the install options. You may want to take 15 minutes to try the Hello World C++ tutorial: CS262 Computer Vision OpenCV 3 Configuration with Visual Studio 2017 Prof. John Magee Clark University Install Visual Studio 2017 Community Check the Desktop development with C++ in the install options.

More information

Guile-GNOME: PangoCairo

Guile-GNOME: PangoCairo Guile-GNOME: PangoCairo version 2.16.2, updated 9 December 2011 Owen Taylor Behdad Esfahbod many others This manual is for (gnome pangocairo) (version 2.16.2, updated 9 December 2011) Copyright 2001-2007

More information

PROGRAMMING IN C++ CVIČENÍ

PROGRAMMING IN C++ CVIČENÍ PROGRAMMING IN C++ CVIČENÍ INFORMACE Michal Brabec http://www.ksi.mff.cuni.cz/ http://www.ksi.mff.cuni.cz/~brabec/ brabec@ksi.mff.cuni.cz gmichal.brabec@gmail.com REQUIREMENTS FOR COURSE CREDIT Basic requirements

More information

de facto standard C library Contains a bunch of header files and APIs to do various tasks

de facto standard C library Contains a bunch of header files and APIs to do various tasks CSE333 SECTION 6 GNU C Library de facto standard C library Contains a bunch of header files and APIs to do various tasks Don t need to memorize everything Do need to know what if there s an API that can

More information

PROGRAMMING IN C LAB MANUAL FOR DIPLOMA IN ECE/EEE

PROGRAMMING IN C LAB MANUAL FOR DIPLOMA IN ECE/EEE PROGRAMMING IN C LAB MANUAL FOR DIPLOMA IN ECE/EEE 1. Write a C program to perform addition, subtraction, multiplication and division of two numbers. # include # include int a, b,sum,

More information

SURF: Speeded Up Robust Features. CRV Tutorial Day 2010 David Chi Chung Tam Ryerson University

SURF: Speeded Up Robust Features. CRV Tutorial Day 2010 David Chi Chung Tam Ryerson University SURF: Speeded Up Robust Features CRV Tutorial Day 2010 David Chi Chung Tam Ryerson University Goals of SURF A fast interest point detector and descriptor Maintaining comparable performance with other detectors

More information

CpSc 1010, Fall 2014 Lab 10: Command-Line Parameters (Week of 10/27/2014)

CpSc 1010, Fall 2014 Lab 10: Command-Line Parameters (Week of 10/27/2014) CpSc 1010, Fall 2014 Lab 10: Command-Line Parameters (Week of 10/27/2014) Goals Demonstrate proficiency in the use of the switch construct and in processing parameter data passed to a program via the command

More information

2. Pointer to Array of Structure stores the Base address of the Structure array.

2. Pointer to Array of Structure stores the Base address of the Structure array. Pointer to Array of Structure 1. Pointer Variable can also Store the Address of the Structure Variable. 2. Pointer to Array of Structure stores the Base address of the Structure array. 3. Suppose struct

More information

Write a program that creates in the main function two linked lists of characters and fills them with the following values:

Write a program that creates in the main function two linked lists of characters and fills them with the following values: Write a program that creates in the main function two linked lists of characters and fills them with the following values: The first list will have 3 nodes with the following characters: A,B, and C. The

More information