我的词袋项目我要分享

my project for bag of words

matlab 项目

关注次数: 288

下载次数: 0

文件大小: 14.00 MB

代码分类: 其他

开发平台: matlab

下载需要积分: 2积分

版权声明:如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

代码描述

中文说明:系统概况及实施细则特征提取。您可以使用以下两种方法之一:地区按你的一滴从探测器1的分配产生。另外,这里是一个Matlab代码的例子多尺度BLOB探测器,类似于你有什么样的分配1来实现。当设置探测器的参数,确保你每幅图像得到至少几百地区。特征描述。使用此代码为计算圆形区域,如从分配1的说明,其中斑点检测器返回的那些的128维的SIFT描述符,这个代码不是旋转不变,也就是说,它并不试图通过旋转他们正常化补丁使水平方向对准贴剂的主导梯度方向。然而,旋转不变性不是分配确有必要。字典计算。运行的k-means对所有培训功能,学习词典中心的一个子集簇。对于K-意味着您可以使用下面的基于Matlab / C代码。你需要通过在Matlab命令窗口中运行“MEX vgg_kmiter.cxx”编译代码。字典大小设置为约500。特征的量化和直方图计算。用于在训练或测试图像中的每个特征,找到最近码矢在字典中的索引。你可能想使用平方欧氏距离的这种codefor快速计算(一个图像,即,所有描述符和所述码本)两组矢量之间。在量化之后,表示每个图像的视觉词索引的直方图(查看MATLAB的“历史”功能)。因为不同的图像可以具有不同数量的特征,所述直方图应当归总结为一个。分类培训。实施的最近邻(NN)分类器,这将每个测试图像进行分类的四个类之一。使用该卡方距离,在课堂上讨论。您可以使用下面的函数来计算χ2距离。基线:作为基线,将每个图像的灰度,并将其二次抽样到25×25个像素,从而产生625维描述符。您可以使用Matlab的功能“imresize”图像子采样。使用标准的L2距离使用此与近邻分类的简单描述和比较性能袋功能-的代表性。


English Description:

System Outline and Implementation DetailsFeature extraction. You can use one of the two following methods:Regions produced by your blob detector from Assignment 1.Alternatively, here is a Matlab code of an example multi-scale blob detector, similar to what you had to implement in Assignment 1.When setting the parameters of the detector, make sure you get at least few hundred regions per image.Feature description. Use this code for computing 128-dimensional SIFT descriptors of circular regions, such as the ones returned by the blob detector from Assignment 1. Note that this code is not rotation-invariant, i.e., it does not attempt to normalize the patches by rotating them so that the horizontal direction is aligned with the dominant gradient orientation of the patch. However, rotation invariance is not really necessary for the assignment.Dictionary computation. Run k-means clustering on a subset of all training features to learn the dictionary centers


代码预览