From 5ed65979c119647098235a08ef4a8333225fbd20 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Tue, 20 Sep 2011 06:38:40 +0000 Subject: [PATCH] fixed bug in gpu::HOGDescriptor::getBuffer (ticket #1379) --- modules/gpu/src/hog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gpu/src/hog.cpp b/modules/gpu/src/hog.cpp index 09797f7dfd..bd4f86d24b 100644 --- a/modules/gpu/src/hog.cpp +++ b/modules/gpu/src/hog.cpp @@ -175,7 +175,7 @@ cv::gpu::GpuMat cv::gpu::HOGDescriptor::getBuffer(const Size& sz, int type, GpuM if (buf.empty() || buf.type() != type) buf.create(sz, type); else - if (buf.cols < sz.width || buf.rows < sz.width) + if (buf.cols < sz.width || buf.rows < sz.height) buf.create(std::max(buf.rows, sz.height), std::max(buf.cols, sz.width), type); return buf(Rect(Point(0,0), sz));