Skip to content

Commit 80c227d

Browse files
committed
fix Variable Length Array for MSVS.
1 parent bb415db commit 80c227d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/photometric_calib/src/GammaRemover.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,14 @@ Mat GammaRemover::getUnGammaImageMat(Mat inputIm)
5757
{
5858
CV_Assert(validGamma);
5959
uchar *inputImArr = inputIm.data;
60-
float outImArr[w*h];
60+
float *outImArr = new float[w*h];
6161
for (int i = 0; i < w * h; ++i)
6262
{
6363
outImArr[i] = GInv[inputImArr[i]];
6464
}
6565
Mat _outIm(h, w, CV_32F, outImArr);
6666
Mat outIm = _outIm * (1/255.0f);
67+
delete[] outImArr;
6768
return outIm;
6869
}
6970

0 commit comments

Comments
 (0)