how to multiply Mat with number (opencv in android ) [closed]
I'm working in Mat of opencv in android studio.
i wanna:
Mat A;
Mat B;
int alpha = 5;
B = A*5;
not working.
plz help me take it.
i code with android studio not c++.
no use loop. in the docs doesn't talk about this
compliler error : in Mat cannot be applied to "int"
(sorry, had it wrong before)
http://docs.opencv.org/java/org/opencv/core/Core.html#multiply(org.opencv.core.Mat,%20org.opencv.core.Scalar,%20org.opencv.core.Mat)
so that's:
Mat A;
Mat B = new Mat(); // result
Scalar alpha = new Scalar(5); // the factor
Core.multiply(A,alpha,B);
here Mat with Mat. but i wana Mat with number.
plz
im try... thanks [break]