forked from gjc13/KinectToPCL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEntropyFilterBuilder.h
47 lines (33 loc) · 989 Bytes
/
EntropyFilterBuilder.h
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
//
// Created by 郭嘉丞 on 15/10/10.
//
#ifndef KINECTTOPCL_ENTROPYFILTERBUILDER_H
#define KINECTTOPCL_ENTROPYFILTERBUILDER_H
#include "LineFilterBuilder.h"
class EntropyFilterBuilder : public LineFilterBuilder
{
public:
EntropyFilterBuilder(const cv::Mat &depthMatrix, const cv::Mat &imageMatrix, int filtersize = 5, double threshold = 0.4)
: LineFilterBuilder(depthMatrix, imageMatrix), entropyTable(new double[filtersize * filtersize + 1]),
filterSize(filtersize), threshold_(threshold)
{
buildEntropyTable();
}
~EntropyFilterBuilder()
{
delete[] entropyTable;
}
protected:
void buildPointCloud();
private:
void saveFilter();
cv::Mat getEntropyImage();
void filterEntropy(double threshold, cv::Mat &entropyImage);
void buildEntropyTable();
void openDepthImage();
double *entropyTable;
int filterSize;
double threshold_;
};
#endif
//KINECTTOPCL_ENTROPYFILTERBUILDER_H