【问题标题】:BagOfFeatures for Image Category Classification in Matlab在 Matlab 中用于图像类别分类的 BagOfFeatures
【发布时间】:2016-11-20 19:05:47
【问题描述】:

在 Matlab 中做这个例子Image Category Classification 我在尝试使用此命令获取 SURF 功能词汇时发现错误

bag = bagOfFeatures(trainingSet);

错误如下

Error using bagOfFeatures/parseInputs (line 1023)
The value of 'imgSets' is invalid. Expected imgSets to be one of these types:

imageSet

Instead its type was matlab.io.datastore.ImageDatastore.

我正在使用 ImageDatastore 输入而不是 imgSets,但我正在关注 Mathworks 示例。任何人都可以解释为什么会发生这种情况以及如何将 trainingSet 转换为 imgSets 类型?

【问题讨论】:

  • 嗨,我遇到了同样的问题。你找到解决办法了吗?

标签: image matlab


【解决方案1】:

您必须将 ImageDatastore 对象转换为 imageSet 对象。这可以通过使用以下行来简单地完成:

bagOfFeatures(imageSet(trainingSet.Files)); 

【讨论】:

  • 这是工具箱开发人员部署的新数据结构的问题。 BoF 的概念并没有改变任何东西。
猜你喜欢
  • 2013-05-20
  • 2014-04-07
  • 1970-01-01
  • 2018-09-30
  • 2020-04-07
  • 2016-12-22
  • 2012-10-29
  • 2020-06-05
  • 2017-09-27
相关资源
最近更新 更多