RGB-D カメラでの Visual SLAM
4 views (last 30 days)
Show older comments
下記のリンクに従って、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);
0 Comments
Answers (1)
Tohru Kikawada
on 3 Feb 2023
fr3_office.tgzが解凍できていてフォルダが存在するという前提でご回答差し上げます。
ファイルのパスが正しく設定されていないためにフォルダが見つからないというエラーが出ているように見受けられます。
下記のようにimageFolderを解凍先のフォルダ名に、imgFolderColorおよびimgFolderDepthのサブフォルダの先頭にスラッシュを入れてお試しください。
imageFolder = 'fr3_office';
imgFolderColor = [imageFolder,'/rgb/'];
imgFolderDepth = [imageFolder,'/depth/'];
0 Comments
See Also
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!