3次元物体をfftnしたとき,得られた結果を3次元空間に表示する方法とその値をカラーバーの色と対応させる方法を教えてください.
Show older comments
fft3=fftn(d); % fft
af=abs(fftshift(fft3))
[M,idx]=max(af,[],"all") %最大値探索
afsize=size(af)
In=find(af)
Sn=size(n)
rgb=n(In)
rgb=filloutliers(rgb,"linear")
%fft結果散布図作成
ct=1;
for z2=1:afsize(3) % z軸位置
for y2=1:afsize(2) % y軸位置
for x2=1:afsize(1) % x軸位置
if af(x2,y2,z2)>M/25 %最大値/100以上の部分のみプロット
xf(ct)=x2; % 位置x を count番目のx に入力
yf(ct)=y2; % 位置x を count番目のy に入力
zf(ct)=z2; % 位置x を count番目のz に入力
ct=ct+1;
end
end
end
end
Tb2=table(xf,yf,zf);
s = scatter3(Tb2,'xf','yf','zf','filled','ColorVariable','xf');
colorbar %ここのカラーバーをxfの値ではなくaf内の値にしたいです.うまくいかなくて困っています
view([20 90]); % 角度変更(方位角,仰角)
xlabel("x")
ylabel("y")
zlabel("z")
set(gca, 'DataAspectRatio',[1 1 1])
Answers (0)
Categories
Find more on フーリエ解析とフィルター処理 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!