|
|
|
@ -1731,43 +1731,6 @@ namespace cv |
|
|
|
|
std::vector<oclMat> datas; |
|
|
|
|
oclMat out; |
|
|
|
|
}; |
|
|
|
|
class CV_EXPORTS StereoConstantSpaceBP |
|
|
|
|
{ |
|
|
|
|
public: |
|
|
|
|
enum { DEFAULT_NDISP = 128 }; |
|
|
|
|
enum { DEFAULT_ITERS = 8 }; |
|
|
|
|
enum { DEFAULT_LEVELS = 4 }; |
|
|
|
|
enum { DEFAULT_NR_PLANE = 4 }; |
|
|
|
|
static void estimateRecommendedParams(int width, int height, int &ndisp, int &iters, int &levels, int &nr_plane); |
|
|
|
|
explicit StereoConstantSpaceBP(int ndisp = DEFAULT_NDISP, |
|
|
|
|
int iters = DEFAULT_ITERS, |
|
|
|
|
int levels = DEFAULT_LEVELS, |
|
|
|
|
int nr_plane = DEFAULT_NR_PLANE, |
|
|
|
|
int msg_type = CV_32F); |
|
|
|
|
StereoConstantSpaceBP(int ndisp, int iters, int levels, int nr_plane, |
|
|
|
|
float max_data_term, float data_weight, float max_disc_term, float disc_single_jump, |
|
|
|
|
int min_disp_th = 0, |
|
|
|
|
int msg_type = CV_32F); |
|
|
|
|
void operator()(const oclMat &left, const oclMat &right, oclMat &disparity); |
|
|
|
|
int ndisp; |
|
|
|
|
int iters; |
|
|
|
|
int levels; |
|
|
|
|
int nr_plane; |
|
|
|
|
float max_data_term; |
|
|
|
|
float data_weight; |
|
|
|
|
float max_disc_term; |
|
|
|
|
float disc_single_jump; |
|
|
|
|
int min_disp_th; |
|
|
|
|
int msg_type; |
|
|
|
|
bool use_local_init_data_cost; |
|
|
|
|
private: |
|
|
|
|
oclMat u[2], d[2], l[2], r[2]; |
|
|
|
|
oclMat disp_selected_pyr[2]; |
|
|
|
|
oclMat data_cost; |
|
|
|
|
oclMat data_cost_selected; |
|
|
|
|
oclMat temp; |
|
|
|
|
oclMat out; |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
#if defined _MSC_VER && _MSC_VER >= 1200 |
|
|
|
|