Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 22nd, 2013  |  syntax: MatLab  |  size: 0.32 KB  |  hits: 35  |  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. img2(roi.createMask) = 100;
  8. img3(roi.createMask) = 100;
  9.  
  10. roi2 = imfreehand;
  11. img4 = img3;
  12. img5 = zeros(size(img));
  13. img4(roi2.createMask) = 200;
  14. img5(roi.createMask) = 200;
  15.  
  16. imshow(img5);