Commit ec3492a2 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #12374 from alalek:issue_12368

parents 07808c8d 701760db
......@@ -1492,7 +1492,9 @@ static void computeDisparitySGBM_HH4( const Mat& img1, const Mat& img2,
if( buffer.empty() || !buffer.isContinuous() ||
buffer.cols*buffer.rows*buffer.elemSize() < totalBufSize )
buffer.create(1, (int)totalBufSize, CV_8U);
{
buffer.reserveBuffer(totalBufSize);
}
// summary cost over different (nDirs) directions
CostType* Cbuf = (CostType*)alignPtr(buffer.ptr(), ALIGN);
......
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