different feature vector from the same image
xueliang opened this issue · comments
xueliang commented
Hello, I meet a very strange problem. I find that the app obtains a little poor performance than that in PC. When digging into the code, I find that for the same image, the features obtained in training and in recognition is a little different. But I can not figure out why.
In training, the feature is loaded by cv::imread. In recognition, the image is loaded by BitmapFactory.
BitmapFactory.Options options = new BitmapFactory.Options();
options.inPreferredConfig = Bitmap.Config.ARGB_8888;
Bitmap bmp = BitmapFactory.decodeFile(filename,options);
And then covert to cv::Mat by
jniutils::ConvertBitmapToRGBAMat(env, bitmap, rgbaMat, true);
cv::cvtColor(rgbaMat, bgrMat, cv::COLOR_RGBA2BGR);
Is there any difference between these two ways? thanks.