-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEdgeRefinedSuperpixel.h
44 lines (42 loc) · 1.26 KB
/
EdgeRefinedSuperpixel.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
#ifndef EDGE_REFINED_SUPERPIXEL_H
#define EDGE_REFINED_SUPERPIXEL_H
#include <cuda.h>
#include <cuda_runtime.h>
#include <XnCppWrapper.h>
#include <opencv2\opencv.hpp>
#include "thrust\fill.h"
#include "thrust\device_ptr.h"
#include "thrust\iterator\zip_iterator.h"
#include "thrust\transform.h"
#include <opencv2\gpu\gpu.hpp>
class EdgeRefinedSuperpixel{
public:
EdgeRefinedSuperpixel(int width, int height);
~EdgeRefinedSuperpixel();
void EdgeRefining(int* color_label_device, int* depth_label_device, float* depth_device, cv::gpu::GpuMat color_image);
int* getRefinedLabels_Device();
int* getRefinedLabels_Host();
float* getRefinedDepth_Device();
float* getRefinedDepth_Host();
cv::Mat_<cv::Vec3b> getSegmentedImage(const int max_depth);
private:
static const int WindowSize;
static const float SpatialSigma;
static const float ColorSigma;
static const float DepthSigma;
int Width;
int Height;
float* SpatialFilter_Host;
float* SpatialFilter_Device;
int* refinedLabels_Device;
int* refinedLabels_Host;
float* refinedDepth_Device;
float* refinedDepth_Host;
void calcSpatialFilter();
cv::Mat_<cv::Vec3b> segmentedImage;
void getRGB(float ratio, cv::Vec3b& color);
//int* colorLabels_Host;
//int* depthLabels_Host;
//float* Depth_Host;
};
#endif