Draw an outline within an image

Hi,
I've got an image up in MATLAB, ~ 50 x 50 grid cells, and would like to draw a (black) outline around a small box of pixels within the image. I don't want to shade them or colour them in, just draw an outline around them.
Thanks.

回答(2 个)

Walter Roberson
Walter Roberson 2011-3-27

0 个投票

rectangle() can be used for that. Or line(), or patch() .
David Young
David Young 2011-3-27

0 个投票

You might find the techniques described in this blog entry helpful.

类别

在 帮助中心 和 File Exchange 中查找有关 Images 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by