Got Questions? Get Answers.
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:
Earse small Rectangle

Subject: Earse small Rectangle

From: maxwell10

Date: 6 Dec, 2010 17:00:35

Message: 1 of 2

Hi
I have gray image (1024x1024) of 'WHITE SNAKE' (yee... snake!)
I use 'graythresh' in order to wipe out the background by setting TRUE to snake and FALSE to background.

the problem is a little bright stone in the middle of the image which get TRUE values and I would like to eliminate by using:
I(832:858,453:490)=0;
but this line does not work.

What can I do?

Thanks

Subject: Earse small Rectangle

From: Sean de

Date: 6 Dec, 2010 17:24:05

Message: 2 of 2

maxwell10 <maxwellphy@hotmail.com> wrote in message <1327339893.65155.1291654865192.JavaMail.root@gallium.mathforum.org>...
> Hi
> I have gray image (1024x1024) of 'WHITE SNAKE' (yee... snake!)
> I use 'graythresh' in order to wipe out the background by setting TRUE to snake and FALSE to background.
>
> the problem is a little bright stone in the middle of the image which get TRUE values and I would like to eliminate by using:
> I(832:858,453:490)=0;
> but this line does not work.
>
> What can I do?
>
> Thanks

Hmm. Are you sure you have you rows/column correct? The image is treated as a matrix and thus uses ij format not xy. Try:
I(453:490,832:858) = 0; %and see if that works

Tags for this Thread

No tags are associated with 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