imfreehand data type issue
04:47 02 Aug 2013

I'm using imfreehand in my program, and when I came to erosion, I got the following error (I didn't paste the whole error):

Error using imerode
Expected input number 1, IM, to be one of these types:

numeric, logical

Instead its type was imfreehand.

It seems then that the region I extract will be of type imfreehand? Is there a way to convert to the above data types? Or, there is some way to deal with such issue?

Thanks.

matlab roi