-
大小: 435KB文件类型: .zip金币: 2下载: 1 次发布日期: 2021-11-25
- 语言: 其他
- 标签: PCL Kinfu KinectV2 KinectFusion
资源简介
这是独立的Kinfu源码,不需要安装PCL,直接编译安装就可以实现KinectFusion功能。
代码片段和文件信息
#include
#include
#include
#include
#include
#include
using namespace kfusion;
struct KinFuApp
{
static void KeyboardCallback(const cv::viz::KeyboardEvent& event void* pthis)
{
KinFuApp& kinfu = *static_cast(pthis);
if(event.action != cv::viz::KeyboardEvent::KEY_DOWN)
return;
if(event.code == ‘t‘ || event.code == ‘T‘)
kinfu.take_cloud(*kinfu.kinfu_);
if(event.code == ‘i‘ || event.code == ‘I‘)
kinfu.iteractive_mode_ = !kinfu.iteractive_mode_;
}
KinFuApp(OpenNISource& source) : exit_ (false) iteractive_mode_(false) capture_ (source) pause_(false)
{
KinFuParams params = KinFuParams::default_params();
kinfu_ = KinFu::Ptr( new KinFu(params) );
capture_.setRegistration(true);
cv::viz::WCube cube(cv::Vec3d::all(0) cv::Vec3d(params.volume_size) true cv::viz::Color::apricot());
viz.showWidget(“cube“ cube params.volume_pose);
viz.showWidget(“coor“ cv::viz::WCoordinateSystem(0.1));
viz.registerKeyboardCallback(KeyboardCallback this);
}
void show_depth(const cv::Mat& depth)
{
cv::Mat display;
//cv::normalize(depth display 0 255 cv::NORM_MINMAX CV_8U);
depth.convertTo(display CV_8U 255.0/4000);
cv::imshow(“Depth“ display);
}
void show_raycasted(KinFu& kinfu)
{
const int mode = 3;
if (iteractive_mode_)
kinfu.renderImage(view_device_ viz.getViewerPose() mode);
else
kinfu.renderImage(view_device_ mode);
view_host_.create(view_device_.rows() view_device_.cols() CV_8UC4);
view_device_.download(view_host_.ptr() view_host_.step);
cv::imshow(“Scene“ view_host_);
}
void take_cloud(KinFu& kinfu)
{
cuda::DeviceArray cloud = kinfu.tsdf().fetchCloud(cloud_buffer);
cv::Mat cloud_host(1 (int)cloud.size() CV_32FC4);
cloud.download(cloud_host.ptr());
viz.showWidget(“cloud“ cv::viz::WCloud(cloud_host));
//viz.showWidget(“cloud“ cv::viz::WPaintedCloud(cloud_host));
}
bool execute()
{
KinFu& kinfu = *kinfu_;
cv::Mat depth image;
double time_ms = 0;
bool has_image = false;
for (int i = 0; !exit_ && !viz.wasStopped(); ++i)
{
bool has_frame = capture_.grab(depth image);
if (!has_frame)
return std::cout << “Can‘t grab“ << std::endl false;
depth_device_.upload(depth.data depth.step depth.rows depth.cols);
{
SampledScopeTime fps(time_ms); (void)fps;
has_image = kinfu(depth_device_);
}
if (has_image)
show_raycasted(kinfu);
show_depth(depth);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-01-29 08:20 kinfu_remake-master\
文件 1350 2017-01-29 08:20 kinfu_remake-master\CMakeLists.txt
文件 1492 2017-01-29 08:20 kinfu_remake-master\LICENSE.md
文件 1064 2017-01-29 08:20 kinfu_remake-master\README.md
目录 0 2017-01-29 08:20 kinfu_remake-master\apps\
文件 454 2017-01-29 08:20 kinfu_remake-master\apps\CMakeLists.txt
文件 4957 2017-01-29 08:20 kinfu_remake-master\apps\demo.cpp
目录 0 2017-01-29 08:20 kinfu_remake-master\cmake\
目录 0 2017-01-29 08:20 kinfu_remake-master\cmake\Modules\
文件 2830 2017-01-29 08:20 kinfu_remake-master\cmake\Modules\FindOpenNI.cmake
文件 4671 2017-01-29 08:20 kinfu_remake-master\cmake\Targets.cmake
文件 3083 2017-01-29 08:20 kinfu_remake-master\cmake\Utils.cmake
目录 0 2017-01-29 08:20 kinfu_remake-master\kfusion\
文件 219 2017-01-29 08:20 kinfu_remake-master\kfusion\CMakeLists.txt
目录 0 2017-01-29 08:20 kinfu_remake-master\kfusion\include\
目录 0 2017-01-29 08:20 kinfu_remake-master\kfusion\include\io\
文件 1013 2017-01-29 08:20 kinfu_remake-master\kfusion\include\io\capture.hpp
目录 0 2017-01-29 08:20 kinfu_remake-master\kfusion\include\kfusion\
目录 0 2017-01-29 08:20 kinfu_remake-master\kfusion\include\kfusion\cuda\
文件 14543 2017-01-29 08:20 kinfu_remake-master\kfusion\include\kfusion\cuda\device_array.hpp
文件 10616 2017-01-29 08:20 kinfu_remake-master\kfusion\include\kfusion\cuda\device_memory.hpp
文件 1377 2017-01-29 08:20 kinfu_remake-master\kfusion\include\kfusion\cuda\imgproc.hpp
文件 2548 2017-01-29 08:20 kinfu_remake-master\kfusion\include\kfusion\cuda\kernel_containers.hpp
文件 1671 2017-01-29 08:20 kinfu_remake-master\kfusion\include\kfusion\cuda\projective_icp.hpp
文件 2277 2017-01-29 08:20 kinfu_remake-master\kfusion\include\kfusion\cuda\tsdf_volume.hpp
文件 177 2017-01-29 08:20 kinfu_remake-master\kfusion\include\kfusion\exports.hpp
文件 2657 2017-01-29 08:20 kinfu_remake-master\kfusion\include\kfusion\kinfu.hpp
文件 2115 2017-01-29 08:20 kinfu_remake-master\kfusion\include\kfusion\types.hpp
目录 0 2017-01-29 08:20 kinfu_remake-master\kfusion\src\
文件 10224 2017-01-29 08:20 kinfu_remake-master\kfusion\src\capture.cpp
文件 10249 2017-01-29 08:20 kinfu_remake-master\kfusion\src\core.cpp
............此处省略17个文件信息
- 上一篇:最大加权区间调度问题详解
- 下一篇:89c51无线控制 基于单片机的无线控制系统
相关资源
- 超级场景清理器(SPCleaner)v1.0免费版
- httpclient4.3工具类
- SfM稀疏三维点云重建--完整工程文件
- 全面的点云库PCL学习教程
- CPCL查看器.rar
- Linux ntpclient代码
- 点云库PCL学习教程 完整版
- 中英文PCL5语言参考手册_11086676.zip
- stm32f4+w5500+tcpclient/server源码
- PC-lint 9 + 中文手册
- FTPclinet客户端
- PCL点云库SACSegmentation用法demo
- 小兔子pcd点云数据pcl官方案例1)
- PCL5编程指南中文版
- osg显示点云
- 利用PCL,OpenCV求取点云的体积
- pcl5语言详细介绍
- httpclient-4.5.3 api 中文版
- stm32 lwip DNS DHCP ucosIII TCP Client 原创程
- HttpClient异步请求
- pcl点云模型
- HanV1.0.rar
-
OPCli
nk8 -
Opcli
nk 8.0.0 - VTK+PCL+VS2013显示一个图形的基本功能
- HttpClient实现POST GET和文件
- pcl 1.7.2(vtk6.2)+vs2013_x64 +test.pcd点云
- kinectV2 抠图 自动拍照
- pclint集成source insight
- 使用HttpURLConnection或HttpClient方式传j
评论
共有 条评论