What does this code compute?

1 次查看(过去 30 天)
what does this code compute? mask ( inside ) = ones ( size ( inside ) )

采纳的回答

Titus Edelhofer
Titus Edelhofer 2015-2-13
It set's all entries in mask, where inside is true, to one. I guess
mask(inside) = 1;
should do the same in fact.
Titus
  2 个评论
Anushka
Anushka 2015-2-13
Thank you sir for your kind response
Anushka
Anushka 2015-2-13
编辑:Image Analyst 2015-2-14
d = size(img); % dimension
img = double(img);
%---------- Normalize co-ordinates to [-sqrt2,sqrt2] (centroid assumed @ origin)
xstep = 2/(d(1)-1);
ystep = 2/(d(2)-1);
[x,y] = meshgrid(-1:xstep:1,-1:ystep:1);
Sir can you please explain this too.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Author Block Masks 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by