Note that there are some explanatory texts on larger screens.

plurals
  1. POOpenCV Flann problems with AutotunedIndexParams
    primarykey
    data
    text
    <p>I have a problem with openCV 2.4.2 flann indexing with AutotunedIndexParams. If i use multiple images to create an index the program exits with the output:</p> <pre><code>trees : 1 terminate called throwing an exception </code></pre> <p>Thats a similar error I get for the equal code in JavaCV where the error is the following:</p> <pre><code>trees : 1 Exception in thread "main" java.lang.RuntimeException: Missing parameter 'algorithm' in the parameters given at com.googlecode.javacv.cpp.opencv_flann$Index.allocate(Native Method) at com.googlecode.javacv.cpp.opencv_flann$Index.&lt;init&gt;(opencv_flann.java:229) </code></pre> <p>In openCVs miniflann.cpp I found multiple lines where <code>p["algorithm"]</code>is being set, may be that hast something to do with the problem?</p> <p>For testing here my C++ Code, I'll post the java code as well if needed ;-)</p> <pre><code>#include &lt;iostream&gt; #include &lt;opencv2/core/core.hpp&gt; #include &lt;opencv2/features2d/features2d.hpp&gt; #include &lt;opencv2/highgui/highgui.hpp&gt; #include &lt;opencv2/nonfree/nonfree.hpp&gt; #include &lt;opencv2/objdetect/objdetect.hpp&gt; #include &lt;opencv2/flann/flann.hpp&gt; using namespace cv; using namespace std; using namespace flann; int main( int argc, char** argv ) { string pathToImages = "/Users/anubis/Desktop/KeypointTest/"; string img_1 = "book_001_canon.jpg"; string img_2 = "book_002_canon.jpg"; string img_3 = "book_003_canon.jpg"; string img_4 = "book_004_canon.jpg"; Mat db_image_1 = imread(pathToImages + img_1, CV_LOAD_IMAGE_COLOR); Mat db_image_2 = imread(pathToImages + img_2, CV_LOAD_IMAGE_COLOR); Mat db_image_3 = imread(pathToImages + img_3, CV_LOAD_IMAGE_COLOR); Mat db_image_4 = imread(pathToImages + img_4, CV_LOAD_IMAGE_COLOR); vector&lt;KeyPoint&gt; db_keypoints_1; vector&lt;KeyPoint&gt; db_keypoints_2; vector&lt;KeyPoint&gt; db_keypoints_3; vector&lt;KeyPoint&gt; db_keypoints_4; Mat db_descriptors_1; Mat db_descriptors_2; Mat db_descriptors_3; Mat db_descriptors_4; Mat db_descriptor; SurfFeatureDetector detector(400, 4, 2, true, true); SurfDescriptorExtractor extractor; detector.detect(db_image_1, db_keypoints_1); detector.detect(db_image_2, db_keypoints_2); detector.detect(db_image_3, db_keypoints_3); detector.detect(db_image_4, db_keypoints_4); extractor.compute(db_image_1, db_keypoints_1, db_descriptors_1); extractor.compute(db_image_2, db_keypoints_2, db_descriptors_2); extractor.compute(db_image_3, db_keypoints_3, db_descriptors_3); extractor.compute(db_image_4, db_keypoints_4, db_descriptors_4); db_descriptor.push_back(db_descriptors_1); db_descriptor.push_back(db_descriptors_2); db_descriptor.push_back(db_descriptors_3); db_descriptor.push_back(db_descriptors_4); IndexParams indexParams = *new AutotunedIndexParams(); Index flannIndex = *new Index(db_descriptor, indexParams); return 0; } </code></pre> <p>The images can be found here: <a href="http://imgur.com/a/l3lfg#Ga99D" rel="nofollow">images</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload