Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 22nd, 2013  |  syntax: MatLab  |  size: 0.22 KB  |  views: 33  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. I = input('Enter the name of the image','s');
  2. img=imread(I);
  3. imshow(img);
  4. roi = imfreehand;
  5. img2 = img;
  6. img3 = zeros(size(img));
  7. img3(roi.createMask) = 1;
  8. roi2 = imfreehand;
  9. img3(roi2.createMask) = 2;
  10. imshow(img3);
clone this paste RAW Paste Data