crash in TemplateMatchCandidates::findCandidates
stiv-yakovenko opened this issue · comments
Stepan Yakovenko commented
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 returns half size of patch (because targetPatchLocation=(0,0) so it had to cut patch in half).
Stepan Yakovenko commented
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.