<jupyter_start><jupyter_text>Redwood 3DScanRedwood 3DScan [Sun et al, 2016] has scanned object dataset with following data.- Mesh data of objects with background- Sequence RGB and Depth image data- Categories, camera infomationRelated URL- [Redwood 3D Scan Homepage](http://redwood-data.org/3dscan/)- [GitHub (code for download and visualization)](https://github.com/isl-org/redwood-3dscan): this repository has codes for download.Download a repository for download data list:<jupyter_code>!git clone https://github.com/isl-org/redwood-3dscan.git
%load_ext autoreload
%autoreload 2<jupyter_output><empty_output><jupyter_text>The subsection tutorial use following code:<jupyter_code># path to tutlibs
import path

from tutlibs.dataset import Redwood3DScan, Redwood3DScanData
from tutlibs.constructing import depth_to_point
from tutlibs.transformation import Transformation as tr
from tutlibs.visualization import JupyterVisualizer as jv

import cv2
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import ImageGrid

dataset = Redwood3DScan("redwood-3dscan/", "../../data/redwood-3dscan/")
data = dataset[3]
color_image_paths = data.color_image_paths
depth_image_paths = data.depth_image_paths
mesh = data.mesh
print(
    f"number of color image: {len(color_image_paths)}, "
    f"color image path example: {color_image_paths[0]}"
)<jupyter_output>a
number of color image: 1262, color image path example: ../../data/redwood-3dscan/00004/rgbd/rgb/0000001-000000000000.jpg<jupyter_text>Some samples have mesh data:<jupyter_code>if mesh is not None:
    vertices, triangles, _ = mesh
    print(f"mesh vertices shape: {vertices.shape}, triangles shape: {triangles.shape}")
else:
    print(f"There is not object file.")<jupyter_output>mesh vertices shape: (330714, 3), triangles shape: (626211, 3)<jupyter_text>Convert depth image to a point cloud:<jupyter_code>fx = fy = 525
cx = 319.5
cy = 239.5

depth_image = cv2.imread(depth_image_paths[0], -1)
point_cloud = depth_to_point(depth_image, fx, fy, cx, cy)

obj_point_cloud = jv.point(point_cloud)
jv.display([obj_point_cloud])<jupyter_output><empty_output><jupyter_text>Visualize mesh data:<jupyter_code>obj_mesh = jv.mesh(vertices, triangles)
jv.display([obj_mesh])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10299295774647887, 'fraction_numerical': 0.03389084507042254, 'mean_word_length': 6.308681672025723, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '268203', 'license': 'MIT', 'n_tokens_mistral': 836, 'n_tokens_neox': 768, 'n_words': 197, 'path': 'python/datasets/redwood_3dscan.ipynb', 'repo_name': 'Obarads/Point_Cloud_Tutorial', 'size': '2272'}