Ask Your Question
1

Save ORB features to database

asked 2014-02-07 18:41:38 -0600

gussurya_w gravatar image

I am new on opencv. I look the code of using ORB features in this link http://answers.opencv.org/question/6260/orb-features/ Code:

bmp=BitmapFactory.decodeResource(getResources(),R.drawable.t1);
Utils.bitmapToMat(bmp, mat);
FeatureDetector detector = FeatureDetector.create(FeatureDetector.ORB);
detector.detect(mat, keypoints);
DescriptorExtractor extractor = DescriptorExtractor.create(DescriptorExtractor.ORB);
extractor.compute(mat, keypoints, features);

and i use this code to show the value of features:

Log.i(TAG, "FEATURE = "+ features.get(0,0)[0]);

I want to save the features value to database. How many features value that must i save?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-03-01 14:53:40 -0600

Rui Marques gravatar image

You can check the answers for this post:

http://answers.opencv.org/question/8873/best-way-to-store-a-mat-object-in-android/

I recommend the answer I gave there, with some small changes it can be applied to other OpenCV data structures besides Mat.

If you really do not want to convert your data to json you can check there how to convert to a byte array. After you have a byte array you can store it in a file or whatever.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-02-07 18:41:38 -0600

Seen: 2,633 times

Last updated: Mar 01 '14