资源简介
点云库PCL学习:pcd数据集应用实例,希望大家相互学习
代码片段和文件信息
/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2011 Willow Garage Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms with or without
* modification are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Willow Garage Inc. nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* “AS IS“ AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT
* LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT
* INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING
* BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT
* LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* @author: Cedric Cagniart Koen Buys
*/
#include
#include
#include
#include “OptionParser.h“
#include
#include
#include
#include
#include
#include
#define THRESH 0.05 // 5 cm
using namespace pcl::people::BVH;
/**
* This function will simply compute the maximal displacement over all the
* joints between two poses.
*/
inline float posDist(const std::vector &pos1
const std::vector &pos2)
{
int numJoints = pos1.size();
assert(int (pos2.size()) == numJoints);
float maxDist = 0.;
for (int ji = 0; ji < numJoints; ++ji)
{
Vec3 delta = pos1[ji] - pos2[ji];
float d2 = delta.dot(delta);
if (d2 > maxDist)
{
maxDist = d2;
}
}
return sqrt(maxDist);
}
/**
* Load all the filenames from the BVHList.txt file
*/
void loadFilenames(const std::string &file
std::vector &fileList)
{
std::ifstream fin(file.c_str());
if (!fin.is_open())
{
throw std::runtime_error(std::string(“(E): could not open “) + file);
}
fileList.clear();
while (!fin.eof())
{
std::string buff;
fin >> buff;
fileList.push_back(buff);
}
}
int main(int argc char **argv)
{
OptionP
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 244 2014-07-01 21:26 people\DataSynth\BVHDBSparsify\CMakeLists.txt
文件 3716 2014-07-01 21:26 people\DataSynth\BVHDBSparsify\include\OptionParser.h
....... 6625 2014-07-01 21:26 people\DataSynth\BVHDBSparsify\src\source.cpp
....... 540 2014-07-01 21:26 people\DataSynth\BVHtoRGBD\CMakeLists.txt
文件 2363 2014-07-01 21:26 people\DataSynth\BVHtoRGBD\include\OpenGLContext.h
文件 3408 2014-07-01 21:26 people\DataSynth\BVHtoRGBD\include\OptionParser.h
....... 3431 2014-07-01 21:26 people\DataSynth\BVHtoRGBD\include\RGBDRenderer.h
文件 4094 2014-07-01 21:26 people\DataSynth\BVHtoRGBD\src\GLerrors.cpp
文件 1961 2014-07-01 21:26 people\DataSynth\BVHtoRGBD\src\GLerrors.h
文件 3878 2014-07-01 21:26 people\DataSynth\BVHtoRGBD\src\OpenGLContext.cpp
....... 12246 2014-07-01 21:26 people\DataSynth\BVHtoRGBD\src\RGBDRenderer.cpp
....... 10102 2014-07-01 21:26 people\DataSynth\BVHtoRGBD\src\source.cpp
....... 2088 2014-07-01 21:26 people\DataSynth\cmake\FindEigen.cmake
....... 360 2014-07-01 21:26 people\DataSynth\CMakeLists.txt
....... 390 2014-07-01 21:26 people\DataSynth\libBVH\CMakeLists.txt
....... 2907 2014-07-01 21:26 people\DataSynth\libBVH\include\libBVH\BVHMesh.h
....... 3502 2014-07-01 21:26 people\DataSynth\libBVH\include\libBVH\BVHMesh_smooth.h
....... 2262 2014-07-01 21:26 people\DataSynth\libBVH\include\libBVH\BVHMotionFile.h
....... 2919 2014-07-01 21:26 people\DataSynth\libBVH\include\libBVH\BVHTransforms.h
....... 4418 2014-07-01 21:26 people\DataSynth\libBVH\include\libBVH\CMUTransforms.h
....... 2606 2014-07-01 21:26 people\DataSynth\libBVH\include\libBVH\libBVH.h
....... 5022 2014-07-01 21:26 people\DataSynth\libBVH\src\BVHMesh.cpp
....... 7057 2014-07-01 21:26 people\DataSynth\libBVH\src\BVHMesh_smooth.cpp
....... 2999 2014-07-01 21:26 people\DataSynth\libBVH\src\BVHMotionFile.cpp
....... 4522 2014-07-01 21:26 people\DataSynth\libBVH\src\BVHTransforms.cpp
....... 3565 2014-07-01 21:26 people\DataSynth\libBVH\src\BVHWrite.cpp
....... 11216 2014-07-01 21:26 people\DataSynth\libBVH\src\libBVH.cpp
....... 2119548 2014-07-01 21:26 people\results\forest1\tree_20.txt.bz2
....... 2070995 2014-07-01 21:26 people\results\forest2\tree_20.txt.bz2
....... 2073673 2014-07-01 21:26 people\results\forest3\tree_20.txt.bz2
............此处省略20个文件信息
- 上一篇:光纤光学廖延彪
- 下一篇:基于VC++的防火墙NetDefender
评论
共有 条评论