I am writing an application in C++ using OpenCV library. I am trying to do simple operations with matrices and on some data types operations output errors.
For example:
reduce(img, img, 0, CV_REDUCE_SUM, CV_8U); //does not work if img contains CV_8U
reduce(img, img, 0, CV_REDUCE_SUM, CV_64F); //does work if img contains CV_8U
And if try simple per element division:
Mat A = B / C; //generates data type assertion error if B and C are CV_32F
But does work if B and C are CV_64F.
I would really appreciate your help. Don't want to use CV_64F as it slows down my program significantly.