Set image roi to zero

Hi,
I have an image 800 x 800. I want to set a 10 x 10 region at center 200,200 to ZERO. How do i do that ? Help thanks
Managed to do it. Thanks

1 Kommentar

conor paxton
conor paxton am 19 Okt. 2018
Hello, Could I ask, how you managed to do it please?

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Guillaume
Guillaume am 10 Feb. 2016

0 Stimmen

A 10x10 region can't be centered on a pixel. It needs to have an odd size.
Anyway:
yourimage(196:205, 196:205, :) = 0
David Sanchez
David Sanchez am 10 Feb. 2016

0 Stimmen

If I is your image
I(201:210,201:210) = 0;

1 Kommentar

Guillaume
Guillaume am 10 Feb. 2016
That's hardly centered on 200,200 !
And that only works with grayscale images

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 10 Feb. 2016

Kommentiert:

am 19 Okt. 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by