The following works in OpenCV 2.4.9:
cv::Mat TestMat(3,3,CV_32F);
int RefCount = *TestMat.refcount;
How do I accomplish the same thing in OpenCV 3.0.0b?
int RefCount = TestMat.u ? (*TestMat.u->refcount) : 0;
The reference counter is hiddent in UMatData u
field. See https://github.com/jet47/opencv/blob/master/modules/core/include/opencv2/core/mat.hpp#L455 for UMatData
declaration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With