opencv 4.5.0 cvDiv/cvMat equivalent ?
LE:
System information (version)
OpenCV => 4.5.0
Operating System / Platform => MacOS
Compiler => Android Studio with ndkBuild
Detailed description
I am developing and android app, I am using openCV android sdk along with some cpp files that process some images, building with ndkBuild all of the files. Now I updated from OpenCV-3.1-android-sdk to OpenCV-4.5.0-android-sdk
I am using these includes:
#include <opencv2/core/core.hpp>
#include <opencv2/core/core_c.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
In my cpp file was using it like this (So basically I had this code working in openCV 3.1.0):
Mat mat1 = new Mat(..);
Mat mat2 = new Mat(..);
CvMat src = mat1;
CvMat mask = mat2;
cvDiv(&src, &mask, &mask, 256);
In openCV 4.5.0 I get this error:
error: no viable conversion from 'cv::Mat' to 'CvMat '
If I use this instead
Mat mat1 = new Mat(..);
Mat mat2 = new Mat(..);
Mat src = mat1;
Mat mask = mat2;
cvDiv(&src, &mask, &mask, 256);
I get this error at runtime:
cv::error(): OpenCV(4.5.0) Error: Bad argument (Unknown array type) in cvarrToMat, file /build/master_pack-android/opencv/modules/core/src/matrix_c.cpp, line 185
I am actually asking: How can I convert this code to run with OpenCV 4.5.0. - I could use divide instead of cvDiv (as @sturkmen stated) - but what arguments do I feed to that function ? I cannot feed Mat, I cannot use CvMat.. PS: evidently I am clueless in C since I am just an android dev
see https://docs.opencv.org/2.4/modules/c...
Can you check my revised question please ?