cfu reu week 1 report

12
CFU REU Week 1 Report Shelby Thompson

Upload: chance

Post on 11-Feb-2016

46 views

Category:

Documents


0 download

DESCRIPTION

CFU REU Week 1 Report. Shelby Thompson. Session 2 Homework 1. For the first homework, I first read into MatLab a picture (the one on the right). I read this in with the simple MatLab command imread ( sun_dragon.jpg ); - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CFU REU Week 1 Report

CFU REU Week 1 Report

Shelby Thompson

Page 2: CFU REU Week 1 Report

Session 2 Homework 1

For the first homework, I first read into MatLab a picture (the one on the right). I read this in with the simple MatLab command imread (sun_dragon.jpg);

I then proceeded to get the picture representations of the hsv (hue, saturation, and value) channels.

Page 3: CFU REU Week 1 Report

Session 2 Homework 1

The image to the left represents the red hsv channel of the original picture. It is created using the command: rI1=I2(:,:,1); to create and assign the picture to a variable, and figure;imshow(rI1); to show it.

Page 4: CFU REU Week 1 Report

Session 2 Homework 1 Continued

The image to the right represents the green hsv channel of the original picture. It is created using the command: gI1=I2(:,:,2); to create and assign the picture to a variable, and figure;imshow(gI1); to show it.

Page 5: CFU REU Week 1 Report

Session 2 Homework 1 Continued

The image to the left represents the blue hsv channel of the original picture. It is created using the command: bI1=I2(:,:,3); to create and assign the picture to a variable, and figure;imshow(bI1); to show it.

Page 6: CFU REU Week 1 Report

Session 2 Homework 1 Continued

The image to the right represents the Laplacian of Gaussian using separability. It is achieved using this code: LoG=edge(rgb2gray(imread('sun_dragon.jpg')),'log', 0.5, 0.05);figure;imshow(LoG);

Page 7: CFU REU Week 1 Report

Session 2 Homework 1 Continued

The image to the left represents the Guassian filtered smoothed version of the original image. It is achieved using the code:hg=fspecial('gaussian',[35 35],50);I3=conv2(rgb2gray(imread('sun_dragon.jpg')),hg,'same');figure;imshow(uint8(I3));

Page 8: CFU REU Week 1 Report

Session 2 Homework 1 Continued

The image to the right represents the derivative of the filtered image. It is achieved using this code: gaussder=conv2(fspecial('gaussian',[35 35],50),[1 0 -1],'valid');figure;surf(gaussder);gaussI1=conv2(rgb2gray(imread('sun_dragon.jpg')),gaussder);figure;imshow(gaussI1);

Page 9: CFU REU Week 1 Report

Session 2 Homework 1 Continued

The image to the left represents the magnitude of the gradient. It is achieved using the code:gradMag=sqrt(vergradI2.^2+horgradI2.^2);figure;imshow(uint8(gradMag));

Page 10: CFU REU Week 1 Report

Session 2 Homework 1 Continued

The image to the right represents the non-maximal suppression of the image. It is achieved using this code:

imSup=edge(rgb2gray(imread('sun_dragon.jpg')),'canny'); figure;imshow(imSup);

Page 11: CFU REU Week 1 Report

Session 3 Homework 2Homework 2 focused highly on using SIFT on images. I performed the SIFT using this code:

pfx = fullfile(vl_root,'data', 'Derpy.png') ; I = imread(pfx) ; image(I) ; I = single(rgb2gray(I)) ; [f,d] = vl_sift(I) ; perm = randperm(size(f,2)) ; sel = perm(1:50) ; h1 = vl_plotframe(f(:,sel)) ; h2 = vl_plotframe(f(:,sel)) ; set(h1,'color','k','linewidth',3) ; set(h2,'color','y','linewidth',2) ; h3 = vl_plotsiftdescriptor(d(:,sel),f(:,sel)) ; set(h3,'color','g');fc = [100;100;10;-pi/8]; [f,d] = vl_sift(I,'frames',fc); fc = [100;100;10;0]; [f,d] = vl_sift(I,'frames',fc,'orientations');

In order to get the image on the right.

Page 12: CFU REU Week 1 Report

Session 5 Homework 4Homework 4 focused on Optical Flow, specifically the Lucas-Kanade algorithm. I first implemented the Lucas-Kanade algorithm and examined the results on two images of a car. I then implemented a Hierarchical Lucas-Kanade algorithm on two images of a table. I examined both algorithms and decided the regular Lucas-Kanade algorithm is much more efficient, as it takes a much shorter time to run than the Hierarchical Lucas-Kanade. The image below is the image of the car generated by the algorithm.