How to set ORB feature detector parameters in opencv-android

732 views Asked by At

Normally, in opencv with c++ , there is no problems w.r.t set parameters,

but in android-opencv I can't achieve info about this.

Anybody could help me about this problem?

1

There are 1 answers

0
techguy18985 On

You can load an external file which contains the parameters. For example create a .yml file with the parameters first.

%YAML:1.0
scaleFactor: 1.1
nLevels: 5
firstLevel: 0
edgeThreshold: 31
patchSize: 31

Then as soon as you create an instance of the ORB Feature detector, you will be able to read the parameters of the .yml file like this:

FeatureDetector detector = FeatureDetector.create(FeatureDetector.ORB);
detector.read("your_path_to_yml_file");