Commit 906a590a authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

minor fix

parent 60246b9e
...@@ -185,9 +185,9 @@ static void stereo_csbp_gpu_operator(int& ndisp, int& iters, int& levels, int& n ...@@ -185,9 +185,9 @@ static void stereo_csbp_gpu_operator(int& ndisp, int& iters, int& levels, int& n
step_pyr[0] = data_cost.step / type_size; step_pyr[0] = data_cost.step / type_size;
Size temp_size = data_cost_size; Size temp_size = data_cost_size;
if (data_cost.step * data_cost_size.height < static_cast<size_t>(step_pyr[levels - 1]) * rows_pyr[levels - 1] * ndisp) if (data_cost_size.width * data_cost_size.height < static_cast<size_t>(step_pyr[levels - 1]) * rows_pyr[levels - 1] * ndisp)
{ {
temp_size = Size(step_pyr[levels - 1], rows_pyr[levels - 1] * nr_plane); temp_size = Size(step_pyr[levels - 1], rows_pyr[levels - 1] * ndisp);
} }
temp1.create(temp_size, msg_type); temp1.create(temp_size, msg_type);
......
...@@ -269,7 +269,7 @@ namespace cv { namespace gpu { namespace csbp ...@@ -269,7 +269,7 @@ namespace cv { namespace gpu { namespace csbp
const int threadsNum = 256; const int threadsNum = 256;
const size_t smem_size = threadsNum * sizeof(float); const size_t smem_size = threadsNum * sizeof(float);
dim3 threads(winsz, 1, threadsNum/winsz); dim3 threads(winsz, 1, threadsNum / winsz);
dim3 grid(w, h, 1); dim3 grid(w, h, 1);
grid.y *= divUp(ndisp, threads.z); grid.y *= divUp(ndisp, threads.z);
......
...@@ -22,6 +22,7 @@ include_directories ( ...@@ -22,6 +22,7 @@ include_directories (
"${CMAKE_SOURCE_DIR}/modules/legacy/include" "${CMAKE_SOURCE_DIR}/modules/legacy/include"
"${CMAKE_SOURCE_DIR}/modules/contrib/include" "${CMAKE_SOURCE_DIR}/modules/contrib/include"
"${CMAKE_SOURCE_DIR}/modules/gpu/include" "${CMAKE_SOURCE_DIR}/modules/gpu/include"
"${CMAKE_SOURCE_DIR}/modules/ml/include"
"${CMAKE_CURRENT_SOURCE_DIR}/src" "${CMAKE_CURRENT_SOURCE_DIR}/src"
"${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}"
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment