Skip to content

Commit 24a8823

Browse files
committed
Merge pull request #2752 from berak:phase_unwrapping_input_type
2 parents 088dc14 + 1d84f28 commit 24a8823

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

modules/phase_unwrapping/include/opencv2/phase_unwrapping/phase_unwrapping.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ class CV_EXPORTS_W PhaseUnwrapping : public virtual Algorithm
5858
/**
5959
* @brief Unwraps a 2D phase map.
6060
61-
* @param wrappedPhaseMap The wrapped phase map that needs to be unwrapped.
61+
* @param wrappedPhaseMap The wrapped phase map of type CV_32FC1 that needs to be unwrapped.
6262
* @param unwrappedPhaseMap The unwrapped phase map.
63-
* @param shadowMask Optional parameter used when some pixels do not hold any phase information in the wrapped phase map.
63+
* @param shadowMask Optional CV_8UC1 mask image used when some pixels do not hold any phase information in the wrapped phase map.
6464
*/
6565
CV_WRAP
6666
virtual void unwrapPhaseMap( InputArray wrappedPhaseMap, OutputArray unwrappedPhaseMap,

modules/phase_unwrapping/src/histogramphaseunwrapping.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,9 @@ void HistogramPhaseUnwrapping_Impl::unwrapPhaseMap( InputArray wrappedPhaseMap,
402402
temp.copyTo(mask);
403403
}
404404

405+
CV_CheckTypeEQ(wPhaseMap.type(), CV_32FC1, "");
406+
CV_CheckTypeEQ(mask.type(), CV_8UC1, "");
407+
405408
computePixelsReliability(wPhaseMap, mask);
406409
computeEdgesReliabilityAndCreateHistogram();
407410

0 commit comments

Comments
 (0)