cpp-toolbox  0.0.1
A toolbox library for C++
Loading...
Searching...
No Matches
toolbox::io::kitti_pcd_pair_t Class Reference

KITTI点云对数据集类/KITTI point cloud pair dataset class. More...

#include <kitti_pcd.hpp>

Inheritance diagram for toolbox::io::kitti_pcd_pair_t:

Public Member Functions

 kitti_pcd_pair_t (const std::string &velodye_dir, std::size_t skip=0)
 构造函数,加载指定目录下的KITTI点云对/Constructor, loads KITTI point cloud pairs from the given directory
 
std::size_t size_impl () const
 获取点云对的数量/Get the number of point cloud pairs
 
std::optional< std::pair< std::unique_ptr< toolbox::types::point_cloud_t< float > >, std::unique_ptr< toolbox::types::point_cloud_t< float > > > > at_impl (std::size_t index) const
 按索引访问点云对/Access a point cloud pair by index
 
- Public Member Functions inherited from toolbox::io::dataset_t< kitti_pcd_pair_t, std::pair< std::unique_ptr< toolbox::types::point_cloud_t< float > >, std::unique_ptr< toolbox::types::point_cloud_t< float > > > >
std::size_t size () const
 获取数据集大小/Get the size of the dataset
 
std::optional< std::pair< std::unique_ptr< toolbox::types::point_cloud_t< float > >, std::unique_ptr< toolbox::types::point_cloud_t< float > > > > operator[] (std::size_t index) const
 通过下标访问数据/Access data by index
 
std::optional< std::pair< std::unique_ptr< toolbox::types::point_cloud_t< float > >, std::unique_ptr< toolbox::types::point_cloud_t< float > > > > at (std::size_t index) const
 通过下标访问数据/Access data by index
 
std::optional< std::pair< std::unique_ptr< toolbox::types::point_cloud_t< float > >, std::unique_ptr< toolbox::types::point_cloud_t< float > > > > get_item (std::size_t index) const
 获取指定索引的数据/Get data at the specified index
 
std::optional< std::pair< std::unique_ptr< toolbox::types::point_cloud_t< float > >, std::unique_ptr< toolbox::types::point_cloud_t< float > > > > get_next ()
 获取下一个元素并推进内部索引/Get the next element and advance the internal index
 
std::optional< std::pair< std::unique_ptr< toolbox::types::point_cloud_t< float > >, std::unique_ptr< toolbox::types::point_cloud_t< float > > > > peek_next () const
 查看下一个元素但不推进索引/Peek the next element without advancing the index
 
void reset_iterator ()
 重置内部迭代器索引/Reset the internal iterator index
 
std::size_t current_index () const
 获取当前迭代器索引/Get the current iterator index
 
 dataset_t (const dataset_t &)=delete
 禁用拷贝构造/Copy constructor is disabled
 
 dataset_t (dataset_t &&)=delete
 禁用移动构造/Move constructor is disabled
 
dataset_toperator= (const dataset_t &)=delete
 禁用拷贝赋值/Copy assignment is disabled
 
dataset_toperator= (dataset_t &&)=delete
 禁用移动赋值/Move assignment is disabled
 

Additional Inherited Members

- Public Types inherited from toolbox::io::dataset_t< kitti_pcd_pair_t, std::pair< std::unique_ptr< toolbox::types::point_cloud_t< float > >, std::unique_ptr< toolbox::types::point_cloud_t< float > > > >
using data_type = std::pair< std::unique_ptr< toolbox::types::point_cloud_t< float > >, std::unique_ptr< toolbox::types::point_cloud_t< float > > >
 数据类型别名/Type alias for data type
 
- Protected Member Functions inherited from toolbox::io::dataset_t< kitti_pcd_pair_t, std::pair< std::unique_ptr< toolbox::types::point_cloud_t< float > >, std::unique_ptr< toolbox::types::point_cloud_t< float > > > >
 dataset_t ()=default
 构造函数/Constructor
 
 ~dataset_t ()=default
 析构函数/Destructor
 

Detailed Description

KITTI点云对数据集类/KITTI point cloud pair dataset class.

用于按指定间隔成对加载KITTI点云数据/Used to load KITTI point cloud pairs with a specified skip interval

// 示例:加载KITTI点云对数据集并访问点云对
toolbox::io::kitti_pcd_pair_t pair_dataset("/path/to/velodyne", 1);
std::size_t n = pair_dataset.size();
auto pair_opt = pair_dataset.at(0);
if (pair_opt && pair_opt->first && pair_opt->second) {
// 处理点云对/Process the point cloud pair
}
KITTI点云对数据集类/KITTI point cloud pair dataset class.
Definition kitti_pcd.hpp:102

Constructor & Destructor Documentation

◆ kitti_pcd_pair_t()

toolbox::io::kitti_pcd_pair_t::kitti_pcd_pair_t ( const std::string &  velodye_dir,
std::size_t  skip = 0 
)
explicit

构造函数,加载指定目录下的KITTI点云对/Constructor, loads KITTI point cloud pairs from the given directory

Parameters
velodye_dirKITTI点云文件所在目录/Directory containing KITTI point cloud files
skip点云对之间的间隔/Skip interval between point cloud pairs
toolbox::io::kitti_pcd_pair_t pair_dataset("/path/to/velodyne", 2);

Member Function Documentation

◆ at_impl()

std::optional< std::pair< std::unique_ptr< toolbox::types::point_cloud_t< float > >, std::unique_ptr< toolbox::types::point_cloud_t< float > > > > toolbox::io::kitti_pcd_pair_t::at_impl ( std::size_t  index) const

按索引访问点云对/Access a point cloud pair by index

Parameters
index点云对索引/Index of the point cloud pair
Returns
对应索引的点云对的unique_ptr对(可选)/Optional pair of unique_ptrs to the point clouds at the given index
auto pair_opt = pair_dataset.at_impl(0);
if (pair_opt && pair_opt->first && pair_opt->second) {
// 处理点云对/Process the point cloud pair
}

◆ size_impl()

std::size_t toolbox::io::kitti_pcd_pair_t::size_impl ( ) const

获取点云对的数量/Get the number of point cloud pairs

Returns
点云对数量/Number of point cloud pairs
std::size_t n = pair_dataset.size_impl();

The documentation for this class was generated from the following file: