Skip to content

Commit fdb3d4f

Browse files
committed
Merge pull request opencv#9379 from berak:imgproc_hanning
2 parents 1d4a29f + e7b9cfa commit fdb3d4f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

modules/imgproc/include/opencv2/imgproc.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2726,7 +2726,7 @@ An example is shown below:
27262726
createHanningWindow(hann, Size(100, 100), CV_32F);
27272727
@endcode
27282728
@param dst Destination array to place Hann coefficients in
2729-
@param winSize The window size specifications
2729+
@param winSize The window size specifications (both width and height must be > 1)
27302730
@param type Created array type
27312731
*/
27322732
CV_EXPORTS_W void createHanningWindow(OutputArray dst, Size winSize, int type);

modules/imgproc/src/phasecorr.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ void cv::createHanningWindow(OutputArray _dst, cv::Size winSize, int type)
579579
CV_INSTRUMENT_REGION()
580580

581581
CV_Assert( type == CV_32FC1 || type == CV_64FC1 );
582+
CV_Assert( winSize.width > 1 && winSize.height > 1 );
582583

583584
_dst.create(winSize, type);
584585
Mat dst = _dst.getMat();

0 commit comments

Comments
 (0)