From 230cc3e0c310d2263f983bf79665b6b74a1a1791 Mon Sep 17 00:00:00 2001 From: Alexey Spizhevoy Date: Mon, 26 Sep 2011 10:04:50 +0000 Subject: [PATCH] Minor fix in stitching_detailed --- samples/cpp/stitching_detailed.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/cpp/stitching_detailed.cpp b/samples/cpp/stitching_detailed.cpp index e253d37466..71e51d6372 100644 --- a/samples/cpp/stitching_detailed.cpp +++ b/samples/cpp/stitching_detailed.cpp @@ -555,7 +555,7 @@ int main(int argc, char* argv[]) else if (seam_find_type == "gc_color") { #ifndef ANDROID - if (try_gpu) + if (try_gpu && gpu::getCudaEnabledDeviceCount() > 0) seam_finder = new detail::GraphCutSeamFinderGpu(GraphCutSeamFinderBase::COST_COLOR); else #endif @@ -564,7 +564,7 @@ int main(int argc, char* argv[]) else if (seam_find_type == "gc_colorgrad") { #ifndef ANDROID - if (try_gpu) + if (try_gpu && gpu::getCudaEnabledDeviceCount() > 0) seam_finder = new detail::GraphCutSeamFinderGpu(GraphCutSeamFinderBase::COST_COLOR_GRAD); else #endif