Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I'm trying to train an SVM through the image descriptors using ORB

that won't work. you have to reconsider your approach.

ORB descriptors are uchar, and the SVM needs float data. also, different images will retrieve diffeent numbers of keypoints/descriptors, while you need fixed sized features for machine learning of any kind.

MatOfFloat descriptors = new MatOfFloat();

that's wrong.

I'm using Android 7.1.1, OpenCV 3.4.1, Android Studio 3.0.2

irrelevant. the problem is the wrong idea.

I'm trying to train an SVM through the image descriptors using ORB

that won't work. you have to reconsider your approach.

ORB descriptors are uchar, and the SVM needs float data. also, different images will retrieve diffeent numbers of keypoints/descriptors, while you need fixed sized features for machine learning of any kind.

(also: 1 label and 1 train sample(row) per image)

MatOfFloat descriptors = new MatOfFloat();

that's wrong.

I'm using Android 7.1.1, OpenCV 3.4.1, Android Studio 3.0.2

irrelevant. the problem is the wrong idea.

I'm trying to train an SVM through the image descriptors using ORB

that won't work. you have to reconsider your approach.

ORB (or any binary) descriptors are useless here, those are uchar, bitstrings, not numbers at all, and the SVM needs float data. data, and operate a dot product on it.

also, different images will retrieve diffeent numbers of keypoints/descriptors, while you need fixed sized features for machine learning of any kind.

(also: 1 label and 1 train sample(row) per image)

MatOfFloat descriptors = new MatOfFloat();

that's wrong.

I'm using Android 7.1.1, OpenCV 3.4.1, Android Studio 3.0.2

irrelevant. the problem is the wrong idea.

I'm trying to train an SVM through the image descriptors using ORB

that won't work. you have to reconsider your approach.

ORB (or any binary) descriptors are useless here, those are uchar, bitstrings, not numbers at all, and the SVM needs float data, and operate a dot product on it.

also, different images will retrieve diffeent numbers of keypoints/descriptors, while you need fixed sized features for machine learning of any kind.

(also: 1 label and 1 train sample(row) per image)

MatOfFloat descriptors = new MatOfFloat();

that's wrong.

I'm using Android 7.1.1, OpenCV 3.4.1, Android Studio 3.0.2

irrelevant. the problem is the wrong idea.


usually, float features, like SIFT / SURF / AKAZE(UPRIGHT) are used here, and the problem with the varying featuresize and choosing the best features from your measurement can be overtaken by BagOfWords, VLAD or similar embeddings. look it up.

I'm trying to train an SVM through the image descriptors using ORB

that won't work. you have to reconsider your approach.

ORB (or any binary) descriptors are useless here, those are uchar, bitstrings, not numbers at all, and the SVM needs float data, and operate a dot product on it.

also, different images will retrieve diffeent numbers of keypoints/descriptors, while you need fixed sized features for machine learning of any kind.

(also: 1 kind. (1 label and 1 train sample(row) per image)

MatOfFloat descriptors = new MatOfFloat();

that's wrong.wrong, as long as you're using binary descriptors.

I'm using Android 7.1.1, OpenCV 3.4.1, Android Studio 3.0.2

irrelevant. the problem is the wrong idea.


usually, float features, like SIFT / SURF / AKAZE(UPRIGHT) are used here, and the problem with the varying featuresize and choosing the best features from your measurement can be overtaken by BagOfWords, VLAD or similar embeddings. look it up.