Bug Fix for Issue 6288

Added 2 inline functions in persistence.hpp
So that the '>>' operator works correctly for std::Vector<KeyPoint> and
std::Vector<DMatch>
This commit is contained in:
ohnozzy 2016-04-09 19:01:34 +08:00
parent 06ea0aa02b
commit 9dd962ca1a

View File

@ -1130,6 +1130,23 @@ void operator >> (const FileNode& n, std::vector<_Tp>& vec)
it >> vec;
}
/** @brief Reads KeyPoint from a file storage.
*/
//It needs special handling because it contains two types of fields, int & float.
static inline
void operator >> (const FileNode& n, std::vector<KeyPoint>& vec)
{
read(n, vec);
}
/** @brief Reads DMatch from a file storage.
*/
//It needs special handling because it contains two types of fields, int & float.
static inline
void operator >> (const FileNode& n, std::vector<DMatch>& vec)
{
read(n, vec);
}
//! @} FileNode
//! @relates cv::FileNodeIterator