WEEK 1-2 REVIEW Kylie Gorman CONVERTING AN IMAGE FROM RGB TO HSV AND DISPLAY CHANNELS Original HSV Version Hue Saturation Value EDGE DETECTION Sobel and Roberts Sobel X Sobel Y Roberts X Roberts Y Canny Edge Detector 1. Smooth image with Gaussian filter 2. Compute derivative of filtered image 3. Find magnitude and orientation of gradient 4. Apply “Nonmaximum Suppression” 5. Apply “Hysteresis Threshold” HARRIS CORNER DETECTOR Harris Corner Steps • Compute x and y derivatives of image • Compute products of derivatives at every pixel: Ix2 Ixy Iy2 • Compute the sums of the products of the derivatives at each pixel • Place each pixel into a matrix H • Compute R = Det(H) – k(Trace(H))^2 • Threshold on value of R My Own Implementation Harris Corner Function in MATLAB SCALE INVARIANT FEATURE TRANSFORM (SIFT) SIFT Algorithm: Finding Keypoints • Use Difference-of-Gaussian Function • Good approximation of Laplacian of Gaussian, but faster to compute • Construct Scale Space • Key Point Localization • Use Scale Space to Find Extrema • Throw Out Poorly Defined Peaks • Orientation Assignment • Multiple Orientations Improves Stability of Matching • Keypoint Descriptor • Computed from Local Image Gradients SIFT using Vl_feat Using SIFT to Match Same Image Different Images SUPPORT VECTOR MACHINES (SVM) Linear SVM Multi-Class SVM OPTICAL FLOW Optical Flow with Lucas-Kanade • The Optical Flow Equation fxu + fyv = -ft has 2 unknown variables • 3x3 window gives 9 equations with 2 unknown variables • Put equations into matrix to get Au = ft • To solve, multiply by the transpose of A: • ATAu = ATft • u = (ATA)-1AT ft • Least Square Fit • Solve for u and v Lucas-Kanade with Images Lucas-Kanade with Video Original Clip: http://www.youtube.com/watch?v=y6r8i_008SU Lucas-Kanade with Vector Results With Roberts Derivative Resized Image to ½ Original Resized Image to ¼ Original With Sobel Derivative Resized Image to ½ Original Resized Image to ¼ Original ADA BOOST ADA Boost • Expert is a pattern and a threshold • Convolve an image with pattern and plot value on a number line • Search for threshold Face Detection BAG OF WORDS/ FEATURES Bag of Words/ Features • Step One: Feature Extraction • Extract Regions (SIFT, Harris) • Compute Descriptors (SIFT) • Step Two: Quantization • Find Clusters and Frequencies (K-means) • Step Three: Classification • Compute Distance Matrix • Classification (SVM) PROJECT POSSIBILITIES Final Project • Project: Color-Attributes-Related Image Retrieval • Graduate Student: Yang Zhang • Goal: Enable people to retrieve an image according to an object with attributes or attributes alone. The project will focus on color as the starting attribute. • Program: MATLAB Steps • 1. Validating Model: Download other code and compare it to our own code. • 2. Coding: Add more features to the system the improve its performance. • 3. Collecting Dataset: There are not any existing color image datasets on the Internet. Use automatic image collecting tool to create our own color object dataset. • 4. Possible Bonus: Implement novel ideas about general attribute image retrieval system. Determine if it is effective or not.