How to ensure consistency of SIFT functions?

I work with a classification algorithm that requires that the size of the vector function of all samples in the training and testing process be the same.

I also have to use the SIFT function extractor. This causes problems because the feature vector of each image approaches as a matrix of different sizes. I know that SIFT detects variable key points in each image, but is there any way to ensure that the size of the SIFT capabilities is consistent so that I don't get an error dimension mismatch.

I tried rootSIFTas a workaround:

[~, features] = vl_sift(single(images{i}));
        double_features = double(features);
        root_it = sqrt( double_features/sum(double_features) ); %root-sift
        feats{i} = root_it;

This gives me a consistent vector 128 x 1for each image, but it does not work for me, since the size of each vector is now very small, and I get a lot NaNin my classification result.

Is there any way to solve this?

+4
source share
2 answers

Using SIFT, you must complete 2 steps in total.

1- SIFT. ( NPx2 (x, y) ) . . (). 128 ( ).

2- -. , , ! , , . , . , . knn RANSAC. Google , .

(, ). , ( 30 ). , !

: http://www.vlfeat.org/matlab/vl_ubcmatch.html

UPDATE:

, - OCR. , , SIFT .

vl_ubcmatch:

[~, features1] = vl_sift(I1);
[~, features2] = vl_sift(I2);

matches=vl_ubcmatch(features1,features2)
+3

SIFT. , , . vlfeat, , , SIFT, vl_dsift. vl_sift , frames. , , .

, SIFT . , - ( ), , , .

+2

All Articles