not able to create a simple Mat object for android

asked 2016-04-06 04:11:21 -0600

lea gravatar image

i did this: Mat m = new Mat(); and tha app stops running

edit retag flag offensive close merge delete

Comments

  • log output, please.
  • from where are you calling this ?
berak gravatar imageberak ( 2016-04-06 04:28:17 -0600 )edit

the log output: Session 'app': Error I call it from : onCreate() thank you

lea gravatar imagelea ( 2016-04-06 06:05:37 -0600 )edit

" I call it from : onCreate()" -- that's already wrong. you need to wait, until the native c++ so's were loaded properly. before you can call any opencv code.

see tutorial code

berak gravatar imageberak ( 2016-04-06 06:23:24 -0600 )edit

thank you!

can you tell me where I can put it?

lea gravatar imagelea ( 2016-04-06 06:29:27 -0600 )edit

here or here , or, if you 're using async loading, here

berak gravatar imageberak ( 2016-04-06 06:33:47 -0600 )edit

thank you so mutch!

so where do i have to put it if i dont have a camera in the app, i just want to show an image from drawable?

lea gravatar imagelea ( 2016-04-06 06:45:06 -0600 )edit