IplImage Type in OpenCV-2.4.10-android-sdk

asked 2015-05-22 04:10:17 -0500

anb0483 gravatar image

It is not clear for my why the data typ

'IplImage'

is not workin with Android!The type is mentioned in documentation 2.4.10. Also the 2.1 Mat - The Basics Image Container says:

Luckily C++ came around and introduced the concept of classes making easier for the user through automatic memory management (more or less). The good news is that C++ is fully compatible with C so no compatibility issues can arise from making the change. Therefore, OpenCV 2.0 introduced a new C++ interface which offered a new way of doing things which means you do not need to fiddle with memory management, making your code concise (less to write, to achieve more).

edit retag flag offensive close merge delete

Comments

1

opencv's android jni wrappers use cv::Mat under the hood, then the address of this is returned to java as a long. if you try the same with IplImage*, you'll produce nasty errors, due to both types being binary incompatible. though there are conversion operations on the c++ side, they do not apply, when sending things as a long to java and back.

again you must not use IplImages at all. (especially not on android)

(if you got lead into this way of thinking by looking at javacv code - ditch that, too.)

berak gravatar imageberak ( 2015-05-22 04:28:52 -0500 )edit

summarized it is not possible to use IplImage under Android or?, without the use of javacv?

anb0483 gravatar imageanb0483 ( 2015-05-22 07:41:31 -0500 )edit