Matlab:Feature Extraction Using Segmentation and Edge Detection<br />
Detecting Edges Using the edge Function<br />In an image, an edge is a curve that follows a path of rapid change in image ...
Detecting Edges Using the edge Function<br /><ul><li>I = imread(‘dmt.jpg');
imshow(I);
BW1 = edge(I,'sobel');
BW2 = edge(I,'canny');
figure, imshow(BW1) ;
figure, imshow(BW2)</li></li></ul><li>Detecting Edges Using the edge Function<br /><ul><li>I = imread(‘bird.png');
imshow(I);
BW1 = edge(I,'sobel');
BW2 = edge(I,'canny');
figure, imshow(BW1) ;
figure, imshow(BW2)</li></li></ul><li>Detecting Edges Using the edge Function<br />
Radon Transform<br />The radon function computes projections of an image matrix along specified directions.<br />
Radon Transform<br />&gt;&gt; I=zeros(100,100);<br />&gt;&gt; I(40:60, 40:60)=1;<br />&gt;&gt; imshow(I);<br />&gt;&gt; [R...
Radon Transform<br />&gt;&gt; I=zeros(100,100);<br />&gt;&gt; I(40:60, 40:60)=1;<br />&gt;&gt; imshow(I);<br /> &gt;&gt; [...
Upcoming SlideShare
Loading in...5
×

Matlab Feature Extraction Using Segmentation And Edge Detection

13,152

Published on

Matlab Feature Extraction Using Segmentation And Edge Detection

Published in: Technology, Sports
2 Comments
11 Likes
Statistics
Notes
No Downloads
Views
Total Views
13,152
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
2
Likes
11
Embeds 0
No embeds

No notes for slide

Matlab Feature Extraction Using Segmentation And Edge Detection

  1. 1. Matlab:Feature Extraction Using Segmentation and Edge Detection<br />
  2. 2. Detecting Edges Using the edge Function<br />In an image, an edge is a curve that follows a path of rapid change in image intensity.<br />
  3. 3. Detecting Edges Using the edge Function<br /><ul><li>I = imread(‘dmt.jpg');
  4. 4. imshow(I);
  5. 5. BW1 = edge(I,'sobel');
  6. 6. BW2 = edge(I,'canny');
  7. 7. figure, imshow(BW1) ;
  8. 8. figure, imshow(BW2)</li></li></ul><li>Detecting Edges Using the edge Function<br /><ul><li>I = imread(‘bird.png');
  9. 9. imshow(I);
  10. 10. BW1 = edge(I,'sobel');
  11. 11. BW2 = edge(I,'canny');
  12. 12. figure, imshow(BW1) ;
  13. 13. figure, imshow(BW2)</li></li></ul><li>Detecting Edges Using the edge Function<br />
  14. 14. Radon Transform<br />The radon function computes projections of an image matrix along specified directions.<br />
  15. 15. Radon Transform<br />&gt;&gt; I=zeros(100,100);<br />&gt;&gt; I(40:60, 40:60)=1;<br />&gt;&gt; imshow(I);<br />&gt;&gt; [R,xp] = radon(I,0);<br />&gt;&gt; figure,plot(xp,R);<br />
  16. 16. Radon Transform<br />&gt;&gt; I=zeros(100,100);<br />&gt;&gt; I(40:60, 40:60)=1;<br />&gt;&gt; imshow(I);<br /> &gt;&gt; [R,xp] = radon(I,45);<br />&gt;&gt; figure,plot(xp,R);<br />
  17. 17. Inverse Radon Transform<br />The iradon function inverts the Radon transform and can therefore be used to reconstruct images. iradon reconstructs an image from parallel-beam projections. In parallel-beam geometry, each projection is formed by combining a set of line integrals through an image at a specific angle.<br />
  18. 18. Inverse Radon Transform<br />P = phantom(def, n) generates an image of a head phantom that can be used to test the numerical accuracy of radon and iradon or other two-dimensional reconstruction algorithms.<br />
  19. 19. Inverse Radon Transform<br />&gt;&gt; P=phantom(256);<br />&gt;&gt; imshow(P)<br />&gt;&gt; theta1 = 0:10:170; [R1,xp] = radon(P,theta1);<br />theta2 = 0:5:175; [R2,xp] = radon(P,theta2);<br />theta3 = 0:2:178; [R3,xp] = radon(P,theta3);<br />&gt;&gt; figure, imagesc(theta3,xp,R3); colormap(hot); colorbar<br />xlabel(&apos; heta&apos;); ylabel(&apos;xprime&apos;);<br />&gt;&gt; I1 = iradon(R1,10);<br />I2 = iradon(R2,5);<br />I3 = iradon(R3,2);<br />imshow(I1);<br />figure, imshow(I2);<br />figure, imshow(I3);<br />
  20. 20. Inverse Radon Transform<br />
  21. 21. Marker-Controlled Watershed Segmentation<br />Separating touching objects in an image is one of the more difficult image processing operations. The watershed transform is often applied to this problem.<br />
  22. 22. Marker-Controlled Watershed Segmentation<br /><ul><li>Step 1: Read in the Color Image and Convert it to Grayscale
  23. 23. Step 2: Use the Gradient Magnitude as the Segmentation Function
  24. 24. Step 3: Mark the Foreground Objects
  25. 25. Step 4: Compute Background Markers
  26. 26. Step 5: Compute the Watershed Transform of the Segmentation Function.
  27. 27. Step 6: Visualize the Result</li></li></ul><li>Marker-Controlled Watershed Segmentation<br />

×