RGB-D カメラでの Visual SLAM

조회 수: 5 (최근 30일)
涼人
涼人 2023년 2월 2일
편집: Atsushi Ueno 2023년 2월 4일
下記のリンクに従って、Visual SLAMを行おうとしていたのですが、エラーが出ました。
手順内の'fr3_office.tgz'は取得出来ていてパス内にもあるのですが、下記のようになるのですがどうすればいいでしょうか?
コード:
baseDownloadURL = 'https://vision.in.tum.de/rgbd/dataset/freiburg3/rgbd_dataset_freiburg3_long_office_household.tgz';
dataFolder = fullfile(tempdir, 'tum_rgbd_dataset', filesep);
options = weboptions('Timeout', Inf);
tgzFileName = [dataFolder, 'fr3_office.tgz'];
folderExists = exist(dataFolder, 'dir');
% Create a folder in a temporary directory to save the downloaded file
if ~folderExists
mkdir(dataFolder);
disp('Downloading fr3_office.tgz (1.38 GB). This download can take a few minutes.')
websave(tgzFileName, baseDownloadURL, options);
% Extract contents of the downloaded file
disp('Extracting fr3_office.tgz (1.38 GB) ...')
untar(tgzFileName, dataFolder);
end
imageFolder = 'fr3_office.tgz';
imgFolderColor = [imageFolder,'rgb/'];
imgFolderDepth = [imageFolder,'depth/'];
imdsColor = imageDatastore(imgFolderColor);
imdsDepth = imageDatastore(imgFolderDepth);
出力結果
>> rgb_download
使い方によるエラー imageDatastore
一致するファイルまたはフォルダーが見つかりません: 'fr3_office.tgzrgb/'
エラー: rgb_download (20)
imdsColor = imageDatastore(imgFolderColor);

답변 (1개)

Tohru Kikawada
Tohru Kikawada 2023년 2월 3일
fr3_office.tgzが解凍できていてフォルダが存在するという前提でご回答差し上げます。
ファイルのパスが正しく設定されていないためにフォルダが見つからないというエラーが出ているように見受けられます。
下記のようにimageFolderを解凍先のフォルダ名に、imgFolderColorおよびimgFolderDepthのサブフォルダの先頭にスラッシュを入れてお試しください。
imageFolder = 'fr3_office';
imgFolderColor = [imageFolder,'/rgb/'];
imgFolderDepth = [imageFolder,'/depth/'];

카테고리

Help CenterFile Exchange에서 幾何学的変換とイメージ レジストレーション에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!