1 / 30

A picture is worth more than a 1000 words. It can save a life.

A picture is worth more than a 1000 words. It can save a life. Arjun Watane. Gaussian Derivative. I = imread ( 'brain_tumor_mri_1.jpg' ); I2 = rgb2gray(I); k = fspecial ( ' gaussian ' , [7 7] , 1); %Gaussian filter kernal kdx = conv2(k,[1 0 -1], 'valid' ); %figure; surf( kdx );

Download Presentation

A picture is worth more than a 1000 words. It can save a life.

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A picture is worth more than a 1000 words. It can save a life. ArjunWatane

  2. Gaussian Derivative • I = imread('brain_tumor_mri_1.jpg'); • I2 = rgb2gray(I); • k = fspecial('gaussian', [7 7] , 1); %Gaussian filter kernal • kdx = conv2(k,[1 0 -1], 'valid'); • %figure; surf(kdx); • kdy = conv2(k, [1; 0; -1], 'valid'); • %figure; surf(kdy); • imx = conv2(I2, kdx, 'valid'); • imy = conv2(I2, kdy, 'valid'); • figure; imshow(I2); • %figure; imshow(imx); • figure; imshow(imy); • imwrite(imy, 'brainTumorMRI1_GaussianDerivative.jpg');

  3. Gaussian Derivative

  4. Edge Detector • 6 edge-finding methods • Sobel • Prewitt • Roberts • Laplacian • Zero-Cross • Canny • Tested on Groceries and a Brain MRI

  5. Edge Detection on Groceries I5 = imread('groceries.jpg'); IBW = rgb2gray(I5); BW = edge(IBW, 'prewitt'); figure; imshow(BW); • Changed “groceries.jpg” with brain_mri_1. • Changed “prewitt” with sobel, canny, roberts, Log, and zerocross.

  6. Prewitt Edge Detection on Groceries

  7. Canny Edge Detection on Groceries

  8. Roberts Edge Detection on Groceries

  9. Sobel Edge Detection on Groceries

  10. Log Edge Detection on Groceries

  11. Zerocross Edge Detection on Groceries

  12. Edge Detection on Brain MRI (Tumor Detection) Roberts Prewitt Canny Sobel LoG ZeroCross

  13. Adaboost • Pgm files work better. • Found online jpg to pgm converter.

  14. Adaboost Face Detection

  15. Adaboost Face Detection

  16. Adaboost Face Detection

  17. Harris Corner Detector im = imread('groceries.jpg'); im = rgb2gray(im); k = fspecial('gaussian', [15 15], 1); dx =[-1 0 1; -1 0 1; -1 0 1];%Derivative Masks dy = dx'; %transpose x to make y kdx = conv2(im, dx, 'valid'); %Image Derivatives kdy = conv2(im, dy, 'valid'); kdx2 = kdx.^2; %square every number in the matrix kdy2 = kdy.^2; kdxy = (kdx.*kdy); %multiply every number in the matrix with each other kdx2 = conv2(kdx2, k, 'same'); kdy2 = conv2(kdy2, k, 'same'); kdxy = conv2(kdxy, k, 'same'); H = [kdx2 kdxy; kdxy kdy2]; M = (kdx2.*kdy2 - kdxy.^2) - .04*(kdx2 + kdy2).^2; %Harris Corner Measure Equation imshow(M); imwrite(M, 'groceriesHarrisCorner.jpg');

  18. Harris Corner Detector

  19. SVM

  20. SVM

  21. Bag of Features

  22. Optical Flow

  23. Optical Flow

  24. SIFT – Plot Descriptors pfx = fullfile(vl_root, 'data', 'obama3.jpg'); I = imread(pfx); image(I); I = single(rgb2gray(I)); [f,d] = vl_sift(I); perm = randperm(size(f,2)); sel = perm(1:4);%4 represents the # of features 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') ;

  25. SIFT – Plot Descriptors

  26. SIFT – Plot Descriptors

  27. SIFT – Match Descriptor Points pfx = fullfile(vl_root, 'data', 'obama1.jpg'); %receives, reads, grayscales, and resizes the image from the vl_root directory I = imread(pfx); figure; imshow(I); Ia = single(rgb2gray(I)); Ia = imresize(Ia, [300 300]); pfx = fullfile(vl_root, 'data', 'obama3.jpg'); I = imread(pfx); figure; imshow(I); Ib = single(rgb2gray(I)); Ib = imresize(Ib, [300 300]); [fa, da] = vl_sift(Ia); %calculate sift points [fb, db] = vl_sift(Ib); [matches, scores] = vl_ubcmatch(da, db); %matches the points on the images m1 = fa(1:2, matches(1,:)); m2 = fb(1:2, matches(2,:)); m2(1, :) = m2(1,:)+size(Ia,2)*ones(1,size(m2,2)); X = [m1(1,:); m2(1,:)]; Y = [m1(2,:); m2(2,:)]; c = [IaIb]; figure; imshow(c,[]); hold on; line(X(:,1:1:15), Y(:,1:1:15)) %draw lines

  28. SIFT – Match Descriptor Points

  29. SIFT – Match Descriptor Points

More Related