High Level Computer Vision SS2015 Exercise 2: Object Identification (Released on 8th May, due on 15th May. Send your solution to walon@mpi-inf.mpg.de with adding [hlcv] to the caption)
Question 1: Image Representations, Histogram Distances normalized_hist.m : return normalized histogram of pixel intensities for a gray image color image (remember to rgb2gray) hist.m (matlab builtin function) normalized_hist.m (remember normalization) 2
Question 1: Image Representations, Histogram Distances Color Histograms: rgb_hist.m, rg_hist.m rgb_hist.m : Compute 3D histogram: H(R, G, B) = #(pixels with color (R,G,B)) Normalized the H(R,G,B) then return as a vector of size (num_bins) 3 rg_hist.m : Instead of R, G, B values, we use Chromatic representation Use only r and g to build the histogram of size (num_bins) 2 Similarly, normalize and return as a vector B G R + G + B = 1 R r = g = b = R R + G + B G R + G + B B R + G + B [Swain & Ballard, 1991] 3
Question 1: Image Representations, Histogram Distances Histogram of Gaussian Partial Derivatives: dxdy_hist.m First compute Gaussian partial derivatives on x and y directions gray image Dx Dy How to determine the numerical ranges for bins of histogram? As we learnt from the Exercise 1, Dx can be gotten by first gaussian filtering on y axis, then gaussian derivative filtering on x axis Assume σ for gaussian here is 6.0, when we use this gaussian derivative filter to convolve a image with extreme case, then the maximum value we can get is ~33.5420 Therefore to have bins of histogram distributed within [-34, 34] might be a good idea 4
Question 1: Image Representations, Histogram Distances Histogram of Gaussian Partial Derivatives: dxdy_hist.m Since we have have to assign both Dx and Dy into different bins, so in total there will be a histogram with size: (num_bins) 2 Please still remember to do the normalization then the summation of a histogram will be 1 5
Question 1: Image Representations, Histogram Distances Histogram Distances: dist_intersect.m, dist_l2.m, dist_chi2.m dist_intersect.m : common part between histograms dist_l2.m : Euclidean distance dist_chi2.m : Chi-square vation Please check pages 88, 89 and 90 on lecture slides: CV-SS15-04-29-filtering-instance for their properties 6
Question 2: Object Identification find_best_match.m: query-by-example scenario: query model Note that in the model and query folders we have arranged them such that the groundtruth match of i-th query image is the i-th model image Use the histogram and distance functions from Question 1 to find the matches of query images. Rank the similarities of all models images w.r.t query images. a distance matrix between all pairs of model and query images 7
Question 3: Precision and Recall good! bad! (Type I error) bad! (Type II error) good! on, not threshold: How certain do classifier have to be before they classify a +? classifier classifier classifier classifier TP FN FP TN more conservative more liberal [Some figures are from Prof. William H. Press, UT Austin] [http://en.wikipedia.org/wiki/precision_and_recall] 8
Question 3: Precision and Recall plot_rpc.m : use 1) distance matrix btw model and query images 2) different thresholds to plot the precision/recall curve. [Some figures are from Prof. William H. Press, UT Austin] [http://en.wikipedia.org/wiki/precision_and_recall] 9