[GIS] Building Masks (0-1 binary image) out of ROIs in Envi Classic

enviextract-by-maskmaskingregion

I have the following 701×551 image in Envi with the shown raster ROIs (By pressing pixelbutton of ROI Tooldialogue window, I've converted the ROIs into raster format but I have access to ROI vectors eg. polygons if necessary) as training data.

enter image description here

I want to extract a binary image (a mask) with 701×551 pixels in Envi format in which the pixels inside the ROI are 1 and outside the ROI are 0, so I can use the ROIs as a matrix of 0-1 values and multiply it with my 701×551 data matrix in MATLAB to extract the the training vector for libsvm tool.

Is there any way to do this?

I'm using the classic GUI of Envi 5.3.

Best Answer

Found it: simply go to Basic Tools > Masking > Build Mask, select the desired display and then in the options menu of Mask Definition Dialog, select Import ROIs

enter image description here

And you'll get the following Mask:

enter image description here

Related Question