Ask Your Question

sh's profile - activity

2015-06-07 01:12:34 -0600 received badge  Student (source)
2015-06-07 01:04:00 -0600 answered a question convertTo performance in Android native code

The issue solved. I wrote the conversion in c++ code - loop on floatImg.data an convert each pixel to uchar.

ucharImg.data[i] = (uchar)((float)floatImg.data)[i];

2015-06-04 06:13:58 -0600 asked a question convertTo performance in Android native code

I working on developing app for android os. I write the code in c++ and use jni.

I have to convert mat from Mat3f to Mat3b in the native c++ code.

I use convertTo :

floatImg.convertTo(ucharImg, CV_8UC3);

ucharImg type is cv::Mat3b, floatImg type is cv::Mat3f.

the issue is the performance of this code in android:

on android this convertTo code takes ~2300 milliseconds! (on window all my function takes ~150 milliseconds)

Is there is a solution to this performance issue?