170 likes | 349 Views
REU Week 1. Presented by Christina Peterson. Edge Detection. Sobel Convolve image with derivative masks: x: y: Calculate gradient magnitude Apply threshold. Edge Detection. Marr Hildreth Apply Laplacian of Gaussian to an image Find zero crossings
E N D
REU Week 1 Presented by Christina Peterson
Edge Detection • Sobel • Convolve image with derivative masks: • x: • y: • Calculate gradient magnitude • Apply threshold
Edge Detection • Marr Hildreth • Apply Laplacian of Gaussian to an image • Find zero crossings • {+,-}, {+, 0, -}, {-, +}, {-, 0, +} • Mark edges • Apply threshold to slope of zero-crossings
Edge Detection • Canny • Convolve image with first derivative of gaussian • Find magnitude of gradient and orientation • Apply non-max suppression • For each pixel, check if it is a local max by comparing it to neighbor pixels along normal direction to an edge • Apply hysteria thresholding
Canny Example Original Image Canny Output
Harris Corner Detector • Implemented Harris Corner Detector • 1. x and y derivatives • Ix=conv2(double(I), maskx, ‘same’) • Iy=conv2(double(I), masky, ‘same’) • 2. products of derivatives • Ix2=Ix.*Ix • Iy2=Iy.*Iy • Ixy=Ix.*Iy • 3. sums of products of derivatives • Sx2=gauss_filter(Ix2, sigma, kernel_size) • Sy2=gauss_filter(Iy2, sigma, kernel,size) • Sxy=gauss_filter(Ixy, sigma, kernel_size)
Harris Corner Detector • 4. Define matrix H(x,y): • For j=1:columns, • For i=1:rows, • H{ i, j } = [Sx2(i, j) Sxy(i, j); Sxy(i, j) Sy2(i, j) • 5. Response Detector • For j=1:columns, • For i=1:rows, • R( i, j ) = det(H{ i, j } )– k*(trace(H{ i, j }))^2 • 6. Apply threshold to R • Edge: R < -10000 • Corner: R > 10000
Sift • Purpose • To identify features of an image regardless of scale and rotation • Scale Space • Resize image to half size (octave) • Blur image by adjusting sigma • 4 octaves and 5 blur levels are recommended
Sift • Sift Features • Divide image into 4 x 4 windows • Divide each window into 4 x 4 subwindows • Calculate magnitude and gradient for each subwindow • Generate a histogram of 8 bins for each 4 x 4 window • Each bin represents a gradient orientation • 4 x 4 x 8 = 128 dimensions
Sift using Vl_feat Match candidates by finding patches that have the most similar SIFT descriptor
Optical Flow • Lucas Kanade Optical Flow • Does not work for areas of large motion • Resolved by Pyramids
Bag of Features • Implemented a Bag of Word classification • Divided image into frames • Concatenated sift descriptors for each frame • Kmeans2 to cluster features • Image represented as histogram • Used histograms as training data for SVM
Bag of Features • Results for 8 frames and 20 clusters: • 9.5% accuracy on test data • Conclusions: • Increase frames and clusters to improve accuracy
Research Topics • Survey on Multiple Human Tracking by Detection Methods • AfshinDehghan • Data Driven Attributes for Action Detection • RuiHou • Subspace Clustering via Graph Regularized Sparse Coding • NasimSouly