Re: templateMatching mattoBitmap opencv for android

348 views
Skip to first unread message

Andrey Pavlenko

unread,
Dec 17, 2012, 6:45:55 AM12/17/12
to android...@googlegroups.com
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.
Reply all
Reply to author
Forward
0 new messages