Info
This question is locked. 編集または回答するには再度開いてください。
the 2d convolution result dosen't match my expectation
37 ビュー (過去 30 日間)
古いコメントを表示
MatLaBGuYSomewhere
2018 年 10 月 26 日
Locked: Rena Berman
2025 年 10 月 24 日 11:25
%i
x = 1:317;
y = 1:317;
[xx,yy] = meshgrid(x,y);
z = (xx-158.5).^2+(yy-158.5).^2;
circle = zeros(317,317);
for i = 1:317
for j = 1: 317
if z(j,i) < 158.5^2
circle(j,i) = 1;
end
end
end
c = conv2(circle,circle);
c = c./max(c);
imshow(c)
I use simple code, simple object. However the result isn't correct.
Why did this result come out?
p.s. The second image is square and square case.
1 件のコメント
採用された回答
Bruno Luong
2018 年 10 月 26 日
編集済み: Bruno Luong
2018 年 10 月 26 日
Not sure what is your expectation, and intention but shooting on the dark, try to replace
c = c./max(c);
with
c = c./max(c(:));
1 件のコメント
その他の回答 (0 件)
This question is locked.
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!