mirror of
https://github.com/opencv/opencv.git
synced 2025-06-20 01:41:14 +08:00
Merge pull request #12374 from alalek:issue_12368
This commit is contained in:
commit
ec3492a22a
@ -1492,7 +1492,9 @@ static void computeDisparitySGBM_HH4( const Mat& img1, const Mat& img2,
|
|||||||
|
|
||||||
if( buffer.empty() || !buffer.isContinuous() ||
|
if( buffer.empty() || !buffer.isContinuous() ||
|
||||||
buffer.cols*buffer.rows*buffer.elemSize() < totalBufSize )
|
buffer.cols*buffer.rows*buffer.elemSize() < totalBufSize )
|
||||||
buffer.create(1, (int)totalBufSize, CV_8U);
|
{
|
||||||
|
buffer.reserveBuffer(totalBufSize);
|
||||||
|
}
|
||||||
|
|
||||||
// summary cost over different (nDirs) directions
|
// summary cost over different (nDirs) directions
|
||||||
CostType* Cbuf = (CostType*)alignPtr(buffer.ptr(), ALIGN);
|
CostType* Cbuf = (CostType*)alignPtr(buffer.ptr(), ALIGN);
|
||||||
|
Loading…
Reference in New Issue
Block a user