COSC 445 – Computer Vision Winter 2020 T1 Dr. M. S. Shehata A7 (20 points) – Due Nov. 27th, 2020 Focus: Corner Detection, HOG, SVM 1. [10 points]: Implement corner detection algorithm using the following steps: a) Filter the image f(x, y) with derivatives of a Gaussian G(x, y, σ1). You can use Sobel operator to apply the derivative. For Guassian use mask size 6 σ1 (, ) = (, , 1) ∗ ′(, ) = ∗ ′(, ) = ∗ b) Form three maps: (, ) = (′) 2 (, ) = (′)(′) (, ) = (′) 2 c) Blur these maps with a Gaussian G(x, y, σ2), with mask size 6 σ2: (, ) = (, , 2) ∗ (, ) = (, , 2) ∗ (, ) = (, , 2) ∗ d) Compute: (, ) = + (, ) = − 2 e) Compute: (, ) = − 2 f) Compute local max of R(x, y) by applying non-maximum suppression over a 3 × 3 neighborhood of each point. g) Threshold R0 is used to prune points with R(x, y) < R0, where R0 = 0.01×max(R(x, y)) h) Locate all points in R(x,y) and draw small rectangle at each point on the input image Write a Matlab function DetectCorners that detect the corners in a given image. Then display the detected corners over the image I = imread('4.png'); ImageWithCorners = DetectCorners(I,0.7,3,0.04); The first parameter is the input image, second and third parameters are σ1, σ2 and the last parameter is α COSC 445 – Computer Vision Winter 2020 T1 Dr. M. S. Shehata [10 points]: Write a Matlab script that extract Histogram of Oriented Gradients (HOG) features from the training images, and use the extracted features to train Support Vector Machine (SVM). Then use the trained SVM to classify the testing images to either Human or Not Human. In you implementation, after reading each image you need to resize it to a fixed size (128,64) to get a fixed size feature vector from HOG. To extract HOG you can use the matlab built-in function “extractHOGFeatures”. Training of the SVM using the function “fitcsvm” and to classify use the function “predict”. Create a table in .docx file showing the classification accuracy versus different cell size (2, 4, 8, 16, 32) for HOG . Submission Instructions 1- For question Q1 write a separate Matlab program or function. For question 2, upload the Matlab code and .docx file with the table of accuracies. These two questions are to be solved individually (no group work). 2- Submit everything as one zip file to Canvas. Note that you can resubmit an assignment, but the new submission overwrites the old submission and receives a new timestamp. Marking guide: +8 for all steps (i.e., +1 for each step) +1 displaying corners +1 logical flow and correctness Marking guide: +1 resize images into fixed size +2 extracting HOG features +2 training SVM +2 classifying using SVM and calculating accuracy +1 reaching accuracy >= 80% +2 table of accuracies in .docx file
欢迎咨询51作业君