inpaint icon indicating copy to clipboard operation
inpaint copied to clipboard

crash in TemplateMatchCandidates::findCandidates

Open stiv-yakovenko opened this issue 6 years ago • 1 comments

I observe crash on this assert:

    CV_Assert(
        templ.type() == CV_MAKETYPE(CV_8U, _integrals.size()) &&
        templ.size() == _templateSize && 
        (templMask.empty() || templMask.size() == _templateSize));

the problem is that templ.size() == _templateSize is FALSE. This is because _templateSize=[19,19] and templ is just [9,9]. Templ is [9,9] since centeredPatch<PATCHFLAGS> returns half size of patch (because targetPatchLocation=(0,0) so it had to cut patch in half).

stiv-yakovenko avatar Jun 13 '19 23:06 stiv-yakovenko

This happens if inpaint area is rectangle of 19x19 pixel larger then patchsize=17, and is located near left corner of the picture. Doesn't happen each time, but from time to time.

stiv-yakovenko avatar Jun 13 '19 23:06 stiv-yakovenko