Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

opencv 4.5.0 cvDiv/cvMat equivalent ?

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 that I updated from OpenCV-3.1-android-sdk to OpenCV-4.5.0-android-sdk I cannot find a function called cvDiv and a class called cvMat. Can you tell me the equivalent ?

I am using these includes:

#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>

In my cpp file was using it like this:

CvMat src = srcImg;
CvMat mask = CannyImg;
cvDiv(&src, &mask, &mask, 256);

My partial solution: #include <opencv2/core/core_c.h> -> for cvDiv

But what about cvMat. If I just changed it to Mat cvDiv will complain that it cannot handle that class

opencv 4.5.0 cvDiv/cvMat equivalent ?

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 that I updated from OpenCV-3.1-android-sdk to OpenCV-4.5.0-android-sdk I cannot find a function called cvDiv and a class called cvMat. Can you tell me the equivalent ?

I am using these includes:

#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>

In my cpp file was using it like this:

Mat srcImg = mGray;
Mat CannyImg = *mCanny;
CvMat src = srcImg;
CvMat mask = CannyImg;
cvDiv(&src, &mask, &mask, 256);

My partial solution: #include <opencv2/core/core_c.h> -> for cvDiv

But what about cvMat. CvMat. If I just changed it to Mat cvDiv will complain that it cannot handle that class

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 that I updated from OpenCV-3.1-android-sdk to OpenCV-4.5.0-android-sdk I cannot find a function called cvDiv and a class called cvMat. Can you tell me the equivalent ?OpenCV-4.5.0-android-sdk

I am using these includes:

#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>

In my cpp file was using it like this:this (So basically I had this code working in openCV 3.1.0):

Mat srcImg = mGray;
mat1 = new Mat(..);
Mat CannyImg = *mCanny;
mat2 = new Mat(..);
CvMat * src = srcImg;
mat1;
CvMat * mask = CannyImg;
mat2;
cvDiv(&src, &mask, &mask, 256);

My partial solution: #include <opencv2/core/core_c.h> -> for cvDiv

But In openCV 4.5.0 I get this error:

error: no viable conversion from 'cv::Mat' to 'CvMat *'

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 about CvMat. If I just changed it to Mat cvDiv will complain arguments do I feed to that it function ? I cannot handle that classfeed Mat, I cannot use CvMat..

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 *'

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..

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 *'

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..CvMat.. PS: evidently I am clueless in C since I am just an android dev

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

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

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

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