could android activity get IplImage* object from jni c++ func

asked 2014-04-17 19:59:18 -0600

reply2010 gravatar image

updated 2014-04-17 22:41:43 -0600

hi,expert i know native opencv c++ code could not include cvNamedwindow func and similar func in android platform.and i want to check my image result from native c++ computation in android to do?i guess there are some way to get IplImage object from jni function like JNIEXPORT void JNICALL Java_XXX_XXX_XXX_LibXXX_XXXMain(JNIEnv * env, jobject obj) and if i could get the object in java activity,i could show it in activity window.


i read \OpenCV-2.4.8-android-sdk\samples\native-activity,it maybe a sample which show capture video in native maybe my desired sample. unfortunatly i could not compile because eclipse could find don't know why.I can find the package dir in path written in ,but eclipse could not find.i could not understand the sample native-activity.anyone understand native-activity?could anybody tell me how to show lplImage in native window?hope for example code line?

any clue?any light?any way?I would appreciate all.thanks

edit retag flag offensive close merge delete


Okay, first of all, god invented the return button on a keyboard. Please use it to bring some structure in your questions. As to your remarks, it is weird you are using native C++ code, but trying to retrieve an iplimage, which is the old C api. Do stick to the C++ interface and use the Mat object for storing images and drop all functions which are preceded by cv and replace them with their C++ counterpart!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-04-18 02:44:46 -0600 )edit