Ask Your Question
2

Multiply Mat and Scalar not working...help me

asked 2014-03-25 10:36:40 -0600

RossWell gravatar image

I coding by android studio using opencv.

I tried mutiply scalar with Mat but not working.

Mat A = new Mat();
Mat B = new Mat();
Mat C = new Mat();
Mat D = new Mat();
Scalar alpha = new Scalar(5);

I take this:

image description

and i multiply C with "alpha":

Core.multiply(C,alpha,D);

i wana D become :

image description

but D become :

image description

please help me..

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-12-11 20:10:55 -0600

lehoangphuc86 gravatar image

You can just simply use

Mat D=5*C;

I have tested in opencv with c++ in Ubuntu. Hope this help.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-03-25 10:36:40 -0600

Seen: 594 times

Last updated: Mar 25 '14