-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPCDProcessClass.h
More file actions
88 lines (79 loc) · 3.63 KB
/
PCDProcessClass.h
File metadata and controls
88 lines (79 loc) · 3.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/**
* Copyright 2017 National Chiao Tung University, Intelligent System and Control Integration Laboratory
* Author: Cheng-Hei Wu
* Maintainer : Howard Chen
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//#undef max
//#undef min
#include <pcl/console/print.h>
#include <pcl/console/parse.h>
#include <pcl/console/time.h>
#include <cmath>
#include <cfloat>
#include <iostream>
#include <pcl\features\boundary.h>
#include <pcl\filters\voxel_grid.h>
#include <pcl\keypoints\uniform_sampling.h>
#include <pcl\features\fpfh.h>
#include <pcl\visualization\cloud_viewer.h>
#include <pcl\features\normal_3d.h>
#include <pcl\visualization\point_cloud_color_handlers.h>
#include <pcl\visualization\pcl_visualizer.h>
#include <pcl\visualization\histogram_visualizer.h>
#include <pcl\visualization\point_picking_event.h>
#include <Eigen/Geometry>
#include <boost/thread/thread.hpp>
#include <pcl\io\io.h>
#include <pcl\io\pcd_io.h>
#include <pcl\common\common.h>
#include <pcl\search\search.h>
#include <pcl\kdtree\kdtree.h>
#include <pcl\octree\octree.h>
#include <pcl\console\parse.h>
#include <pcl\console\print.h>
#include <pcl\console\time.h>
#include <pcl\range_image\range_image.h>
#include <pcl\impl\point_types.hpp>
using namespace std;
using namespace pcl;
typedef pcl::PointXYZ PointT;
class PCDProcessClass
{
private:
pcl::PointCloud< pcl::PointXYZ>::Ptr CAD_PCData;
pcl::PointCloud< pcl::PointXYZ>::Ptr CAD_ResamplePCData;
pcl::PointCloud<pcl::Normal>::Ptr CAD_Normal;
pcl::PointCloud<pcl::Boundary>::Ptr CAD_Boundary;
pcl::PointCloud<pcl::PointXYZ>::Ptr CAD_BoundaryPointXYZ;
public:
float **pairFeatures;
int ***HashTable;
int *HashTable_counter;
pcl::PointCloud< pcl::PointXYZ>::Ptr getCAD_ResamplePCData();
pcl::PointCloud<pcl::Normal>::Ptr getCAD_Normal();
pcl::PointCloud<PointT>::Ptr getCAD_PCData();
pcl::PointCloud<pcl::Boundary>::Ptr getCAD_Boundary();
pcl::PointCloud<pcl::PointXYZ>::Ptr getCAD_BoundaryPointXYZ();
void uniform_DownSample(pcl::PointCloud<pcl::PointXYZ>::Ptr &input_cloud, pcl::PointCloud<pcl::PointXYZ>::Ptr &output_cloud, float voxel);
void voxelGrid_Filter(pcl::PointCloud<pcl::PointXYZ>::Ptr &input_cloud, pcl::PointCloud<pcl::PointXYZ>::Ptr &output_cloud, float voxel);
void showCAD_Boundary(pcl::PointCloud<pcl::PointXYZ>::ConstPtr input_BoundaryCloud);
void computePairFeature(pcl::PointCloud<PointXYZ>::Ptr &input_cloud, pcl::PointCloud<pcl::Normal>::Ptr &input_normalCloud, float threshold_dist, float threshold_angle);
void computeBoundary(pcl::PointCloud<PointXYZ>::Ptr &input_cloud, pcl::PointCloud<pcl::Normal>::Ptr &input_normalCloud, pcl::PointCloud<pcl::Boundary>::Ptr &output_boundaryCloud, pcl::PointCloud<PointXYZ>::Ptr &output_boundaryPointXYZ);
PCDProcessClass();
};
//bool computePairFeatures (const Eigen::Vector4f &p1, const Eigen::Vector4f &n1,
//const Eigen::Vector4f &p2, const Eigen::Vector4f &n2,
//float &f1, float &f2, float &f3, float &f4);
//int searchHashTable(int p, float** float_ptr, float* float_compare);
//float myself_round(float p, int order);