Ask Your Question

translate example into Java

asked 2017-05-18 12:03:13 -0500

fommilie gravatar image

updated 2017-05-18 12:04:13 -0500

I'm trying to translate this demo into Java

but I'm stuck on the lines using overloading of -= on Mat. My understanding of C++ is very limited, but I expected to see an operator-=()here but there isn't one. What is the Java equivalent of -= on a Mat?

Note that the Java docs for 3.2.0 are not available, so consult 3.1.0 instead

edit retag flag offensive close merge delete


oh, right the 3.2 javadocs ..

mind appending your issue here ? ;)

berak gravatar imageberak ( 2017-05-18 12:32:24 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-05-18 12:20:51 -0500

berak gravatar image

well, java does not have overloaded operators like -=, but probably subtract does the trick as in:

//sigma1_2 -= mu1_2;  
Core.subtract(sigma1_2, mut1_2, sigma1_2);
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-05-18 12:03:13 -0500

Seen: 30 times

Last updated: May 18