Skip to content

Commit

Permalink
SGBM: fixed uninitialized memory in cost buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
mshabunin committed Dec 15, 2016
1 parent ecf360c commit 00304fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/calib3d/src/stereosgbm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ static void computeDisparitySGBM( const Mat& img1, const Mat& img2,
PixType* tempBuf = (PixType*)(disp2ptr + width);

// add P2 to every C(x,y). it saves a few operations in the inner loops
for( k = 0; k < width1*D; k++ )
for(k = 0; k < (int)CSBufSize; k++ )
Cbuf[k] = (CostType)P2;

for( int pass = 1; pass <= npasses; pass++ )
Expand Down

0 comments on commit 00304fe

Please sign in to comment.