3Dカメラのデータをfor文とmeshで確認したいです。
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
慶次郎 釜堀
am 14 Sep. 2022
Beantwortet: Atsushi Ueno
am 14 Sep. 2022
clear all
%以下のmatファイルは120x212x1200 doubleの配列です。
load('F:\釜堀\Intel RealSense SDK 2.0\matlab\2022\09\13\16\MAT\2022_09_13_164718.mat');
for i = 1:1200
A = Depth_Data(:,:,i);
mesh(A);
end
%最後のフレームのみ表示されました。
0 Kommentare
Akzeptierte Antwort
Atsushi Ueno
am 14 Sep. 2022
下記のサンプルデータ1200フレームをアニメーション表示するのに約26秒掛かりました。
clear all
%以下のmatファイルは120x212x1200 doubleの配列です。
%load('F:\釜堀\Intel RealSense SDK 2.0\matlab\2022\09\13\16\MAT\2022_09_13_164718.mat');
loops = 1200;
[X,Y] = meshgrid(linspace(-3,3,loops/10));
Depth_Data = repmat(peaks(X,Y),[1 1 loops]) ...
.* sin(permute(1:loops,[3 1 2])*pi/loops); % サンプルデータ120x120x1200 doubleの作成
mesh(Depth_Data(:,:,loops/2)); % 一旦グラフに表示し座標軸の固定や描画方法を設定する
axis tight manual
ax = gca;
ax.NextPlot = 'replaceChildren';
for i = 1:loops
mesh(Depth_Data(:,:,i));
drawnow; % ここにdrawnow関数を置く
end
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu グラフィックス パフォーマンス finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!