VWDictionary removePoint(): added comments about having latest flann version to have a fix avoiding a Segmentation fault on dictionary update (only for flann incremental dictionary)

This commit is contained in:
matlabbe
2015-09-11 18:42:20 -04:00
parent cc5065eff0
commit 567c6a8a51

View File

@@ -249,6 +249,12 @@ public:
UERROR("Flann index not yet created!");
return;
}
// If a Segmentation fault occurs in removePoint(), verify that you have this fix in your installed "flann/algorithms/nn_index.h":
// 707 - if (ids_[id]==id) {
// 707 + if (id < ids_.size() && ids_[id]==id) {
// ref: https://github.com/mariusmuja/flann/commit/23051820b2314f07cf40ba633a4067782a982ff3#diff-33762b7383f957c2df17301639af5151
if(featuresType_ == CV_8UC1)
{
((flann::Index<flann::Hamming<unsigned char> >*)index_)->removePoint(index);