1 / 32

Introduction to Computer Vision

Roger S. Gaborski. Introduction to Computer Vision. Chest Radiographic Image. What information can we extract from the image? Techniques we can try: Thresholding Imadjust Edge detection. Histogram of Image. Threshold = .4. Threshold = .6. Otsu’s Thresholding Method.

gitel
Download Presentation

Introduction to Computer Vision

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. Roger S. Gaborski Introduction to Computer Vision Roger S. Gaborski

  2. Chest Radiographic Image Roger S. Gaborski

  3. What information can we extract from the image? • Techniques we can try: • Thresholding • Imadjust • Edge detection Roger S. Gaborski

  4. Histogram of Image Roger S. Gaborski

  5. Threshold = .4 Roger S. Gaborski

  6. Threshold = .6 Roger S. Gaborski

  7. Otsu’s Thresholding Method • Algorithm assumes the image’s histogram is bi-model • Finds the optimal threshold to separate the two classes of pixels Roger S. Gaborski

  8. Matlab - Otsu’s Method • level = graythresh(Ig) • figure, imshow(Ig>level), title('Graythresh Level') • level = 0.5373 Roger S. Gaborski

  9. Roger S. Gaborski

  10. Threshold Level Determined by Otsu Method Roger S. Gaborski

  11. Otsu’s method, continued • Since the histogram is not bi-modal should not expect good separation between lungs and bones Roger S. Gaborski

  12. imadjust Roger S. Gaborski

  13. Original and imadjust Image Roger S. Gaborski

  14. Edge Detection fh = fspecial('sobel'); %horiz edge fv = fh'; %vertical edge i_horiz = imfilter(Ig, fh); figure, imshow(i_horiz, []), title('Horizontal Edges') i_vert = imfilter(Ig, fv); figure, imshow(i_vert, []),title('Vertical Edges') Roger S. Gaborski

  15. Horizontal Edges Roger S. Gaborski

  16. Vertical Edges Roger S. Gaborski

  17. Canny- stddev = 2 Roger S. Gaborski

  18. Canny- stddev = 3 Roger S. Gaborski

  19. Laplacian of Gaussian, stddev =2 Roger S. Gaborski

  20. Laplacian of Gaussian, stddev=3 Roger S. Gaborski

  21. Laplacian of Gaussian, stddev =2.5 Roger S. Gaborski

  22. Sensitivity of standard deviation: • Compare the last three images • Significant difference with a small change in standard deviation • How do you automatically choose the standard deviation if you have a large collection of images that you need to process? Roger S. Gaborski

  23. Reconsider Thresholding • Does it make sense to have only one threshold value? • Physically, maybe the image cannot be separated into only 2 classes • Consider more than one thresholding values Roger S. Gaborski

  24. IMQUANTIZE • imquantize Quantize image using specified quantization levels and output values. • QUANT_A = imquantize(A, LEVELS) uses the quantization levels specified • in the 1xN vector LEVELS to convert image A into an output image • QUANT_A with N+1 discrete levels. The entries in LEVELS have to be in • strictly increasing order. The output image QUANT_A contains integer • values in the range [1 (N+1)] assigned as per the criterion below: • If A(k) <= LEVELS(1), then QUANT_A(k) = 1 • If LEVELS(m-1) < A(k) <= LEVELS(m), then QUANT_A(k) = m • If A(k) >LEVELS(N), then QUANT_A(k) = N+1 Roger S. Gaborski

  25. > A =[1:10] A = 1 2 3 4 5 6 7 8 9 10 LEVELS = [5] L = imquantize(A,LEVELS) L = 1 1 1 1 1 2 2 2 2 2 LEVELS = [3,7] L = imquantize(A,LEVELS) L = 1 1 1 2 2 2 2 3 3 3 1 to 3 is first level, 4-7 is second level and 8 to 10 is 3rd level Roger S. Gaborski

  26. label2rgb • label2rgb Convert label matrix to RGB image. • The RGB matrix can then be visualized LEVELS = [3,7] L = imquantize(A,LEVELS) L = 1 1 1 2 2 2 2 3 3 3 1 to 3 is first level, 4-7 is second level and 8to 10 is 3rd level iData=label2rgb(L) iData(:,:,1) = 0 0 0 0 0 0 0 255 255 255 iData (:,:,2) = 0 0 0 255 255 255 255 255 255 255 iData(:,:,3) = 255 255 255 255 255 255 255 0 0 0 figure, imshow(iData,'InitialMagnification','fit') Roger S. Gaborski

  27. iData Roger S. Gaborski

  28. THRESH = multithresh(A, N) • THRESH = multithresh(A, N) computes N thresholds for image A using the Otsu's method and returns them in THRESH. • THRESH is a 1xN vector which can be used to convert A into an image with (N+1) discrete levels using IMQUANTIZE. Roger S. Gaborski

  29. >> I = imread('chestRadiograph1.png'); • I = rgb2gray(I); • thresh = multithresh(I,3) = 113 137 159 • seg_I = imquantize(I,thresh); • RGB = label2rgb(seg_I); • figure, imshow(RGB) Roger S. Gaborski

  30. Multi-level Thresholding Roger S. Gaborski

  31. Roger S. Gaborski

  32. Roger S. Gaborski

More Related