Commit 214cbabc authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

update stitching sample

parent a138e5a6
...@@ -355,7 +355,7 @@ int main(int argc, char* argv[]) ...@@ -355,7 +355,7 @@ int main(int argc, char* argv[])
Ptr<FeaturesFinder> finder; Ptr<FeaturesFinder> finder;
if (features_type == "surf") if (features_type == "surf")
{ {
#if defined(HAVE_OPENCV_NONFREE) && defined(HAVE_OPENCV_GPU) && !defined(ANDROID) #if defined(HAVE_OPENCV_NONFREE) && defined(HAVE_OPENCV_GPU)
if (try_gpu && gpu::getCudaEnabledDeviceCount() > 0) if (try_gpu && gpu::getCudaEnabledDeviceCount() > 0)
finder = new SurfFeaturesFinderGpu(); finder = new SurfFeaturesFinderGpu();
else else
...@@ -543,7 +543,7 @@ int main(int argc, char* argv[]) ...@@ -543,7 +543,7 @@ int main(int argc, char* argv[])
// Warp images and their masks // Warp images and their masks
Ptr<WarperCreator> warper_creator; Ptr<WarperCreator> warper_creator;
#if defined(HAVE_OPENCV_GPU) && !defined(ANDROID) #if defined(HAVE_OPENCV_GPU)
if (try_gpu && gpu::getCudaEnabledDeviceCount() > 0) if (try_gpu && gpu::getCudaEnabledDeviceCount() > 0)
{ {
if (warp_type == "plane") warper_creator = new cv::PlaneWarperGpu(); if (warp_type == "plane") warper_creator = new cv::PlaneWarperGpu();
...@@ -608,7 +608,7 @@ int main(int argc, char* argv[]) ...@@ -608,7 +608,7 @@ int main(int argc, char* argv[])
seam_finder = new detail::VoronoiSeamFinder(); seam_finder = new detail::VoronoiSeamFinder();
else if (seam_find_type == "gc_color") else if (seam_find_type == "gc_color")
{ {
#if defined(HAVE_OPENCV_GPU) && !defined(ANDROID) #if defined(HAVE_OPENCV_GPU)
if (try_gpu && gpu::getCudaEnabledDeviceCount() > 0) if (try_gpu && gpu::getCudaEnabledDeviceCount() > 0)
seam_finder = new detail::GraphCutSeamFinderGpu(GraphCutSeamFinderBase::COST_COLOR); seam_finder = new detail::GraphCutSeamFinderGpu(GraphCutSeamFinderBase::COST_COLOR);
else else
...@@ -617,7 +617,7 @@ int main(int argc, char* argv[]) ...@@ -617,7 +617,7 @@ int main(int argc, char* argv[])
} }
else if (seam_find_type == "gc_colorgrad") else if (seam_find_type == "gc_colorgrad")
{ {
#if defined(HAVE_OPENCV_GPU) && !defined(ANDROID) #if defined(HAVE_OPENCV_GPU)
if (try_gpu && gpu::getCudaEnabledDeviceCount() > 0) if (try_gpu && gpu::getCudaEnabledDeviceCount() > 0)
seam_finder = new detail::GraphCutSeamFinderGpu(GraphCutSeamFinderBase::COST_COLOR_GRAD); seam_finder = new detail::GraphCutSeamFinderGpu(GraphCutSeamFinderBase::COST_COLOR_GRAD);
else else
......
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