minor fix
authorVladislav Vinogradov <no@email>
Thu, 12 Aug 2010 13:47:53 +0000 (13:47 +0000)
committerVladislav Vinogradov <no@email>
Thu, 12 Aug 2010 13:47:53 +0000 (13:47 +0000)
modules/gpu/src/constantspacebp_gpu.cpp
modules/gpu/src/cuda/constantspacebp.cu
tests/gpu/CMakeLists.txt

index b6842b7..09b8e89 100644 (file)
@@ -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;\r
 \r
     Size temp_size = data_cost_size;\r
-    if (data_cost.step * data_cost_size.height < static_cast<size_t>(step_pyr[levels - 1]) * rows_pyr[levels - 1] * ndisp)\r
+    if (data_cost_size.width * data_cost_size.height < static_cast<size_t>(step_pyr[levels - 1]) * rows_pyr[levels - 1] * ndisp)\r
     {\r
-        temp_size = Size(step_pyr[levels - 1], rows_pyr[levels - 1] * nr_plane);\r
+        temp_size = Size(step_pyr[levels - 1], rows_pyr[levels - 1] * ndisp);\r
     }\r
 \r
     temp1.create(temp_size, msg_type);\r
index 3703afc..a94d374 100644 (file)
@@ -269,7 +269,7 @@ namespace cv { namespace gpu { namespace csbp
         const int threadsNum = 256;\r
         const size_t smem_size = threadsNum * sizeof(float);\r
         \r
-        dim3 threads(winsz, 1, threadsNum/winsz);\r
+        dim3 threads(winsz, 1, threadsNum / winsz);\r
         dim3 grid(w, h, 1);        \r
         grid.y *= divUp(ndisp, threads.z);\r
         \r
@@ -278,7 +278,7 @@ namespace cv { namespace gpu { namespace csbp
         case 1: csbp_kernels::data_init<T, winsz, 1><<<grid, threads, smem_size, stream>>>(level, rows, cols, h); break;\r
         case 3: csbp_kernels::data_init<T, winsz, 3><<<grid, threads, smem_size, stream>>>(level, rows, cols, h); break;\r
         default: cv::gpu::error("Unsupported channels count", __FILE__, __LINE__);\r
-        }            \r
+        }\r
     }\r
       \r
     typedef void (*DataInitCaller)(int cols, int rows, int w, int h, int level, int ndisp, int channels, const cudaStream_t& stream);\r
@@ -419,7 +419,7 @@ namespace cv { namespace gpu { namespace csbp
       \r
     typedef void (*ComputeDataCostCaller)(const DevMem2D& disp_selected_pyr, const DevMem2D& data_cost, \r
                            int h, int w, int level, int nr_plane, int channels, const cudaStream_t& stream);\r
-\r
+    \r
     void compute_data_cost(const DevMem2D& disp_selected_pyr, const DevMem2D& data_cost, size_t msg_step1, size_t msg_step2, int msg_type,\r
                            int h, int w, int h2, int level, int nr_plane, int channels, const cudaStream_t& stream)\r
     {\r
index d20c650..f739693 100644 (file)
@@ -22,6 +22,7 @@ include_directories   (
                        "${CMAKE_SOURCE_DIR}/modules/legacy/include"
                        "${CMAKE_SOURCE_DIR}/modules/contrib/include"
                        "${CMAKE_SOURCE_DIR}/modules/gpu/include"
+                       "${CMAKE_SOURCE_DIR}/modules/ml/include"
                        "${CMAKE_CURRENT_SOURCE_DIR}/src"
                        "${CMAKE_CURRENT_BINARY_DIR}"
                        )