Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: ignore part of an image
Date: Fri, 10 Oct 2008 14:44:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 20
Message-ID: <gcnpnk$ikf$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1223649844 19087 172.30.248.37 (10 Oct 2008 14:44:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 10 Oct 2008 14:44:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1338633
Xref: news.mathworks.com comp.soft-sys.matlab:494568


Hi, I am doing some simple image processing and my first stage is to crop an image which I do as follows:

% user crop image to just the region of interest
[cropped_image,rect]=imcrop(video_snapshot);
axes(handles.axes5)
imshow(cropped_image)
disp(rect)


I then want to be able to select a rectangular part of the cropped image to be ignored, the part being defined by the user as follows:

% user select part to ignore
ignore=imrect;
position=wait(ignore);
disp(position)


The question I now have is how can I alter the cropped_image from step 1 so that the selected part from step 2 is removed (or coloured white), and thereby ignored? 

Hope that makes sense. I would have thought it would be quite simple but can't work out how to do it. Thanks.