Commit b8753db5 authored by Maria Dimashova's avatar Maria Dimashova

merged fix of write/read keypoints from branch

parent b5c92a7d
...@@ -59,6 +59,7 @@ void write(FileStorage& fs, const string& objname, const vector<KeyPoint>& keypo ...@@ -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) ...@@ -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);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment