Extract the region of interest (ROI) of an image using a binary image (supported formats are .bmp, .png, .jpg, .tiff, and .fda). The region of interest is extracted within a new image of the same size as the original image. Outside the region of interest, the intensity values are zero. Zero intensity values from the extracted region of interest can be converted to one. The binary image can be resized from the original image.