[Solved] To apply a function through a mask on an image


By this:

impoly > Generate Data > function createfigure1

Do you mean after calling impoly, you go into the figure window and select “Generate Code”? Which will create a function createfigure – but this has nothing to do with impoly.

There are a couple of ways you can extract the ROI.
After choosing the area with impoly, before closing the figure:

BW = createMask(h);

Or you can extract the position with getPosition and then use roipoly.

3

solved To apply a function through a mask on an image