1 | initial version |
Edit2: Found the problem, and found the solution: I had a processing function that accepted a reference to the umat. it performed resizing. Instead of putting the result into a new instance of UMat i made it overwrite using the umat from the referencepointer:
cv::resize(imagereference, imagereference, cv::Size, factor, factor)
It failed the refcount assertion here. (Since it happens at deallocation, internally it tries to deallocate it or something and then assertion is thrown).
I changed it to this:
cv::UMat output;
cv::resize(imagereference, output, cv::Size, factor, factor)
And returned output. (Since smartpointers are used it does not copy the whole image data to a new instance. This i didn't know previously.