270 likes | 403 Views
Advance Computer Vision. Lectures 01 Roger S. Gaborski. Course Overview. This is a very interactive class If you like just sitting in a lecture and listening this class is not for you.
E N D
Advance Computer Vision Lectures 01 Roger S. Gaborski
Course Overview • This is a very interactive class • If you like just sitting in a lecture and listening this class is not for you. • We will use the same textbook from Introduction to Computer Vision and also Internet sources, including viewing videos from the site: http://videolectures.net/Top/Computer_Science/Computer_Vision • Your background from Introduction to Computer Vision will provide a solid foundation
There will be a central ‘theme project’ for the course – presented next week • The project will be divided into a number of sub-projects • Course activities • Lectures • A few videos • Homework • Quizzes/Exams • MAJOR Project
Divide main course project into sub-projects • Through class discussions determine important sub-projects (tasks) • Form groups based on student interest that will focus on sub-projects • Report weekly on progress • Integrate sub-projects into overall project
Grading • Homework 15% • Exams/Quizzes 25% • Project 60%
Features • Match corresponding feature points in images • In video, two temporally adjacent frames • In still images, two images of the same scene • Object tracking • Image Matching (database)
Issues • Lighting variations • Scale • Rotation
NEED TO FIND CORRESPONDENCE BETWEEN FEATURE POINTS IN TWO DIFFERENT IMAGES • Cannot match individual pixels • Need to use a window containing many pixels (5x5, 7x7, 21x21, etc)
Matching on a continuum like texture and edges not very robust • Many edges (and parts of edges) will match • At the very least: • Need to find interest points • Extract patches around interest points • Match patches
Feature Points / Correspondence • Points should be extracted consistently over different views • Points should be invariant to scaling, rotation, changes in illumination • Information in the neighborhood of the point should be unique so that it can be matched
Select Window RegionMatch Region in Second Image Calculate difference between the two patches WindowMatching_ACV.m
Randomly Select Patch patch = I(80:110,200:230); For Demonstration Use Only Strip Containing Patch
Normalized Cross Correlation (Refer to equation on page p313)Also MATLAB docs • w is template • w is average value of elements in template • f is the image • f is the average of the image where f and w overlap • Denominator normalizes resulting in an output range of -1, +1 • High value for absolute value of output is a good match
MATLAB Cross Correlation Function g = nornxcorr2(template, f)
Find Max Value in |g| d = abs(g); [ypeak, xpeak] = find(d == max(d(:))); %Adjust location by size of template ypeak = ypeak-(size(patch,1)-1)/2; xpeak = xpeak-(size(patch,2)-1)/2; fprintf('\n Center of Patch: ypeak is %d and xpeak is %d \n\n\n', ypeak, xpeak); figure, imshow(Igray) hold on plot(xpeak, ypeak, 'ro')
Red – strongest response Green – second strongest response
HW#1- Slides 12-17Due Thursday: rsg.advcv@gmail.com • Read in Purple Flower Image • Select a 31x31 patch • Extract image strip that contains patch • Calculate Error=Absolute Difference Between Patch and Strip and plot • Repeat using Normalized Cross Correlation on whole image • Plot max location on image • Email code, results and writeup to:rsg.advcv@gmail.com • You can work in teams of 2- list both names on report
But How Do We Select Points? • Junctions or Corners • Stable over changes in viewpoint
Moravec’s Corner Detector • Overview: • Select window size • Shift window over image region • If window over uniform region, shifts in all directions will result in small changes • If window over edge, shifts along edge will results in small changes, but shifts across edge will result in large changes • along edge – no change • Perpendicular to edge – large change • If window over corner, than shifts in all directions will result will result in large changes • Detect corner by finding regions that have large changes in all directions
Subtract First Window from Second Window Window moved vertically, no change Window moved horizontally, no change Window moved in either direction, large change
Harris Points • SIFT