matlabでの車両認識

조회 수: 1 (최근 30일)
Daichi Saitou
Daichi Saitou 2020년 2월 5일
댓글: Daichi Saitou 2020년 2월 5일
このサイトにある車両認識をやりたいんですけど、難しくて分かりません。
function [lidarData,imageData] = loadLidarAndImageData(initTime,finalTime)
initFrame = max(1,floor(initTime*10));
lastFrame = min(350,ceil(finalTime*10));
load ('imageData_35seconds.mat','allImageData');
imageData = allImageData(initFrame:lastFrame);
numFrames = lastFrame - initFrame + 1;
lidarData = cell(numFrames,1);
% Each file contains 70 frames.
initFileIndex = floor(initFrame/70) + 1;
lastFileIndex = ceil(lastFrame/70);
frameIndices = [1:70:numFrames numFrames + 1];
counter = 1;
for i = initFileIndex:lastFileIndex
startFrame = frameIndices(counter);
endFrame = frameIndices(counter + 1) - 1;
load(['lidarData_',num2str(i)],'currentLidarData');
lidarData(startFrame:endFrame) = currentLidarData(1:(endFrame + 1 - startFrame));
counter = counter + 1;
end
end
4行目の
load ('imageData_35seconds.mat','allImageData');
の部分に何が入るのか分かりません。画像データか、動画データか、どのような保存方法なのかも分かりません。
サイト内では、一番下のプログラムです。

채택된 답변

Shunichi Kusano
Shunichi Kusano 2020년 2월 5일
.matで表されるファイル形式はmatlabで読み書きできるデータ形式で、中身は画像でも音声でもなんでもいいです。
この例では何が入っているか、実際に読んでみると、350x1のセル配列となっています。各セルには144x192x3の数値配列が入っています。imshowで見るとこれは画像なので、350フレームの動画ファイルということになります。
データの中身がわからない場合はワークスペースを見ましょう。データ型やサイズなんかが表示されているはずですので、何のデータか想像がつく場合があります。
  댓글 수: 1
Daichi Saitou
Daichi Saitou 2020년 2월 5일
なるほど、分かりました。ありがとうございます!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!