Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Has anyone been successful running opencv template match in android?

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.

click to hide/show revision 2
No.2 Revision

updated 2016-04-05 02:47:55 -0600

berak gravatar image

Has anyone been successful running opencv template match in android?cannot load image on android

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.

click to hide/show revision 3
retagged

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

berak gravatar image

cannot load image on android

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.

click to hide/show revision 4
retagged

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

berak gravatar image

cannot load image on android

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.