Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Java: how to set up parameters for AKAZE features in OpenCv 3.0

I want to set parameters for AKAZE features in OpenCV 3.0 based on this post http://answers.opencv.org/question/3167/java-how-to-set-parameters-to-orb-featuredetector/ I have successfully set parameters to ORB but it did not work for AKAZE. I am seting parameters based on documentation. Here is my code:


File outputDir = getCacheDir(); 
File outputFile = File.createTempFile("AKAZEDetectorParams", ".YAML", outputDir);
writeToFile(outputFile, "%YAML:1.0\ndescriptor_type: 1\ndescriptor_size: 0\ndescriptor_channels: 3\nthreshold: 0.001\nnOctaves: 4\nsublevels: 4\ndiffusivity: 1\n"); 
fd.read(outputFile.getPath()); 
fd.detect(originalImage, keyPointsEnvMap); //Crushes here

It crush on fd.detect() with the Error: OpenCV Error: Assertion failed (evolution_.size() > 0) in int cv::AKAZEFeatures::Create_Nonlinear_Scale_Space(const cv::Mat&), file /builds/master_pack-android/opencv/modules/features2d/src/kaze/AKAZEFeatures.cpp, line 102

When I comment out reading of the parameters it works fine. Pleas help me!

Java: how to set up parameters for AKAZE features in OpenCv 3.0

I want to set parameters for AKAZE features in OpenCV 3.0 based on this post http://answers.opencv.org/question/3167/java-how-to-set-parameters-to-orb-featuredetector/ I have successfully set parameters to ORB but it did not work for AKAZE. I am seting setting parameters based on documentation. Here is my code:


File outputDir = getCacheDir(); 
File outputFile = File.createTempFile("AKAZEDetectorParams", ".YAML", outputDir);
writeToFile(outputFile, "%YAML:1.0\ndescriptor_type: 1\ndescriptor_size: 0\ndescriptor_channels: 3\nthreshold: 0.001\nnOctaves: 4\nsublevels: 4\ndiffusivity: 1\n"); 
fd.read(outputFile.getPath()); 
fd.detect(originalImage, keyPointsEnvMap); //Crushes here

It crush on fd.detect() with the Error: OpenCV Error: Assertion failed (evolution_.size() > 0) in int cv::AKAZEFeatures::Create_Nonlinear_Scale_Space(const cv::Mat&), file /builds/master_pack-android/opencv/modules/features2d/src/kaze/AKAZEFeatures.cpp, line 102

When I comment out reading of the parameters it works fine. Pleas help me!

Java: how to set up parameters for AKAZE features in OpenCv 3.0

I want to set parameters for AKAZE features in OpenCV 3.0 based on this post http://answers.opencv.org/question/3167/java-how-to-set-parameters-to-orb-featuredetector/ I have successfully set parameters to ORB but it did not work for AKAZE. I am setting parameters based on documentation. Here is my code:

 fd = FeatureDetector.create(FeatureDetector.AKAZE);
File outputDir = getCacheDir(); 
File outputFile = File.createTempFile("AKAZEDetectorParams", ".YAML", outputDir);
writeToFile(outputFile, "%YAML:1.0\ndescriptor_type: 1\ndescriptor_size: 0\ndescriptor_channels: 3\nthreshold: 0.001\nnOctaves: 4\nsublevels: 4\ndiffusivity: 1\n"); 
fd.read(outputFile.getPath()); 
fd.detect(originalImage, keyPointsEnvMap); //Crushes here

It crush on fd.detect() with the Error: OpenCV Error: Assertion failed (evolution_.size() > 0) in int cv::AKAZEFeatures::Create_Nonlinear_Scale_Space(const cv::Mat&), file /builds/master_pack-android/opencv/modules/features2d/src/kaze/AKAZEFeatures.cpp, line 102

When I comment out reading of the parameters it works fine. Pleas help me!

Java: how to set up parameters for AKAZE features in OpenCv 3.0

I want to set parameters for AKAZE features in OpenCV 3.0 based on this post http://answers.opencv.org/question/3167/java-how-to-set-parameters-to-orb-featuredetector/ I have successfully set parameters to ORB but it did not work for AKAZE. I am setting parameters based on documentation. Here is my code:


fd = FeatureDetector.create(FeatureDetector.AKAZE);
File outputDir = getCacheDir(); 
File outputFile = File.createTempFile("AKAZEDetectorParams", ".YAML", outputDir);
writeToFile(outputFile, "%YAML:1.0\ndescriptor_type: 1\ndescriptor_size: 0\ndescriptor_channels: 3\nthreshold: 0.001\nnOctaves: 4\nsublevels: 4\ndiffusivity: 1\n"); 
fd.read(outputFile.getPath()); 
fd.detect(originalImage, keyPointsEnvMap); //Crushes here
//Crush

It crush on fd.detect() with the Error: OpenCV Error: Assertion failed (evolution_.size() > 0) in int cv::AKAZEFeatures::Create_Nonlinear_Scale_Space(const cv::Mat&), file /builds/master_pack-android/opencv/modules/features2d/src/kaze/AKAZEFeatures.cpp, line 102

When I comment out reading of the parameters it works fine. Pleas help me!