I want to multiply a matrix with a number !
I am using opencv in android studio.
i want:
Mat A;
Mat B;
int num= 255;
B = A*255;
But it is not working.
I am using opencv in android studio.
i want:
Mat A;
Mat B;
int num= 255;
B = A*255;
But it is not working.
there are no builtin 'operators' for this in java, you'll have to use Core.multiply , like:
Mat A = ...;
Mat B = new Mat();
Scalar s = new Scalar(13);
Core.multiply(A, s, B);
note, since B will get saturated on overflow, you probably need to convert A to a larger type, like CV_32F
Asked: 2016-02-24 01:20:50 -0600
Seen: 3,889 times
Last updated: Feb 24 '16
build problems for android_binary_package - Eclipse Indigo, Ubuntu 12.04
Installing Sample App / OpenCV Manager
OpenCV-2.4.2-android-sdk missing build.xml?
OpenCV libs on Real Android Device
Unresolved inclusions in OpenCV android tutorial 4.
build openCV for android, without CUDA
OpenCV Tutorial 1 - Add OpenCV on API 8
Is OpenCV_2.4.2_binary_pack_armv7a source code open
How to get good matches from the ORB feature detection algorithm?
How to decrease the number of processed frames from a live video camera?