Android Studio NDK OpenCV: c++ code can't work with Mat -


this question has answer here:

i included opencv native code in app in android studio. , wrote test function:

jniexport jint jnicall java_com_atapy_wisetrend3_mainactivity_search(jnienv *env, jclass type, cv::mat image,cv::mat croppedimage)  {     croppedimage = image;     return 1; } 

but when call function search, execution of calling function in java stops without errors. in logcat have message:

"fatal signal 11 (sigsegv) @ 0x11c00041 (code=1), thread 16754 (tapy.wisetrend3)".

if erase line "croppedimage = image" function succeeds , returns 1. happens operations mat.

what mean?

i'm not sure trying do. cv::mat wrapper of actual mat.data. usually, 1 doesn't want direct assignment image=croppedimage, specially when passed argument.

if want copy image data, croppedimage.copyto(image) way go.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -