Fix some build errors.

pull/744/head
peng xiao 12 years ago
parent ecea583afd
commit 7758322fd3
  1. 37
      modules/ocl/include/opencv2/ocl/ocl.hpp
  2. 6
      modules/ocl/src/stereobp.cpp

@ -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

@ -85,7 +85,7 @@ namespace cv
} con_struct_t;
cl_mem cl_con_struct = NULL;
static void load_constants(Context *clCxt, int ndisp, float max_data_term, float data_weight,
static void load_constants(int ndisp, float max_data_term, float data_weight,
float max_disc_term, float disc_single_jump)
{
con_struct_t *con_struct = new con_struct_t;
@ -95,7 +95,7 @@ namespace cv
con_struct -> cmax_disc_term = max_disc_term;
con_struct -> cdisc_single_jump = disc_single_jump;
cl_con_struct = load_constant(clCxt->impl->clContext, clCxt->impl->clCmdQueue, (void *)con_struct,
cl_con_struct = load_constant(*((cl_context*)getoclContext()), *((cl_command_queue*)getoclCommandQueue()), (void *)con_struct,
sizeof(con_struct_t));
delete con_struct;
@ -418,7 +418,7 @@ namespace
}
}
cv::ocl::stereoBP::load_constants(u.clCxt, rthis.ndisp, rthis.max_data_term, scale * rthis.data_weight,
cv::ocl::stereoBP::load_constants(rthis.ndisp, rthis.max_data_term, scale * rthis.data_weight,
scale * rthis.max_disc_term, scale * rthis.disc_single_jump);
datas.resize(rthis.levels);

Loading…
Cancel
Save