merged fix of write/read keypoints from branch

pull/13383/head
Maria Dimashova 15 years ago
parent b5c92a7dc0
commit b8753db512
  1. 3
      modules/features2d/src/keypoint.cpp

@ -59,6 +59,7 @@ void write(FileStorage& fs, const string& objname, const vector<KeyPoint>& keypo
write(fs, kpt.angle); write(fs, kpt.angle);
write(fs, kpt.response); write(fs, kpt.response);
write(fs, kpt.octave); write(fs, kpt.octave);
write(fs, kpt.class_id);
} }
} }
@ -70,7 +71,7 @@ void read(const FileNode& node, vector<KeyPoint>& keypoints)
for( ; it != it_end; ) for( ; it != it_end; )
{ {
KeyPoint kpt; KeyPoint kpt;
it >> kpt.pt.x >> kpt.pt.y >> kpt.size >> kpt.angle >> kpt.response >> kpt.octave; it >> kpt.pt.x >> kpt.pt.y >> kpt.size >> kpt.angle >> kpt.response >> kpt.octave >> kpt.class_id;
keypoints.push_back(kpt); keypoints.push_back(kpt);
} }
} }

Loading…
Cancel
Save