• Owen Healy's avatar
    Fix bug of uninitialized matrix in findTransformECC · ff48387a
    Owen Healy authored
    The matrix templateZM needs to be initialized because otherwise
    uninitialized values leak into the correlation in:
    
        const double correlation = templateZM.dot(imageWarped)
    
    In the worst case this will lead the correlation to be NaN ruining the
    whole routine. The subtraction does not initialize templateZM due to the
    mask.
    
    Unfortunately, the uninitialized values (by altering the correlation)
    have the side effect of dragging out the computation a little longer
    giving a slightly better error bound. This means that fixing this bug
    breaks perf_ecc where
    
        SANITY_CHECK(warpMat, 1e-3);
    
    is just a little too tight and happens to work due to the uninitialized
    values. Since this is a performance not a accuracy test I think it is OK
    to just relax the error bound a little bit (the tight error bound being
    after all the result of a bug).
    ff48387a
Name
Last commit
Last update
..
androidcamera Loading commit data...
calib3d Loading commit data...
core Loading commit data...
cudaarithm Loading commit data...
cudabgsegm Loading commit data...
cudacodec Loading commit data...
cudafeatures2d Loading commit data...
cudafilters Loading commit data...
cudaimgproc Loading commit data...
cudalegacy Loading commit data...
cudaobjdetect Loading commit data...
cudaoptflow Loading commit data...
cudastereo Loading commit data...
cudawarping Loading commit data...
cudev Loading commit data...
features2d Loading commit data...
flann Loading commit data...
highgui Loading commit data...
imgcodecs Loading commit data...
imgproc Loading commit data...
java Loading commit data...
ml Loading commit data...
objdetect Loading commit data...
photo Loading commit data...
python Loading commit data...
shape Loading commit data...
stitching Loading commit data...
superres Loading commit data...
ts Loading commit data...
video Loading commit data...
videoio Loading commit data...
videostab Loading commit data...
viz Loading commit data...
world Loading commit data...
CMakeLists.txt Loading commit data...