我试图使用C和OpenCV将脑肿瘤的MRI图像分类为良性和恶性.我计划在使用kmeans聚类SIFT描述符后使用词袋(BoW)方法.意思是,我将每个图像表示为直方图,其中包含x轴的整个“代码簿”/字典及其在y轴图像中的出现次数.这些直方图将成为我的SVM(带RBF内核)分类器的输入.
然而,使用BoW的缺点是它忽略了图像中描述符的空间信息.有人建议使用SPM代替.我读到了它并遇到了this link,给出了以下步骤:
Compute K visual words from the training set and map all local features to its visual word.
For each image, initialize K multi-resolution coordinate histograms to zero. Each coordinate histogram consist of L levels and each level
i has 4^i cells that evenly partition the current image.
For each local feature (let’s say its visual word ID is k) in this image, pick out the k-th coordinate histogram, and then accumulate one
count to each of the L corresponding cells in this histogram,
according to the coordinate of the local feature. The L cells are
cells where the local feature falls in in L different resolutions.
Concatenate the K multi-resolution coordinate histograms to form a final “long” histogram of the image. When concatenating, the k-th
histogram is weighted by the probability of the k-th visual word.
To compute the kernel value over two images, sum up all the cells of the intersection of their “long” histograms.
现在,我有以下问题:
>什么是坐标直方图?直方图是否只显示x轴中每个分组的计数?它将如何提供有关点坐标的信息?
>我如何计算第k个视觉词的概率?
>我会得到什么样的“核心价值”?我如何将其用作SVM的输入?如果我理解正确,核心值是在测试阶段使用而不是在训练阶段吗?如果是,那我将如何训练我的SVM?
>或者你认为我不需要为空间信息增加负担,只需坚持正常的BoW来治疗我的情况(良性和恶性肿瘤)?
有人请帮助这个可怜的小本科生.如果你这样做,你将永远感激我.如果您有任何澄清,请不要犹豫.