I am using SURF feature detector and descriptor to find feature points in images using MATLAB. I want to use these feature points and feature descriptors in another program that only accepts feature points and descriptors in Lowe's ASCII format. I found that SIFT feature descriptors are normalized to 512 and I need to do the same with SURF feature descriptor in MATLAB but I didn't get it. I have tried norm function with no luck/success. Here is how I implemented this but I could not get what I want.
I = imread('cameraman.tif');
[r, c, p] = size(I);
if p > 1
I = rgb2gray(I);
end
points = detectSURFFeatures(I);
[features, vldPoints] = extractFeatures(I, points, 'FeatureSize', 128,...
'Method', 'SURF');
% imshow(I); hold on;
% plot(points);
for ii = 1:size(features,1)
v = features(ii,:);
normFeatures(ii,:) = round(v/norm(v) * 512);
end
More about the question can be found here.
EDIT: I tried the same process to normalize the SIFT feature descriptors found using the original sift binary in MATLAB and it worked (I matched temp.key file provided by Lowe in the sift folder and my features files and both are same). It means the SURF 'features' are not the right data to normalize. Please guide me about the SURF features found in MATLAB. I mean how they are different to sift feature descriptors?
This is Herbert, co-author of the SURF paper. Unfortunately, it is not possible to convert SURF features into SIFT features as the underlying math is different. Therefore, it is not possible to match SURF features against SIFT features. If you only want to normalize the features, please refer to the original source code for maybe better understanding https://github.com/herbertbay/SURF. Hope this helps...