Ask Your Question

Albert123's profile - activity

2013-06-09 10:42:08 -0600 received badge  Editor (source)
2013-06-09 09:16:10 -0600 asked a question Java: how to set SURF parameters

Hello,

basically, i have the same problem as described here:

http://answers.opencv.org/question/3167/java-how-to-set-parameters-to-orb-featuredetector/

i also have to write my own yml file, it looks like this:

YAML:1.0 scaleFactor: 1.1 nLevels: 3 firstLevel: 0 edgeThreshold: 1000 patchSize: 31

my code looks like this:

FeatureDetector fd = FeatureDetector.create(FeatureDetector.SURF);
DescriptorExtractor de=DescriptorExtractor.create(DescriptorExtractor.SURF);
MatOfKeyPoint k = new MatOfKeyPoint();
Mat d=new Mat();

de.read("para.yml");

fd.detect(m2, k); de.compute(m2, k,d);

I dont notice anny differences when i read the file or not. Also i dont get what the guy (Andriy) did to make it work.

I hope someone of you has an Idea, thanks.

2013-05-27 15:17:57 -0600 commented answer Problem converting Mat values to float

Thanks :).

2013-05-27 14:49:12 -0600 asked a question Problem converting Mat values to float

Hello,

after i used the SURF-Extractor i got a Mat with all the feature-vectors (one per row). I want to convert thoose vectors (rows of the Mat) into separate float-Attays.

I do this with the following code:

float vec[64];
for(int i=0;i<64;i++)
vec[i]= mat.at<float>(n,i);//the n`th row is written in vec

it works fine so far, but when i look at the original values in mat, using cout << "M = "<< endl << " " << mat << endl << endl; i see floats such as "3.5637853e-005" wich is good.

when i now look at the content of vec, the floats are "shorter", for example "3.5637853e-005" becomes "3.56379e-005".

How can i copy the values form mat to vec without them loosing accuracy?

Thank you.