Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 600

Is there a way to prevent rounding in opencv matrix divison

$
0
0
I have an integer matrix and I want to perform an integer division on it. But opencv always rounds the result. I know I can divide each element manually but I want to know is there a better way for this or not? Mat c = (Mat_ (1,3) << 80,71,64 ); cout << c/8 << endl; // result //[10, 9, 8] // desired result //[10, 8, 8]

Viewing all articles
Browse latest Browse all 600

Trending Articles