简体   繁体   English

错误-215 trainDescCollection [iIdx] Python OpenCV

[英]Error -215 trainDescCollection[iIdx] Python OpenCV

I'm matching two images and in the 80% of the cases works but in some cases it crashes and show up this message: 我匹配两个图像,在80%的情况下工作,但在某些情况下,它崩溃并显示此消息:

... matches = matcher.match(d1, d2) error: ......\\opencv-2.4.6\\modules\\features2d\\src\\matchers.cpp:365: error: (-215) trainDescCollection[iIdx].rows < IMGIDX_ONE ... matches = matcher.match(d1,d2)错误:...... \\ opencv-2.4.6 \\ modules \\ features2d \\ src \\ matchers.cpp:365:错误:(-215)trainDescCollection [iIdx] .rows <IMGIDX_ONE

where d1 and d2 are the descriptors of the two images. 其中d1d2是两个图像的描述符。 I searh in Google but didn't found an answer. 我在谷歌搜索但没有找到答案。 Maybe its a stupid error but I'm a noob in this field. 也许这是一个愚蠢的错误,但我在这个领域是一个菜鸟。

Furthermore I read in this website the following declaration :'it works perfectly just with SIFT and SURF descriptors(which are non free)'. 此外,我在本网站上阅读了以下声明:'它仅适用于SIFT和SURF描述符(非自由)'。 Do you know if SIFT and SURF are protected by copyright? 你知道SIFT和SURF是否受版权保护吗?

Thanks all! 谢谢大家!

This is an open bug in opencv. 这是opencv中的一个漏洞。 https://github.com/Itseez/opencv/issues/5700 https://github.com/Itseez/opencv/issues/5700

Try using smaller images (for example, take a subset and/or down-sample). 尝试使用较小的图像(例如,采用子集和/或下采样)。 It looks as though the implementation involves a tricky (in the pejorative sense) optimisation which assumed that the number of features (in one of the images) is less than some magic power-of-two. 看起来该实现涉及一种棘手的(在贬义意义上)优化,该优化假设特征的数量(在一个图像中)小于一些魔力2。

You have right! 你有权利! I got a tip of the problem (I think). 我得到了问题的一小部分(我想)。 I take the two images where I get the problem and I run the same code in an another Computer. 我把两个图像放在我遇到问题的地方,然后在另一台计算机上运行相同的代码。 Well, in the other one I didn't get the error. 好吧,在另一个我没有得到错误。 In the one that crash I have these packages: 在崩溃的那个我有这些包:

gdal 1.10.1
numpy 1.7.1
opencv-python 2.4.6
scipy 0.12.0

In the one that Works I have: 在我所拥有的那个:

...
gdal 1.9.2
numpy 1.6.2
opencv-python 2.4.3
scipy 0.11.0
...
scikit-image 0.7.2
scikit-learn 0.13.1
scipy 0.11.0
scipy-stack 12.11.29
simplecv 1.3
...

And other more. 还有其他。 Much more :D. 更多:D。 Seems that I miss something but I don't know why it crash with the updated versions. 似乎我错过了一些东西,但我不知道它为什么会崩溃更新版本。 Now I'm installing scipy-stack and scipy and scikit-image...Maybe the error is a missing of packages 现在我正在安装scipy-stack和scipy以及scikit-image ......也许错误是缺少包

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM