Merge remote-tracking branch 'origin/2.4' into merge-2.4

Conflicts:
	CMakeLists.txt
	cmake/OpenCVGenAndroidMK.cmake
	cmake/templates/OpenCV.mk.in
	doc/tutorials/viz/creating_widgets/creating_widgets.rst
	doc/tutorials/viz/launching_viz/launching_viz.rst
	doc/tutorials/viz/table_of_content_viz/images/image_effects.png
	doc/tutorials/viz/transformations/transformations.rst
	doc/tutorials/viz/widget_pose/widget_pose.rst
	modules/core/include/opencv2/core/affine.hpp
	modules/core/include/opencv2/core/core.hpp
	modules/gpu/perf/perf_imgproc.cpp
	modules/gpu/src/cuda/canny.cu
	modules/gpu/src/cuda/generalized_hough.cu
	modules/gpu/src/generalized_hough.cpp
	modules/gpu/src/imgproc.cpp
	modules/gpu/test/test_color.cpp
	modules/gpu/test/test_core.cpp
	modules/gpu/test/test_gpumat.cpp
	modules/gpu/test/test_hough.cpp
	modules/nonfree/CMakeLists.txt
	modules/nonfree/include/opencv2/nonfree/gpu.hpp
	modules/nonfree/perf/perf_gpu.cpp
	modules/nonfree/src/cuda/surf.cu
	modules/nonfree/src/precomp.hpp
	modules/nonfree/src/surf_gpu.cpp
	modules/nonfree/test/test_gpu.cpp
	modules/ocl/perf/perf_haar.cpp
	modules/stitching/CMakeLists.txt
	modules/stitching/include/opencv2/stitching/detail/matchers.hpp
	modules/stitching/include/opencv2/stitching/detail/seam_finders.hpp
	modules/stitching/include/opencv2/stitching/detail/warpers.hpp
	modules/stitching/include/opencv2/stitching/warpers.hpp
	modules/stitching/src/blenders.cpp
	modules/stitching/src/matchers.cpp
	modules/stitching/src/precomp.hpp
	modules/stitching/src/seam_finders.cpp
	modules/stitching/src/stitcher.cpp
	modules/stitching/src/warpers.cpp
	modules/viz/doc/widget.rst
	modules/viz/include/opencv2/viz/types.hpp
	modules/viz/include/opencv2/viz/viz3d.hpp
	modules/viz/include/opencv2/viz/widget_accessor.hpp
	modules/viz/src/precomp.hpp
	modules/viz/src/shapes.cpp
	modules/viz/src/vizcore.cpp
	modules/viz/src/vtk/vtkCloudMatSink.h
	modules/viz/src/vtk/vtkCloudMatSource.h
	modules/viz/test/test_precomp.hpp
	modules/viz/test/tests_simple.cpp
	samples/android/tutorial-4-cuda/CMakeLists.txt
	samples/android/tutorial-4-cuda/jni/Android.mk
	samples/android/tutorial-4-cuda/src/org/opencv/samples/tutorial4/Tutorial4Activity.java
	samples/cpp/stitching_detailed.cpp
	samples/cpp/tutorial_code/viz/creating_widgets.cpp
	samples/cpp/tutorial_code/viz/launching_viz.cpp
	samples/cpp/tutorial_code/viz/transformations.cpp
	samples/cpp/tutorial_code/viz/widget_pose.cpp
This commit is contained in:
Roman Donchenko
2014-02-10 17:50:03 +04:00
15 changed files with 118 additions and 42 deletions

View File

@@ -58,9 +58,9 @@ namespace canny
void calcMap(PtrStepSzi dx, PtrStepSzi dy, PtrStepSzf mag, PtrStepSzi map, float low_thresh, float high_thresh);
void edgesHysteresisLocal(PtrStepSzi map, ushort2* st1);
void edgesHysteresisLocal(PtrStepSzi map, short2* st1);
void edgesHysteresisGlobal(PtrStepSzi map, ushort2* st1, ushort2* st2);
void edgesHysteresisGlobal(PtrStepSzi map, short2* st1, short2* st2);
void getEdges(PtrStepSzi map, PtrStepSzb dst);
}
@@ -194,6 +194,8 @@ namespace
void CannyImpl::createBuf(Size image_size)
{
CV_Assert(image_size.width < std::numeric_limits<short>::max() && image_size.height < std::numeric_limits<short>::max());
ensureSizeIsEnough(image_size, CV_32SC1, dx_);
ensureSizeIsEnough(image_size, CV_32SC1, dy_);
@@ -209,8 +211,8 @@ namespace
ensureSizeIsEnough(image_size, CV_32FC1, mag_);
ensureSizeIsEnough(image_size, CV_32SC1, map_);
ensureSizeIsEnough(1, image_size.area(), CV_16UC2, st1_);
ensureSizeIsEnough(1, image_size.area(), CV_16UC2, st2_);
ensureSizeIsEnough(1, image_size.area(), CV_16SC2, st1_);
ensureSizeIsEnough(1, image_size.area(), CV_16SC2, st2_);
}
void CannyImpl::CannyCaller(GpuMat& edges)
@@ -218,9 +220,9 @@ namespace
map_.setTo(Scalar::all(0));
canny::calcMap(dx_, dy_, mag_, map_, static_cast<float>(low_thresh_), static_cast<float>(high_thresh_));
canny::edgesHysteresisLocal(map_, st1_.ptr<ushort2>());
canny::edgesHysteresisLocal(map_, st1_.ptr<short2>());
canny::edgesHysteresisGlobal(map_, st1_.ptr<ushort2>(), st2_.ptr<ushort2>());
canny::edgesHysteresisGlobal(map_, st1_.ptr<short2>(), st2_.ptr<short2>());
canny::getEdges(map_, edges);
}