le seguenti opere in OpenCV 2.4.9:cv :: Mat.refcount Missing in OpenCV 3.0
cv::Mat TestMat(3,3,CV_32F);
int RefCount = *TestMat.refcount;
Come posso ottenere la stessa cosa in OpenCV 3.0.0b?
le seguenti opere in OpenCV 2.4.9:cv :: Mat.refcount Missing in OpenCV 3.0
cv::Mat TestMat(3,3,CV_32F);
int RefCount = *TestMat.refcount;
Come posso ottenere la stessa cosa in OpenCV 3.0.0b?
Il contatore di riferimento è hiddent nel campo UMatData u
. Vedere https://github.com/jet47/opencv/blob/master/modules/core/include/opencv2/core/mat.hpp#L455 per la dichiarazione UMatData
.
Eccellente, questo è quello che stavo cercando. Nuovo codice funzionante: 'int RefCount = Testmat.u-> refcount'. Il membro 'TestMat.u' è di tipo 'UMatData *'. Grazie!! – Greg
Quali sono i tuoi problemi con questo codice? –
Questo codice non viene compilato perché 'cv :: Mat' non ha più una variabile membro' refcount' in OpenCV3.0.0b. – Greg