From 63e1c0449d6e04ab50e712c6ee598ee6e28e2c53 Mon Sep 17 00:00:00 2001 From: Bellaktris Date: Sun, 17 Aug 2014 20:25:45 +0700 Subject: [PATCH] warning fix --- modules/ximgproc/src/structured_edge_detection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ximgproc/src/structured_edge_detection.cpp b/modules/ximgproc/src/structured_edge_detection.cpp index f8812d48d..3d7a28b3e 100644 --- a/modules/ximgproc/src/structured_edge_detection.cpp +++ b/modules/ximgproc/src/structured_edge_detection.cpp @@ -188,7 +188,8 @@ static void gradientHist(const cv::Mat &src, cv::Mat &magnitude, cv::Mat &histog magnitude.create( src.size(), cv::DataType::type ); phase.create( src.size(), cv::DataType::type ); - histogram.create( cv::Size(src.size().width/float(pSize), src.size().height/float(pSize)) , + histogram.create( cv::Size( cvRound(src.size().width/float(pSize)), + cvRound(src.size().height/float(pSize)) ), CV_MAKETYPE(cv::DataType::type, nBins) ); histogram.setTo(0);