Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
876db5d0ce
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 24 lines (15 sloc) 360 Bytes
% Creates a Mask to define the part of interest where the mouse can be
%
%
% SYNTAX
%
% mask = createCageMask(someImage);
%
function mask = createCageMask(myImage)
disp('Go on, draw the cage!');
imshow(myImage);shg;
[u,x,y]=mbimg.drawShape();
[m,n,p] =size(myImage);
mask = poly2mask(x,y,m,n);
figure; imshow(mask);
set(gcf,'Name', 'Created mask');