Advertisement
makispaiktis

Tutorial - Edge detection

Aug 10th, 2021 (edited)
1,470
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.35 KB | None | 0 0
  1. clc
  2. clear all
  3.  
  4. A = imread('lena.png');
  5. colors(1, :) = ' red ';
  6. colors(2, :) = 'green';
  7. colors(3, :) = ' blue';
  8. figure();
  9. % Next method is applied in 2D objects like color channels
  10. for i = 1:3
  11.     channel = A(:, :, i);
  12.     E = edge(channel);
  13.     imshow(E);
  14.     caption = ['Edge detection in ' colors(i, :) ' channel'];
  15.     title(caption);
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement