1 | initial version |
The problem is that the matchTemplate()
result is a float point single channel Mat (CV_32FC1) that cannot be directly converted to Android Bitmap.
To convert such a Mat to Bitmap you need to call normalize(mResult, mResult8U, 0, 255, NORM_MINMAX, CV_8U);
Then you can convert mResult8U
to Bitmap
.