imroi - Roi (region of interest) of an image
The function allows the user to select a Region of Interest (ROI) in an image ALREADY DISPLAYED, and returns the corresponding binary matrix.
The mask is working with any of binary, gray or color images.
With the ellipse selection, you draw the rectangle in which the ellipse is drawn.
a=imread(SIPDIR+'images/ararauna.jpg'); xset("window",0);xbasc(); imshow(a); mask=imroi(a); //the user must then select the ROI with the mouse b=a.*mask; xset("window",1);xbasc(); imshow(b);//displays just the ROI
The Matlab equivalent is roipoly, whose interface is a bit more complicated.
With Scilab-2.6, for color images, the image.*mask is not working (problem of matrix sizes). One possibility to solve this:
image(1,1,1)=image(1,1,1);
then you can do
image.*mask;
With Scilab-2.7 there is no problem.
To generate much more complex ROI's, you can use the Gimp (GNU Image Manipulation Program) [www.gimp.org], although of course this is not an integrated solution.
http://siptoolbox.sourceforge.net