made "filestorage << vector<Mat>" work properly.

This commit is contained in:
Vadim Pisarevsky 2011-05-13 15:24:21 +00:00
parent 0243fe6b07
commit 56cf08a873
2 changed files with 2 additions and 3 deletions

View File

@ -978,8 +978,7 @@ public:
typedef value_type channel_type;
typedef value_type vec_type;
enum { generic_type = 1, depth = DataDepth<channel_type>::value, channels = 1,
fmt=DataDepth<channel_type>::fmt,
enum { generic_type = 1, depth = -1, channels = 1, fmt=0,
type = CV_MAKETYPE(depth, channels) };
};

View File

@ -2638,7 +2638,7 @@ template<typename _Tp> static inline void write( FileStorage& fs, const vector<_
template<typename _Tp> static inline FileStorage&
operator << ( FileStorage& fs, const vector<_Tp>& vec )
{
VecWriterProxy<_Tp, DataType<_Tp>::fmt != 0> w(&fs);
VecWriterProxy<_Tp, DataType<_Tp>::generic_type == 0> w(&fs);
w(vec);
return fs;
}