Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 4615

is there any builtin Modulo function on Matices ?

$
0
0
I've a Mat object containing these orientation values (0 to 360), i want by using modulo operation to represent them between (0 to 180) range Mat a, b; ... b = mod(a,180); // x - floor(x/y) * y didn't find it, i tried this instead void Modulo(Mat &angle, int val){ for(int i = 0; i < angle.rows; i++){ for(int j = 0; j < angle.cols; j++){ // x - floor(x/y) * y float result = angle.at(i,j) - cvFloor(angle.at(i,j)/val) * val; angle.at(i,j) = result; } } }

Viewing all articles
Browse latest Browse all 4615


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>