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

pull/13383/head
Vadim Pisarevsky 14 years ago
parent 0243fe6b07
commit 56cf08a873
  1. 3
      modules/core/include/opencv2/core/core.hpp
  2. 2
      modules/core/include/opencv2/core/operations.hpp

@ -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) };
};

@ -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;
}

Loading…
Cancel
Save