cannot load image on android

asked 2016-04-04 15:33:54 -0600

Humberto gravatar image

updated 2016-04-05 02:48:37 -0600

berak gravatar image

Every time I try to run template match function in android studio, I get Assertion failed error. I have started to debug and my img.cols() and img.rows() is always 0. Some kind of empty matrix is being created. When I run the code as a normal Java application, it works like a charm. However, using android with the same purpose, has not been that great.

Mat img = Imgcodecs.imread(inFile). //img.cols() is 0??

Has anynone faced the same issue?

Any help will be appreciated.

edit retag flag offensive close merge delete

Comments

1

"and my img.cols() and img.rows() is always 0" -- so, the image was not loaded. what is "inFile" ?

(it's not related to template matching at all)

berak gravatar imageberak ( 2016-04-05 01:48:03 -0600 )edit