我有一个灰度图像(每个像素一个值,介于 0 和 255 之间),我想使用 MSER 算法(即椭圆体)检测关键点,并使用 SIFT 描述符描述这些关键点。我正在使用 VLFeat 库中的函数。
首先,我使用函数vl_mser_get_regions
(返回表示图像中质心位置的值向量)和vl_mser_get_ell
(返回描述椭球的维数为 9 的向量)获取质心和椭球。然后,我想将该函数应用于vl_sift_calc_raw_descriptor
每个先前的椭球,以获得每个椭球的 SIFT 描述符。
我展示了一个我到目前为止所做的示例(省略了非超越代码):
/*********** MSER *************/
vl_mser_process (filter, image) ; //mser filter creation
number_regions = vl_mser_get_regions_num (filter) ; //number of ellipsoids
regions = vl_mser_get_regions (filter) ; //centroids of the ellipsoids
vl_mser_ell_fit (filt) ;
dimension_ellipsoids = vl_mser_get_ell_dof (filter) ; //dimension of the vector that describes the ellipsoids: 9
number_frames = vl_mser_get_ell_num (filter) ; //number of ellipsoids
frames = vl_mser_get_ell (filter) ; //ellipsoids
/*********** SIFT *************/
sift_filter = vl_sift_new (image_width, image_height octaves, levels, omin) ; //sift filter creation
for(int i=0; i < number_frames; i++){ //iterate over each ellipsoid
// HERE is the problem, I do not what input parameters I have
//to pass to this function except the first one (they must surely
//be obtained from the ellipsoids vector)
vl_sift_calc_raw_descriptor ( sift_filter,
vl_sift_pix const * grad,
vl_sift_pix * descr,
int width,
int height,
double x,
double y,
double sigma,
double angle0 )
}
问题是我不知道如何使用描述vl_sift_calc_raw_descriptor
函数中每个椭球的 9 维向量。