Ask Your Question
0

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 http://docs.opencv.org/3.2.0/d5/dc4/t...

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 http://docs.opencv.org/3.2.0/d3/d63/c... 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 http://docs.opencv.org/java/3.1.0/

edit retag flag offensive close merge delete

Comments

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
1

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

Stats

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

Seen: 52 times

Last updated: May 18