Commit 5ed65979 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

fixed bug in gpu::HOGDescriptor::getBuffer (ticket #1379)

parent f45a886a
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment