-
Notifications
You must be signed in to change notification settings - Fork 0
/
cvMat2PclPc.hpp
54 lines (45 loc) · 1.32 KB
/
cvMat2PclPc.hpp
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
#define __CVMAT_TO_PCLPC_HPP__
#ifdef __CVMAT_TO_PCLPC_HPP__
//-- Kinect --//
//#include <Kinect.h>
//-- PCL --//
#include <pcl/ModelCoefficients.h>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/sample_consensus/method_types.h>
#include <pcl/sample_consensus/model_types.h>
#include <pcl/segmentation/sac_segmentation.h>
#include <pcl/visualization/cloud_viewer.h>
//-- OpenCV --//
#include <opencv2/opencv.hpp>
// バージョン取得
#define CV_VERSION_STR CVAUX_STR(CV_MAJOR_VERSION) CVAUX_STR(CV_MINOR_VERSION) CVAUX_STR(CV_SUBMINOR_VERSION)
// ビルドモード
#ifdef _DEBUG
#define CV_EXT_STR "d.lib"
#else
#define CV_EXT_STR ".lib"
#endif
// ライブラリのリンク(不要な物はコメントアウト)
#pragma comment(lib, "opencv_core" CV_VERSION_STR CV_EXT_STR)
#pragma comment(lib, "opencv_highgui" CV_VERSION_STR CV_EXT_STR)
namespace imaiUtil{
HRESULT makePointCloudXYZRGB_fromPc3DMat(
pcl::PointCloud<pcl::PointXYZRGB>::Ptr pc_dst,
cv::Mat &pc3DMat,
cv::Mat &colorIndicsMapped2Depth,
cv::Mat &colorMat,
cv::Mat &depthMat
);
HRESULT makePointCloudXYZRGB_fromPc3DMatMasked(
pcl::PointCloud<pcl::PointXYZRGB>::Ptr pc_dst,
cv::Mat &pc3DMat,
cv::Mat &colorIndicsMapped2Depth,
cv::Mat &colorMat,
cv::Mat &depthMat,
cv::Mat &maskMat,
unsigned int th_far = 0,
unsigned int th_near = 0
);
}
#endif