I'm trying to upgrade python code that was programed for OpenCV 2.4 to be used with OpenCV 3.3. I found a problem with the flags of the function cv2.calcCovarMatrix, as I show next.
The code is this one:
# Compute 3x3 covariance matrix
covar, mean = cv2.calcCovarMatrix(total_matrix, cv2.cv.CV_COVAR_NORMAL | cv2.cv.CV_COVAR_SCALE | cv2.cv.CV_COVAR_ROWS)
The error that raises is this one:
covar, mean = cv2.calcCovarMatrix(total_matrix, cv2.cv.CV_COVAR_NORMAL | cv2.cv.CV_COVAR_SCALE | cv2.cv.CV_COVAR_ROWS)
AttributeError: 'module' object has no attribute 'cv'
The python version is 2.7
Does anyone know a way of upgrade this particular piece of code? I think the problem is that the flags now have a different name, but I have not been able to find it.