what does this code compute? mask ( inside ) = ones ( size ( inside ) )

 채택된 답변

Titus Edelhofer
Titus Edelhofer 2015년 2월 13일

0 개 추천

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개)

태그

질문:

2015년 2월 13일

편집:

2015년 2월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by