fail to load keypoints from .yml file
Hi,
I want to find keypoints in different images and save them on my hard disk. The saving part works very well. To save the keypoints I use the following:
Mat it;
it = imread( "pic1.jpg", IMREAD_GRAYSCALE);
vector<KeyPoint> keypoints;
detector.detect( (it), keypoints );
FileStorage fs("keypoint1.yml", FileStorage::WRITE);
write( fs , "keypoint", keypoints );
fs.release();
When I try to read the file I fail with this :
vector<KeyPoint> keypoint1s;
FileStorage fs2("keypoint1.yml", FileStorage::READ);
FileNode kptFileNode = fs2["keypoint1"];
read( kptFileNode, keypoint1s );
fs2.release();
If I do it like that, "keypoint1s" remains empty. Would be great if somebody knows how to fix this!
Thanks!