Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

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

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.

Contact us