Set image roi to zero
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (2 件)
Guillaume
2016 年 2 月 10 日
A 10x10 region can't be centered on a pixel. It needs to have an odd size.
Anyway:
yourimage(196:205, 196:205, :) = 0
0 件のコメント
David Sanchez
2016 年 2 月 10 日
If I is your image
I(201:210,201:210) = 0;
1 件のコメント
Guillaume
2016 年 2 月 10 日
That's hardly centered on 200,200 !
And that only works with grayscale images
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!