{"action":"created","issue":{"url":"https://api.github.com/repos/Itseez/opencv/issues/5667","labels_url":"https://api.github.com/repos/Itseez/opencv/issues/5667/labels{/name}","comments_url":"https://api.github.com/repos/Itseez/opencv/issues/5667/comments","events_url":"https://api.github.com/repos/Itseez/opencv/issues/5667/events","html_url":"https://github.com/Itseez/opencv/issues/5667","id":116851359,"number":5667,"title":"OpenCV3 python calls to FlannBasedMatcher::knnMatch fail with error","user":{"login":"Algomorph","id":1050606,"avatar_url":"https://avatars.githubusercontent.com/u/1050606?v=3","gravatar_id":"","url":"https://api.github.com/users/Algomorph","html_url":"https://github.com/Algomorph","followers_url":"https://api.github.com/users/Algomorph/followers","following_url":"https://api.github.com/users/Algomorph/following{/other_user}","gists_url":"https://api.github.com/users/Algomorph/gists{/gist_id}","starred_url":"https://api.github.com/users/Algomorph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Algomorph/subscriptions","organizations_url":"https://api.github.com/users/Algomorph/orgs","repos_url":"https://api.github.com/users/Algomorph/repos","events_url":"https://api.github.com/users/Algomorph/events{/privacy}","received_events_url":"https://api.github.com/users/Algomorph/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Itseez/opencv/labels/affected:%20master","name":"affected: master","color":"ededed"},{"url":"https://api.github.com/repos/Itseez/opencv/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/Itseez/opencv/labels/category:%20flann","name":"category: flann","color":"ededed"},{"url":"https://api.github.com/repos/Itseez/opencv/labels/category:%20python%20bindings","name":"category: python bindings","color":"ededed"},{"url":"https://api.github.com/repos/Itseez/opencv/labels/category:%20t-api","name":"category: t-api","color":"ededed"},{"url":"https://api.github.com/repos/Itseez/opencv/labels/priority:%20normal","name":"priority: normal","color":"A38700"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-11-13T21:02:39Z","updated_at":"2016-01-22T16:40:43Z","closed_at":null,"body":"The following code returns an error.\r\n```python\r\n    sift = x2d.SIFT_create(1000)\r\n    features_l, des_l = sift.detectAndCompute(im_l, None)\r\n    features_r, des_r = sift.detectAndCompute(im_r, None)\r\n    \r\n    FLANN_INDEX_KDTREE = 1\r\n    index_params = dict(algorithm=FLANN_INDEX_KDTREE, trees=5)\r\n    search_params = dict(checks=50)\r\n    flann = cv2.FlannBasedMatcher(index_params,search_params)\r\n```\r\nThe error returned:\r\n```\r\nopencv/modules/python/src2/cv2.cpp:161: error: (-215) The data should normally be NULL! in function allocate\r\n```\r\nI tried this with Python 2.7.\r\nFLANN_INDEX_KDTREE is set to 1 unlike [here](http://docs.opencv.org/3.0-beta/doc/py_tutorials/py_feature2d/py_matcher/py_matcher.html#matcher),\r\nsince in modules/flann/include/opencv2/flann/defines.h I found it set to 1 on line 84.\r\n"},"comment":{"url":"https://api.github.com/repos/Itseez/opencv/issues/comments/173972193","html_url":"https://github.com/Itseez/opencv/issues/5667#issuecomment-173972193","issue_url":"https://api.github.com/repos/Itseez/opencv/issues/5667","id":173972193,"user":{"login":"Algomorph","id":1050606,"avatar_url":"https://avatars.githubusercontent.com/u/1050606?v=3","gravatar_id":"","url":"https://api.github.com/users/Algomorph","html_url":"https://github.com/Algomorph","followers_url":"https://api.github.com/users/Algomorph/followers","following_url":"https://api.github.com/users/Algomorph/following{/other_user}","gists_url":"https://api.github.com/users/Algomorph/gists{/gist_id}","starred_url":"https://api.github.com/users/Algomorph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Algomorph/subscriptions","organizations_url":"https://api.github.com/users/Algomorph/orgs","repos_url":"https://api.github.com/users/Algomorph/repos","events_url":"https://api.github.com/users/Algomorph/events{/privacy}","received_events_url":"https://api.github.com/users/Algomorph/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T16:40:43Z","updated_at":"2016-01-22T16:40:43Z","body":"@Dikay900 , I reported it back in 3.0, so I don't think 3.0 (or 3.0 beta) will work."}}