保存提取的特征opencv
我已经在 OpenCV 中提取了 SIFT 特征描述符。下一步是训练 SVM,但在此步骤之前,我认为我需要将提取的特征保存在文件中,以便训练这些特征...
所以我的问题是:1-如何保存这些矩阵? 2-我想知道如何处理这些特征,我提取了一张图像的特征,但我需要为一个对象(例如可乐)的不同姿势的许多图像提取特征并将它们保存在一个文件中
......你有什么想法,如何在 opencv 中做到这一点?
谢谢...
I have extracted the SIFT feature descriptors in OpenCV.. Next step to me is to train an SVM but before that step, I think I need to save the extracted features in a file, in order to train these features...
So my questions are: 1- how to save these matrices?
2- I would like to know what to do about the features, I extracted features for one image, but I need to extract features for many images in different pose for one object (e.g cola) and save them in one file...
Do you have any idea, how to do that in opencv?
Thank you...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想将 OpenCV Mat 保存到文件中,请查看 FileStorage 类。出于您的目的,它可能看起来像:
如果您想将这些功能存储在数据库中以便以后搜索,您可以考虑查看bagofwords_classification.cpp OpenCV 提供的示例。这可能具有您正在寻找的所有功能。
If you would like to save an OpenCV Mat to file have a look at the FileStorage class they provide. For your purposes it might look something like:
If you want to store these features in a database for later searching you might consider having a look at the bagofwords_classification.cpp sample provided by OpenCV. This may have all the functionality you are looking for.