Thread Subject: ignore part of an image

Subject: ignore part of an image

From: Dave Brackett

Date: 10 Oct, 2008 14:44:04

Message: 1 of 1

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.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
imcrop Dave Brackett 10 Oct, 2008 10:45:08
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com