From 97be19404fc6dbca20c37e552f2f12946509975c Mon Sep 17 00:00:00 2001 From: Yuriy Obukh Date: Sat, 14 Nov 2020 19:54:48 +0300 Subject: [PATCH 1/2] fix win, vs2019 build. missing header Signed-off-by: Yuriy Obukh --- modules/cvv/src/util/observer_ptr.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/cvv/src/util/observer_ptr.hpp b/modules/cvv/src/util/observer_ptr.hpp index fef3feae066..68d1a80f445 100644 --- a/modules/cvv/src/util/observer_ptr.hpp +++ b/modules/cvv/src/util/observer_ptr.hpp @@ -11,6 +11,7 @@ #include //size_t #include // [u]intXX_t #include // since some people like to forget that one +#include namespace cvv { From 1d84f2820243564bb376f22c6a1ff8640027a0fa Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Nov 2020 10:58:58 +0100 Subject: [PATCH 2/2] phase_unwrapping: add asserts, documentation for input types --- .../include/opencv2/phase_unwrapping/phase_unwrapping.hpp | 4 ++-- modules/phase_unwrapping/src/histogramphaseunwrapping.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/phase_unwrapping/include/opencv2/phase_unwrapping/phase_unwrapping.hpp b/modules/phase_unwrapping/include/opencv2/phase_unwrapping/phase_unwrapping.hpp index 5b5cb5100ba..1091ff38029 100644 --- a/modules/phase_unwrapping/include/opencv2/phase_unwrapping/phase_unwrapping.hpp +++ b/modules/phase_unwrapping/include/opencv2/phase_unwrapping/phase_unwrapping.hpp @@ -58,9 +58,9 @@ class CV_EXPORTS_W PhaseUnwrapping : public virtual Algorithm /** * @brief Unwraps a 2D phase map. - * @param wrappedPhaseMap The wrapped phase map that needs to be unwrapped. + * @param wrappedPhaseMap The wrapped phase map of type CV_32FC1 that needs to be unwrapped. * @param unwrappedPhaseMap The unwrapped phase map. - * @param shadowMask Optional parameter used when some pixels do not hold any phase information in the wrapped phase map. + * @param shadowMask Optional CV_8UC1 mask image used when some pixels do not hold any phase information in the wrapped phase map. */ CV_WRAP virtual void unwrapPhaseMap( InputArray wrappedPhaseMap, OutputArray unwrappedPhaseMap, diff --git a/modules/phase_unwrapping/src/histogramphaseunwrapping.cpp b/modules/phase_unwrapping/src/histogramphaseunwrapping.cpp index 591deaf8dd8..c2b3030ac26 100644 --- a/modules/phase_unwrapping/src/histogramphaseunwrapping.cpp +++ b/modules/phase_unwrapping/src/histogramphaseunwrapping.cpp @@ -402,6 +402,9 @@ void HistogramPhaseUnwrapping_Impl::unwrapPhaseMap( InputArray wrappedPhaseMap, temp.copyTo(mask); } + CV_CheckTypeEQ(wPhaseMap.type(), CV_32FC1, ""); + CV_CheckTypeEQ(mask.type(), CV_8UC1, ""); + computePixelsReliability(wPhaseMap, mask); computeEdgesReliabilityAndCreateHistogram();