ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
LoungeRGBDImages.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #include <Logging.h>
9 
10 #include <string>
11 #include <vector>
12 
14 
15 namespace cloudViewer {
16 namespace data {
17 
19  CloudViewerDownloadsPrefix() + "20220301-data/LoungeRGBDImages.zip",
20  "cdd307caef898519a8829ce1b6ab9f75"};
21 
22 LoungeRGBDImages::LoungeRGBDImages(const std::string& data_root)
23  : DownloadDataset("LoungeRGBDImages", data_descriptor, data_root) {
24  color_paths_.reserve(3000);
25  depth_paths_.reserve(3000);
26  const std::string extract_dir = GetExtractDir();
27  const size_t n_zero = 6;
28  for (int i = 1; i < 3000; ++i) {
29  std::string idx = std::to_string(i);
30  idx = std::string(n_zero - std::min(n_zero, idx.length()), '0') + idx;
31  color_paths_.push_back(extract_dir + "/color/" + idx + ".png");
32  depth_paths_.push_back(extract_dir + "/depth/" + idx + ".png");
33  }
34 
35  trajectory_log_path_ = extract_dir + "/lounge_trajectory.log";
36  reconstruction_path_ = extract_dir + "/lounge.ply";
37 }
38 
39 } // namespace data
40 } // namespace cloudViewer
const std::string GetExtractDir() const
Get absolute path to extract directory. i.e. ${data_root}/extract/${prefix}.
Definition: Dataset.h:94
Dataset class with one or more downloaded file.
Definition: Dataset.h:152
LoungeRGBDImages(const std::string &data_root="")
int min(int a, int b)
Definition: cutil_math.h:53
std::string CloudViewerDownloadsPrefix()
Definition: Dataset.cpp:49
static const DataDescriptor data_descriptor
Generic file read and write utility for python interface.
std::string to_string(const T &n)
Definition: Common.h:20
Infomation about a file to be downloaded.
Definition: Dataset.h:111