Skip to content

数据集(Dataset)

Open3D 内置了一个数据集(dataset)模块,便于访问常用的示例数据集。这些数据集会自动从互联网下载。

import open3d as o3d
if __name__ == "__main__":
dataset = o3d.data.EaglePointCloud()
pcd = o3d.io.read_point_cloud(dataset.path)
o3d.visualization.draw(pcd)
#include <string>
#include <memory>
#include "open3d/Open3D.h"
int main() {
using namespace open3d;
data::EaglePointCloud dataset;
auto pcd = io::CreatePointCloudFromFile(dataset.GetPath());
visualization::Draw({pcd});
return 0;
}

数据集会被自动下载并缓存。默认的数据根目录是 ~/open3d_data。数据将被下载到 ~/open3d_data/download,并解压到 ~/open3d_data/extract。你也可以选择性地更改默认数据根目录:通过设置环境变量 OPEN3D_DATA_ROOT,或在构造数据集对象时传入 data_root 参数即可实现。

来自 Redwood 数据集的一个客厅彩色点云,PCD 格式。

dataset = o3d.data.PCDPointCloud()
pcd = o3d.io.read_point_cloud(dataset.path)
data::PCDPointCloud dataset;
auto pcd = io::CreatePointCloudFromFile(dataset.GetPath());

来自 Redwood 数据集的一个客厅彩色点云,PLY 格式。

dataset = o3d.data.PLYPointCloud()
pcd = o3d.io.read_point_cloud(dataset.path)
data::PLYPointCloud dataset;
auto pcd = io::CreatePointCloudFromFile(dataset.GetPath());

老鹰(Eagle)彩色点云。

dataset = o3d.data.EaglePointCloud()
pcd = o3d.io.read_point_cloud(dataset.path)
data::EaglePointCloud dataset;
auto pcd = io::CreatePointCloudFromFile(dataset.GetPath());

来自 Redwood RGB-D 数据集的 57 个二进制 PLY 格式点云。

dataset = o3d.data.LivingRoomPointClouds()
pcds = []
for pcd_path in dataset.paths:
pcds.append(o3d.io.read_point_cloud(pcd_path))
data::LivingRoomPointClouds dataset;
std::vector<std::shared_ptr<geometry::PointCloud>> pcds;
for (const std::string& pcd_path : dataset.GetPaths()) {
pcds.push_back(io::CreatePointCloudFromFile(pcd_path));
}

来自 Redwood RGB-D 数据集的 53 个二进制 PLY 格式点云。

dataset = o3d.data.OfficePointClouds()
pcds = []
for pcd_path in dataset.paths:
pcds.append(o3d.io.read_point_cloud(pcd_path))
data::OfficePointClouds dataset;
std::vector<std::shared_ptr<geometry::PointCloud>> pcds;
for (const std::string& pcd_path : dataset.GetPaths()) {
pcds.push_back(io::CreatePointCloudFromFile(pcd_path));
}

来自 Stanford 的兔子(bunny)三角网格,PLY 格式。

dataset = o3d.data.BunnyMesh()
mesh = o3d.io.read_triangle_mesh(dataset.path)
data::BunnyMesh dataset;
auto mesh = io::CreateMeshFromFile(dataset.GetPath());

来自 Stanford 的犰狳(armadillo)网格,PLY 格式。

dataset = o3d.data.ArmadilloMesh()
mesh = o3d.io.read_triangle_mesh(dataset.path)
data::ArmadilloMesh dataset;
auto mesh = io::CreateMeshFromFile(dataset.GetPath());

一个 3D 莫比乌斯结(Mobius knot)网格,PLY 格式。

dataset = o3d.data.KnotMesh()
mesh = o3d.io.read_triangle_mesh(dataset.path)
data::KnotMesh dataset;
auto mesh = io::CreateMeshFromFile(dataset.GetPath());

带 PBR 纹理的猴子(monkey)模型。

dataset = o3d.data.MonkeyModel()
model = o3d.io.read_triangle_model(dataset.path)
data::MonkeyModel dataset;
visualization::rendering::TriangleMeshModel model;
io::ReadTriangleModel(dataset.GetPath(), model);

带 PBR 纹理的剑(sword)模型。

dataset = o3d.data.SwordModel()
model = o3d.io.read_triangle_model(dataset.path)
data::SwordModel dataset;
visualization::rendering::TriangleMeshModel model;
io::ReadTriangleModel(dataset.GetPath(), model);

带 PBR 纹理的板条箱(crate)模型。

dataset = o3d.data.CrateModel()
model = o3d.io.read_triangle_model(dataset.path)
data::CrateModel dataset;
visualization::rendering::TriangleMeshModel model;
io::ReadTriangleModel(dataset.GetPath(), model);

带 PBR 纹理的飞行头盔(flight helmet)glTF 模型。

dataset = o3d.data.FlightHelmetModel()
model = o3d.io.read_triangle_model(dataset.path)
data::FlightHelmetModel dataset;
visualization::rendering::TriangleMeshModel model;
io::ReadTriangleModel(dataset.GetPath(), model);

牛油果(Avocado)glb 模型,带 PNG 格式的内嵌纹理。

dataset = o3d.data.AvocadoModel()
model = o3d.io.read_triangle_model(dataset.path)
data::AvocadoModel dataset;
visualization::rendering::TriangleMeshModel model;
io::ReadTriangleModel(dataset.GetPath(), model);

破损头盔(damaged helmet)glb 模型,带 JPG 格式的内嵌纹理。

dataset = o3d.data.DamagedHelmetModel()
model = o3d.io.read_triangle_model(dataset.path)
data::DamagedHelmetModel dataset;
visualization::rendering::TriangleMeshModel model;
io::ReadTriangleModel(dataset.GetPath(), model);

用于金属类材质的 albedo(反照率)、normal(法线)、roughness(粗糙度)和 metallic(金属度)纹理文件。

mat_data = o3d.data.MetalTexture()
mat = o3d.visualization.rendering.MaterialRecord()
mat.shader = "defaultLit"
mat.albedo_img = o3d.io.read_image(mat_data.albedo_texture_path)
mat.normal_img = o3d.io.read_image(mat_data.normal_texture_path)
mat.roughness_img = o3d.io.read_image(mat_data.roughness_texture_path)
mat.metallic_img = o3d.io.read_image(mat_data.metallic_texture_path)
data::MetalTexture mat_data;
auto mat = visualization::rendering::MaterialRecord();
mat.shader = "defaultUnlit";
mat.albedo_img = io::CreateImageFromFile(mat_data.albedo_texture_path);
mat.normal_img = io::CreateImageFromFile(mat_data.normal_texture_path);
mat.roughness_img = io::CreateImageFromFile(mat_data.roughness_texture_path);
mat.metallic_img = io::CreateImageFromFile(mat_data.metallic_texture_path);

用于涂漆石膏类材质的 albedo、normal 和 roughness 纹理文件。

mat_data = o3d.data.PaintedPlasterTexture()
mat = o3d.visualization.rendering.MaterialRecord()
mat.shader = "defaultLit"
mat.albedo_img = o3d.io.read_image(mat_data.albedo_texture_path)
mat.normal_img = o3d.io.read_image(mat_data.normal_texture_path)
mat.roughness_img = o3d.io.read_image(mat_data.roughness_texture_path)
data::PaintedPlasterTexture mat_data;
auto mat = visualization::rendering::MaterialRecord();
mat.shader = "defaultUnlit";
mat.albedo_img = io::CreateImageFromFile(mat_data.albedo_texture_path);
mat.normal_img = io::CreateImageFromFile(mat_data.normal_texture_path);
mat.roughness_img = io::CreateImageFromFile(mat_data.roughness_texture_path);

用于瓷砖类材质的 albedo、normal 和 roughness 纹理文件。

mat_data = o3d.data.TilesTexture()
mat = o3d.visualization.rendering.MaterialRecord()
mat.shader = "defaultLit"
mat.albedo_img = o3d.io.read_image(mat_data.albedo_texture_path)
mat.normal_img = o3d.io.read_image(mat_data.normal_texture_path)
mat.roughness_img = o3d.io.read_image(mat_data.roughness_texture_path)
data::TilesTexture mat_data;
auto mat = visualization::rendering::MaterialRecord();
mat.shader = "defaultUnlit";
mat.albedo_img = io::CreateImageFromFile(mat_data.albedo_texture_path);
mat.normal_img = io::CreateImageFromFile(mat_data.normal_texture_path);
mat.roughness_img = io::CreateImageFromFile(mat_data.roughness_texture_path);

用于水磨石类材质的 albedo、normal 和 roughness 纹理文件。

mat_data = o3d.data.TerrazzoTexture()
mat = o3d.visualization.rendering.MaterialRecord()
mat.shader = "defaultLit"
mat.albedo_img = o3d.io.read_image(mat_data.albedo_texture_path)
mat.normal_img = o3d.io.read_image(mat_data.normal_texture_path)
mat.roughness_img = o3d.io.read_image(mat_data.roughness_texture_path)
data::TerrazzoTexture mat_data;
auto mat = visualization::rendering::MaterialRecord();
mat.shader = "defaultUnlit";
mat.albedo_img = io::CreateImageFromFile(mat_data.albedo_texture_path);
mat.normal_img = io::CreateImageFromFile(mat_data.normal_texture_path);
mat.roughness_img = io::CreateImageFromFile(mat_data.roughness_texture_path);

用于木材类材质的 albedo、normal 和 roughness 纹理文件。

mat_data = o3d.data.WoodTexture()
mat = o3d.visualization.rendering.MaterialRecord()
mat.shader = "defaultLit"
mat.albedo_img = o3d.io.read_image(mat_data.albedo_texture_path)
mat.normal_img = o3d.io.read_image(mat_data.normal_texture_path)
mat.roughness_img = o3d.io.read_image(mat_data.roughness_texture_path)
data::WoodTexture mat_data;
auto mat = visualization::rendering::MaterialRecord();
mat.shader = "defaultUnlit";
mat.albedo_img = io::CreateImageFromFile(mat_data.albedo_texture_path);
mat.normal_img = io::CreateImageFromFile(mat_data.normal_texture_path);
mat.roughness_img = io::CreateImageFromFile(mat_data.roughness_texture_path);

用于木地板类材质的 albedo、normal 和 roughness 纹理文件。

mat_data = o3d.data.WoodFloorTexture()
mat = o3d.visualization.rendering.MaterialRecord()
mat.shader = "defaultLit"
mat.albedo_img = o3d.io.read_image(mat_data.albedo_texture_path)
mat.normal_img = o3d.io.read_image(mat_data.normal_texture_path)
mat.roughness_img = o3d.io.read_image(mat_data.roughness_texture_path)
data::WoodFloorTexture mat_data;
auto mat = visualization::rendering::MaterialRecord();
mat.shader = "defaultUnlit";
mat.albedo_img = io::CreateImageFromFile(mat_data.albedo_texture_path);
mat.normal_img = io::CreateImageFromFile(mat_data.normal_texture_path);
mat.roughness_img = io::CreateImageFromFile(mat_data.roughness_texture_path);

RGB 图像 JuneauImage.jpg 文件。

img_data = o3d.data.JuneauImage()
img = o3d.io.read_image(img_data.path)
data::JuneauImage img_data;
auto img = io::CreateImageFromFile(img_data.path);

来自 Redwood RGBD living-room1 数据集的 5 张彩色图像和 5 张深度图像的示例集合。它还包含一份相机轨迹日志、一份相机里程计日志、一个 rgbd 匹配文件,以及由 TSDF 重建得到的点云。

dataset = o3d.data.SampleRedwoodRGBDImages()
rgbd_images = []
for i in range(len(dataset.depth_paths)):
color_raw = o3d.io.read_image(dataset.color_paths[i])
depth_raw = o3d.io.read_image(dataset.depth_paths[i])
rgbd_image = o3d.geometry.RGBDImage.create_from_color_and_depth(
color_raw, depth_raw)
rgbd_images.append(rgbd_image)
pcd = o3d.io.read_point_cloud(dataset.reconstruction_path)
data::SampleRedwoodRGBDImages dataset;
std::vector<std::shared_ptr<geometry::RGBDImage>> rgbd_images;
for (size_t i = 0; i < dataset.GetDepthPaths().size(); ++i) {
auto color_raw = io::CreateImageFromFile(dataset.GetColorPaths()[i]);
auto depth_raw = io::CreateImageFromFile(dataset.GetDepthPaths()[i]);
auto rgbd_image = geometry::RGBDImage::CreateFromColorAndDepth(
*color_raw, *depth_raw,
/*depth_scale =*/1000.0,
/*depth_trunc =*/3.0,
/*convert_rgb_to_intensity =*/false);
rgbd_images.push_back(rgbd_image);
}
auto pcd = io::CreatePointCloudFromFile(dataset.GetReconstructionPath());

来自 Fountain RGBD 数据集的 33 张彩色图像和深度图像的示例集合。它还包含关键帧处的相机位姿日志和网格重建结果。

dataset = o3d.data.SampleFountainRGBDImages()
rgbd_images = []
for i in range(len(dataset.depth_paths)):
depth = o3d.io.read_image(dataset.depth_paths[i])
color = o3d.io.read_image(dataset.color_paths[i])
rgbd_image = o3d.geometry.RGBDImage.create_from_color_and_depth(
color, depth, convert_rgb_to_intensity=False)
rgbd_images.append(rgbd_image)
camera_trajectory = o3d.io.read_pinhole_camera_trajectory(
dataset.keyframe_poses_log_path)
mesh = o3d.io.read_triangle_mesh(dataset.reconstruction_path)
data::SampleFountainRGBDImages dataset;
std::vector<std::shared_ptr<geometry::RGBDImage>> rgbd_images;
for (size_t i = 0; i < dataset.GetDepthPaths().size(); ++i) {
auto color_raw = io::CreateImageFromFile(dataset.GetColorPaths()[i]);
auto depth_raw = io::CreateImageFromFile(dataset.GetDepthPaths()[i]);
auto rgbd_image = geometry::RGBDImage::CreateFromColorAndDepth(
*color_raw, *depth_raw,
/*depth_scale =*/1000.0,
/*depth_trunc =*/3.0,
/*convert_rgb_to_intensity =*/false);
rgbd_images.push_back(rgbd_image);
}
camera::PinholeCameraTrajectory camera_trajectory;
io::ReadPinholeCameraTrajectory(dataset.GetKeyframePosesLogPath(),
camera_trajectory);
auto mesh = io::CreateMeshFromFile(dataset.GetReconstructionPath());

来自 NYU RGBD 数据集的彩色图像 NYU_color.ppm 和深度图像 NYU_depth.pgm 示例。

import matplotlib.image as mpimg
def read_nyu_pgm(filename, byteorder='>'):
with open(filename, 'rb') as f:
buffer = f.read()
try:
header, width, height, maxval = re.search(
b"(^P5\s(?:\s*#.*[\r\n])*"
b"(\d+)\s(?:\s*#.*[\r\n])*"
b"(\d+)\s(?:\s*#.*[\r\n])*"
b"(\d+)\s(?:\s*#.*[\r\n]\s)*)", buffer).groups()
except AttributeError:
raise ValueError("Not a raw PGM file: '%s'" % filename)
img = np.frombuffer(buffer,
dtype=byteorder + 'u2',
count=int(width) * int(height),
offset=len(header)).reshape((int(height), int(width)))
img_out = img.astype('u2')
return img_out
dataset = o3d.data.SampleNYURGBDImage()
color_raw = mpimg.imread(dataset.color_path)
depth_raw = read_nyu_pgm(dataset.depth_path)
color = o3d.geometry.Image(color_raw)
depth = o3d.geometry.Image(depth_raw)
rgbd_image = o3d.geometry.RGBDImage.create_from_nyu_format(
color, depth, convert_rgb_to_intensity=False)

来自 SUN RGBD 数据集的彩色图像 SUN_color.jpg 和深度图像 SUN_depth.png 示例。

dataset = o3d.data.SampleSUNRGBDImage()
color_raw = o3d.io.read_image(dataset.color_path)
depth_raw = o3d.io.read_image(dataset.depth_path)
rgbd_image = o3d.geometry.RGBDImage.create_from_sun_format(
color_raw, depth_raw, convert_rgb_to_intensity=False)
data::SampleSUNRGBDImage dataset;
auto color_raw = io::CreateImageFromFile(dataset.GetColorPath());
auto depth_raw = io::CreateImageFromFile(dataset.GetDepthPath());
auto rgbd_image = geometry::RGBDImage::CreateFromSUNFormat(
*color_raw, *depth_raw, /*convert_rgb_to_intensity =*/false);

来自 TUM RGBD 数据集的彩色图像 TUM_color.png 和深度图像 TUM_depth.png 示例。

dataset = o3d.data.SampleTUMRGBDImage()
color_raw = o3d.io.read_image(dataset.color_path)
depth_raw = o3d.io.read_image(dataset.depth_path)
rgbd_image = o3d.geometry.RGBDImage.create_from_tum_format(
color_raw, depth_raw, convert_rgb_to_intensity=False)
data::SampleTUMRGBDImage dataset;
auto color_raw = io::CreateImageFromFile(dataset.GetColorPath());
auto depth_raw = io::CreateImageFromFile(dataset.GetDepthPath());
auto rgbd_image = geometry::RGBDImage::CreateFromTUMFormat(
*color_raw, *depth_raw, /*convert_rgb_to_intensity =*/false);

来自 Stanford 的 Lounge RGBD 数据集,包含 3000 张图像的彩色与深度序列,以及相机轨迹和重建结果。

dataset = o3d.data.LoungeRGBDImages()
rgbd_images = []
for i in range(len(dataset.depth_paths)):
color_raw = o3d.io.read_image(dataset.color_paths[i])
depth_raw = o3d.io.read_image(dataset.depth_paths[i])
rgbd_image = o3d.geometry.RGBDImage.create_from_color_and_depth(
color_raw, depth_raw)
rgbd_images.append(rgbd_image)
mesh = o3d.io.read_triangle_mesh(dataset.reconstruction_path)
data::LoungeRGBDImages dataset;
std::vector<std::shared_ptr<geometry::RGBDImage>> rgbd_images;
for (size_t i = 0; i < dataset.GetDepthPaths().size(); ++i) {
auto color_raw = io::CreateImageFromFile(dataset.GetColorPaths()[i]);
auto depth_raw = io::CreateImageFromFile(dataset.GetDepthPaths()[i]);
auto rgbd_image = geometry::RGBDImage::CreateFromColorAndDepth(
*color_raw, *depth_raw,
/*depth_scale =*/1000.0,
/*depth_trunc =*/3.0,
/*convert_rgb_to_intensity =*/false);
rgbd_images.push_back(rgbd_image);
}
auto mesh = io::CreateTriangleMeshFromFile(dataset.GetReconstructionPath());

来自 Redwood 的 Bedroom RGBD 数据集,包含 21931 张图像的彩色与深度序列,以及相机轨迹和重建结果。

dataset = o3d.data.BedroomRGBDImages()
rgbd_images = []
for i in range(len(dataset.depth_paths)):
color_raw = o3d.io.read_image(dataset.color_paths[i])
depth_raw = o3d.io.read_image(dataset.depth_paths[i])
rgbd_image = o3d.geometry.RGBDImage.create_from_color_and_depth(
color_raw, depth_raw)
rgbd_images.append(rgbd_image)
mesh = o3d.io.read_triangle_mesh(dataset.reconstruction_path)
data::BedroomRGBDImages dataset;
std::vector<std::shared_ptr<geometry::RGBDImage>> rgbd_images;
for (size_t i = 0; i < dataset.GetDepthPaths().size(); ++i) {
auto color_raw = io::CreateImageFromFile(dataset.GetColorPaths()[i]);
auto depth_raw = io::CreateImageFromFile(dataset.GetDepthPaths()[i]);
auto rgbd_image = geometry::RGBDImage::CreateFromColorAndDepth(
*color_raw, *depth_raw,
/*depth_scale =*/1000.0,
/*depth_trunc =*/3.0,
/*convert_rgb_to_intensity =*/false);
rgbd_images.push_back(rgbd_image);
}
auto mesh = io::CreateTriangleMeshFromFile(dataset.GetReconstructionPath());

来自 Redwood RGB-D 数据集 living-room1 场景的 3 个二进制 PCD 格式点云片段。该数据用于 ICP 示例。

dataset = o3d.data.DemoICPPointClouds()
pcd0 = o3d.io.read_point_cloud(dataset.paths[0])
pcd1 = o3d.io.read_point_cloud(dataset.paths[1])
pcd2 = o3d.io.read_point_cloud(dataset.paths[2])
data::DemoICPPointClouds dataset;
auto pcd0 = io::CreatePointCloudFromFile(dataset.GetPaths()[0]);
auto pcd1 = io::CreatePointCloudFromFile(dataset.GetPaths()[1]);
auto pcd2 = io::CreatePointCloudFromFile(dataset.GetPaths()[2]);

来自 Redwood RGB-D 数据集 apartment 场景的 2 个二进制 PCD 格式点云片段。该数据用于 Colored-ICP 示例。

dataset = o3d.data.DemoColoredICPPointClouds()
pcd0 = o3d.io.read_point_cloud(dataset.paths[0])
pcd1 = o3d.io.read_point_cloud(dataset.paths[1])
data::DemoColoredICPPointClouds dataset;
auto pcd0 = io::CreatePointCloudFromFile(dataset.GetPaths()[0]);
auto pcd1 = io::CreatePointCloudFromFile(dataset.GetPaths()[1]);

点云和 cropped.json(一个已保存的选定多边形体积文件)。该数据用于点云裁剪示例。

dataset = o3d.data.DemoCropPointCloud()
pcd = o3d.io.read_point_cloud(dataset.point_cloud_path)
vol = o3d.visualization.read_selection_polygon_volume(dataset.cropped_json_path)
chair = vol.crop_point_cloud(pcd)
data::DemoCropPointCloud dataset;
auto pcd = io::CreatePointCloudFromFile(dataset.GetPointCloudPath());
visualization::SelectionPolygonVolume vol;
io::ReadIJsonConvertible(dataset.GetCroppedJSONPath(), vol);
auto chair = vol.CropPointCloud(*pcd);

2 个点云片段及其各自的 FPFH 特征和 L32D 特征的示例集合。该数据用于点云特征匹配示例。

dataset = o3d.data.DemoFeatureMatchingPointClouds()
pcd0 = o3d.io.read_point_cloud(dataset.point_cloud_paths[0])
pcd1 = o3d.io.read_point_cloud(dataset.point_cloud_paths[1])
fpfh_feature0 = o3d.io.read_feature(dataset.fpfh_feature_paths[0])
fpfh_feature1 = o3d.io.read_feature(dataset.fpfh_feature_paths[1])
l32d_feature0 = o3d.io.read_feature(dataset.l32d_feature_paths[0])
l32d_feature1 = o3d.io.read_feature(dataset.l32d_feature_paths[1])
data::DemoFeatureMatchingPointClouds dataset;
auto pcd0 = io::CreatePointCloudFromFile(dataset.GetPointCloudPaths()[0]);
auto pcd1 = io::CreatePointCloudFromFile(dataset.GetPointCloudPaths()[1]);
pipelines::registration::Feature fpfh_feature0, fpfh_feature1;
io::ReadFeature(dataset.GetFPFHFeaturePaths()[0], fpfh_feature0);
io::ReadFeature(dataset.GetFPFHFeaturePaths()[1], fpfh_feature1);
pipelines::registration::Feature l32d_feature0, l32d_feature1;
io::ReadFeature(dataset.GetL32DFeaturePaths()[0], l32d_feature0);
io::ReadFeature(dataset.GetL32DFeaturePaths()[1], l32d_feature1);

片段位姿图(fragment pose graph)和全局位姿图(global pose graph)示例。该数据用于位姿图优化示例。

dataset = o3d.data.DemoPoseGraphOptimization()
pose_graph_fragment = o3d.io.read_pose_graph(dataset.pose_graph_fragment_path)
pose_graph_global = o3d.io.read_pose_graph(dataset.pose_graph_global_path)
data::DemoPoseGraphOptimization dataset;
auto pose_graph_fragment = io::CreatePoseGraphFromFile(
dataset.GetPoseGraphFragmentPath());
auto pose_graph_global = io::CreatePoseGraphFromFile(
dataset.GetPoseGraphGlobalPath());

Redwood 室内数据集(Augmented ICL-NUIM 数据集)的 living room 1 场景。该数据集包含一个稠密点云、一个 RGB 序列、一个干净深度序列、一个带噪深度序列、一个 oni 文件,以及相机轨迹。

dataset = o3d.data.RedwoodIndoorLivingRoom1()
assert Path(gt_download_dir).is_dir()
pcd = o3d.io.read_point_cloud(dataset.point_cloud_path)
im_rgbds = []
for color_path, depth_path in zip(dataset.color_paths, dataset.depth_paths):
im_color = o3d.io.read_image(color_path)
im_depth = o3d.io.read_image(depth_path)
im_rgbd = o3d.geometry.RGBDImage.create_from_color_and_depth(
im_color, im_depth)
im_rgbds.append(im_rgbd)
im_noisy_rgbds = []
for color_path, depth_path in zip(dataset.color_paths,
dataset.noisy_depth_paths):
im_color = o3d.io.read_image(color_path)
im_depth = o3d.io.read_image(depth_path)
im_rgbd = o3d.geometry.RGBDImage.create_from_color_and_depth(
im_color, im_depth)
im_noisy_rgbds.append(im_rgbd)
data::RedwoodIndoorLivingRoom1 dataset;
auto pcd = io::CreatePointCloudFromFile(dataset.GetPointCloudPath());
std::vector<std::shared_ptr<geometry::RGBDImage>> im_rgbds;
for (size_t i = 0; i < dataset.GetColorPaths().size(); ++i) {
auto im_color = io::CreateImageFromFile(dataset.GetColorPaths()[i]);
auto im_depth = io::CreateImageFromFile(dataset.GetDepthPaths()[i]);
auto im_rgbd = geometry::RGBDImage::CreateFromColorAndDepth(*im_color,
*im_depth);
im_rgbds.push_back(im_rgbd);
}
std::vector<std::shared_ptr<geometry::RGBDImage>> im_noisy_rgbds;
for (size_t i = 0; i < dataset.GetColorPaths().size(); ++i) {
auto im_color = io::CreateImageFromFile(dataset.GetColorPaths()[i]);
auto im_depth =
io::CreateImageFromFile(dataset.GetNoisyDepthPaths()[i]);
auto im_rgbd = geometry::RGBDImage::CreateFromColorAndDepth(*im_color,
*im_depth);
im_noisy_rgbds.push_back(im_rgbd);
}

Redwood 室内数据集(Augmented ICL-NUIM 数据集)的 living room 2 场景。该数据集包含一个稠密点云、一个 RGB 序列、一个干净深度序列、一个带噪深度序列、一个 oni 文件,以及相机轨迹。

dataset = o3d.data.RedwoodIndoorLivingRoom2()
assert Path(gt_download_dir).is_dir()
pcd = o3d.io.read_point_cloud(dataset.point_cloud_path)
im_rgbds = []
for color_path, depth_path in zip(dataset.color_paths, dataset.depth_paths):
im_color = o3d.io.read_image(color_path)
im_depth = o3d.io.read_image(depth_path)
im_rgbd = o3d.geometry.RGBDImage.create_from_color_and_depth(
im_color, im_depth)
im_rgbds.append(im_rgbd)
im_noisy_rgbds = []
for color_path, depth_path in zip(dataset.color_paths,
dataset.noisy_depth_paths):
im_color = o3d.io.read_image(color_path)
im_depth = o3d.io.read_image(depth_path)
im_rgbd = o3d.geometry.RGBDImage.create_from_color_and_depth(
im_color, im_depth)
im_noisy_rgbds.append(im_rgbd)
data::RedwoodIndoorLivingRoom2 dataset;
auto pcd = io::CreatePointCloudFromFile(dataset.GetPointCloudPath());
std::vector<std::shared_ptr<geometry::RGBDImage>> im_rgbds;
for (size_t i = 0; i < dataset.GetColorPaths().size(); ++i) {
auto im_color = io::CreateImageFromFile(dataset.GetColorPaths()[i]);
auto im_depth = io::CreateImageFromFile(dataset.GetDepthPaths()[i]);
auto im_rgbd = geometry::RGBDImage::CreateFromColorAndDepth(*im_color,
*im_depth);
im_rgbds.push_back(im_rgbd);
}
std::vector<std::shared_ptr<geometry::RGBDImage>> im_noisy_rgbds;
for (size_t i = 0; i < dataset.GetColorPaths().size(); ++i) {
auto im_color = io::CreateImageFromFile(dataset.GetColorPaths()[i]);
auto im_depth =
io::CreateImageFromFile(dataset.GetNoisyDepthPaths()[i]);
auto im_rgbd = geometry::RGBDImage::CreateFromColorAndDepth(*im_color,
*im_depth);
im_noisy_rgbds.push_back(im_rgbd);
}

Redwood 室内数据集(Augmented ICL-NUIM 数据集)的 office 1 场景。该数据集包含一个稠密点云、一个 RGB 序列、一个干净深度序列、一个带噪深度序列、一个 oni 文件,以及相机轨迹。

dataset = o3d.data.RedwoodIndoorOffice1()
assert Path(gt_download_dir).is_dir()
pcd = o3d.io.read_point_cloud(dataset.point_cloud_path)
im_rgbds = []
for color_path, depth_path in zip(dataset.color_paths, dataset.depth_paths):
im_color = o3d.io.read_image(color_path)
im_depth = o3d.io.read_image(depth_path)
im_rgbd = o3d.geometry.RGBDImage.create_from_color_and_depth(
im_color, im_depth)
im_rgbds.append(im_rgbd)
im_noisy_rgbds = []
for color_path, depth_path in zip(dataset.color_paths,
dataset.noisy_depth_paths):
im_color = o3d.io.read_image(color_path)
im_depth = o3d.io.read_image(depth_path)
im_rgbd = o3d.geometry.RGBDImage.create_from_color_and_depth(
im_color, im_depth)
im_noisy_rgbds.append(im_rgbd)
data::RedwoodIndoorOffice1 dataset;
auto pcd = io::CreatePointCloudFromFile(dataset.GetPointCloudPath());
std::vector<std::shared_ptr<geometry::RGBDImage>> im_rgbds;
for (size_t i = 0; i < dataset.GetColorPaths().size(); ++i) {
auto im_color = io::CreateImageFromFile(dataset.GetColorPaths()[i]);
auto im_depth = io::CreateImageFromFile(dataset.GetDepthPaths()[i]);
auto im_rgbd = geometry::RGBDImage::CreateFromColorAndDepth(*im_color,
*im_depth);
im_rgbds.push_back(im_rgbd);
}
std::vector<std::shared_ptr<geometry::RGBDImage>> im_noisy_rgbds;
for (size_t i = 0; i < dataset.GetColorPaths().size(); ++i) {
auto im_color = io::CreateImageFromFile(dataset.GetColorPaths()[i]);
auto im_depth =
io::CreateImageFromFile(dataset.GetNoisyDepthPaths()[i]);
auto im_rgbd = geometry::RGBDImage::CreateFromColorAndDepth(*im_color,
*im_depth);
im_noisy_rgbds.push_back(im_rgbd);
}

Redwood 室内数据集(Augmented ICL-NUIM 数据集)的 office 2 场景。该数据集包含一个稠密点云、一个 RGB 序列、一个干净深度序列、一个带噪深度序列、一个 oni 文件,以及相机轨迹。

dataset = o3d.data.RedwoodIndoorOffice2()
assert Path(gt_download_dir).is_dir()
pcd = o3d.io.read_point_cloud(dataset.point_cloud_path)
im_rgbds = []
for color_path, depth_path in zip(dataset.color_paths, dataset.depth_paths):
im_color = o3d.io.read_image(color_path)
im_depth = o3d.io.read_image(depth_path)
im_rgbd = o3d.geometry.RGBDImage.create_from_color_and_depth(
im_color, im_depth)
im_rgbds.append(im_rgbd)
im_noisy_rgbds = []
for color_path, depth_path in zip(dataset.color_paths,
dataset.noisy_depth_paths):
im_color = o3d.io.read_image(color_path)
im_depth = o3d.io.read_image(depth_path)
im_rgbd = o3d.geometry.RGBDImage.create_from_color_and_depth(
im_color, im_depth)
im_noisy_rgbds.append(im_rgbd)
data::RedwoodIndoorOffice2 dataset;
auto pcd = io::CreatePointCloudFromFile(dataset.GetPointCloudPath());
std::vector<std::shared_ptr<geometry::RGBDImage>> im_rgbds;
for (size_t i = 0; i < dataset.GetColorPaths().size(); ++i) {
auto im_color = io::CreateImageFromFile(dataset.GetColorPaths()[i]);
auto im_depth = io::CreateImageFromFile(dataset.GetDepthPaths()[i]);
auto im_rgbd = geometry::RGBDImage::CreateFromColorAndDepth(*im_color,
*im_depth);
im_rgbds.push_back(im_rgbd);
}
std::vector<std::shared_ptr<geometry::RGBDImage>> im_noisy_rgbds;
for (size_t i = 0; i < dataset.GetColorPaths().size(); ++i) {
auto im_color = io::CreateImageFromFile(dataset.GetColorPaths()[i]);
auto im_depth =
io::CreateImageFromFile(dataset.GetNoisyDepthPaths()[i]);
auto im_rgbd = geometry::RGBDImage::CreateFromColorAndDepth(*im_color,
*im_depth);
im_noisy_rgbds.push_back(im_rgbd);
}