vl_dsift trying to get a feature vector at every pixel

馋奶兔 提交于 2019-12-01 14:43:22

I am afraid you cannot extract the feature vectors for all the pixels in the image.

As you can see from figure 'Dense SIFT descriptor geometry' in the following link ( http://www.vlfeat.org/api/dsift.html ) dense sift extracts the features from 4-by-4 window. Since this box cannot move outside the image, top left bin of the 4-by-4 window can be at first pixel namely (1,1). Thus in this situation ( assuming your bin size is 1), the center of the 4-by-4 window is at (2.5, 2.5) in other words between 2nd and 3rd pixels in both x and y direction. Please notice that in this situation the 4-by-4 window is covering 16 pixels which are [1,4] x [1,4] pixels.

Now say your image of the size n-by-m. In the same manner when the bottom right bin of 4-by-4 window is at last pixel (pixel at n,m) the center of the 4-by-4 window will be at [n-1.5, m-1.5]. In your case your features will start from pixel at 2.5 x 2.5 and will end at 190.5 x 166.5

So the bottom line is that the center of 4-by-4 window travels in X direction from 'XMIN + 3/2 * SIZE' to 'MAX - 3/2 * SIZE' with steps of size 'STEP'. Where XMIN and XMAX are the first and the last pixels in X direction respectively. Same for Y axis(See the bottom paragraph 'FURTHER DETAILS ON THE GEOMETRY' at the link http://www.vlfeat.org/matlab/vl_dsift.html). As a result the 4-by-4 window travels whole the image.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!