-
大小: 22.84MB文件类型: .zip金币: 1下载: 0 次发布日期: 2023-07-07
- 语言: 其他
- 标签: Kinect 三维重建 kinectfusion
资源简介
kinectfusion程序,亲测可以使用。重建效果很好。可以把模型保存为多种格式 obj ply stl
代码片段和文件信息
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//------------------------------------------------------------------------------
#include “stdafx.h“
#include “ImageRenderer.h“
///
/// Constructor
///
ImageRenderer::ImageRenderer() :
m_hWnd(0)
m_sourceWidth(0)
m_sourceHeight(0)
m_sourceStride(0)
m_pD2DFactory(NULL)
m_pRenderTarget(NULL)
m_pBitmap(0)
{
}
///
/// Destructor
///
ImageRenderer::~ImageRenderer()
{
DiscardResources();
SafeRelease(m_pD2DFactory);
}
///
/// Ensure necessary Direct2d resources are created
///
/// indicates success or failure
HRESULT ImageRenderer::EnsureResources()
{
HRESULT hr = S_OK;
if (NULL == m_pRenderTarget)
{
D2D1_SIZE_U size = D2D1::SizeU(m_sourceWidth m_sourceHeight);
D2D1_RENDER_TARGET_PROPERTIES rtProps = D2D1::RenderTargetProperties();
rtProps.pixelFormat = D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM D2D1_ALPHA_MODE_IGNORE);
rtProps.usage = D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE;
// Create a hWnd render target in order to render to the window set in initialize
hr = m_pD2DFactory->CreateHwndRenderTarget(
rtProps
D2D1::HwndRenderTargetProperties(m_hWnd size)
&m_pRenderTarget
);
if ( FAILED(hr) )
{
return hr;
}
// Create a bitmap that we can copy image data into and then render to the target
hr = m_pRenderTarget->CreateBitmap(
size
D2D1::BitmapProperties( D2D1::PixelFormat( DXGI_FORMAT_B8G8R8A8_UNORM D2D1_ALPHA_MODE_IGNORE) )
&m_pBitmap
);
if ( FAILED(hr) )
{
SafeRelease(m_pRenderTarget);
return hr;
}
}
return hr;
}
///
/// Dispose of Direct2d resources
///
void ImageRenderer::DiscardResources()
{
SafeRelease(m_pRenderTarget);
SafeRelease(m_pBitmap);
}
///
/// Set the window to draw to as well as the video format
/// Implied bits per pixel is 32
///
/// window to draw to
/// already created D2D factory object
/// width (in pixels) of image data to be drawn
/// height (in pixels) of image data to be drawn
/// length (in bytes) of a single scanline
/// indicates success or failure
HRESULT ImageRenderer::Initialize(HWND hWnd ID2D1Factory* pD2DFactory int sourceWidth int sourceHeight int sourceStride)
{
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-11-24 13:10 KinectFusionExplorer-D2D\
目录 0 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\
文件 152482 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\CL.read.1.tlog
文件 2460 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\CL.write.1.tlog
文件 299690 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\ImageRenderer.obj
文件 977904 2014-10-19 13:23 KinectFusionExplorer-D2D\Debug\Kinect20.Fusion.dll
文件 393728 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\KinectFusionExplorer-D2D.exe
文件 1425548 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\KinectFusionExplorer-D2D.ilk
文件 61 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\KinectFusionExplorer-D2D.lastbuildstate
文件 2955 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\KinectFusionExplorer-D2D.log
文件 4664320 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\KinectFusionExplorer-D2D.pdb
文件 15788 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\KinectFusionExplorer-D2D.res
文件 357332 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\KinectFusionExplorer.obj
文件 1189868 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\KinectFusion
文件 700052 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\KinectFusionProcessor.obj
文件 296559 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\KinectFusionProcessorfr
文件 26773 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\Timer.obj
文件 3654 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\cl.command.1.tlog
文件 2 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\li
文件 2 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\li
文件 2 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\li
文件 2 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\li
文件 3252 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\li
文件 6858 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\li
文件 1190 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\li
文件 616 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\rc.command.1.tlog
文件 2220 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\rc.read.1.tlog
文件 246 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\rc.write.1.tlog
文件 1616896 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\vc110.idb
文件 2265088 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\vc110.pdb
文件 4780 2014-10-19 12:43 KinectFusionExplorer-D2D\ImageRenderer.cpp
............此处省略50个文件信息
相关资源
- 双目标定后的三维重建
- Kinect人机交互开发实践162907
- 空间点三位重建前方交会
- Kinect人机交互开发实践
- PCL1.7.2+Kinect V 2.0获取并保存点云PCD数
- Kinect应用开发实战用最自然的方式与
- kinect深度图彩色图融合代码
- 基于特征点匹配的三维重建OpenCV+Ope
- 基于相移法的三维重建
- CMP-MVS开源代码
- kinectV2.0深度图像与彩色图像的坐标映
- KinectV2 彩色图像上融合人体骨骼图
- 基于Kinect的虚拟试衣系统的设计与实
- kinect2.0控制鼠标
- UE4+kinect+leapmotion
- SFMtoolKit3工程
- VisualSFM代码
- kinect v2简单2D换衣系统
- 三维重建经典论文集
- VS2013+KinectV2获取点云
- NITE-Win32-1.5.2.21-Dev.part2
- 三维重建源代码
- 点云三维重建
- Multi-View Stereo.pdf
- Kinect + openni+opencv 获取深度图
- Microsoft.Research.Kinect.dll(驱动程序)
- VisualSFM+MeshLab三维重建
- 用于三维重建方面的三维点云文件
- Kinect+v2+Examples+with+MS-SDK
- sfm三维重建.rar
评论
共有 条评论