I am currently trying to use the dsift-algorithm of the vlfeat-lib. But no matter with which values I create the filter (sample step, bin size), it returns the same number of keypoints for every frame during an execution (consecutive frames are different, from a camera). The documentation on C or C++ usage is very thin, and I could not find any good examples for these languages.. Here is the relevant code:
// create filter
vlf = vl_dsift_new_basic(320, 240, 1, 3);
// transform image in cv::Mat to float vector
std::vector<float> imgvec;
for (int i = 0; i < img.rows; ++i){
for (int j = 0; j < img.cols; ++j){
imgvec.push_back(img.at<unsigned char>(i,j) / 255.0f);
}
}
// call processing function of vl
vl_dsift_process(vlf, &imgvec[0]);
// echo number of keypoints found
std::cout << vl_dsift_get_keypoint_num(vlf) << std::endl;