7
$\begingroup$

In the docs for GrowCutComponents[] there are many examples of masks, but I don't know how to make one for myself. I suppose they are using the drawing tools in some way (which I have never used), but a straightforward application of it gave this error:

enter image description here

Are there any examples of how to make a marker mask? Perhaps in a tutorial or in the refs for another symbol?

$\endgroup$
  • 1
    $\begingroup$ Maybe you need more than one marker? Also, try to Binarize the marker image, to make sure it's not antialiased $\endgroup$ – Niki Estner Jan 11 '17 at 9:22
  • $\begingroup$ @nikie but really I'm asking about what are the actual steps of using draw tools to make them $\endgroup$ – user5601 Feb 1 '17 at 5:01
6
$\begingroup$

A toy example :

  • Take an image
  • draw some line on it with the Drawing Tools
  • select the whole image. There should be a orange contour line with orange handlers, like in the image below. You can do that by clicking out of the cell, then inside the cell.
  • right-click to have the contextual menu, then "Graphics Editing", then "create Mask"

I have experienced some bugs with the Drawing Tool, specially with Mathematica Version 11.2 (Windows 7 in my case). Hope you will not have to deal with them.

enter image description here

Result :

enter image description here

$\endgroup$
  • 2
    $\begingroup$ I have never found information about that. Just discovered it now (!). $\endgroup$ – andre314 Jan 19 '18 at 19:18
  • $\begingroup$ This is great! I was also wondering about doing it programatically though... any thoughts on that? $\endgroup$ – user5601 Jan 20 '18 at 1:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.