Skip to content

different feature vector from the same image #96

@xueliang

Description

@xueliang

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions