I'm detecting BRISK and SURF feature points. I have the following code for detection.
im = imread('hammer.png');
pointsBRISK = detectBRISKFeatures(im, 'NumOctaves', 3);
pointsSURF = detectSURFFeatures(im, 'NumOctaves', 3);
This is my original image:
This is BRISK points:
This is SURF points:
I plot these points using the following code:
figure; imshow(im); hold on; plot(pointsBRISK); title('pointsBRISK');
figure; imshow(im); hold on; plot(pointsSURF); title('pointsSURF');
There is nothing wrong with these points. However, when I look at scales of the points I got completely different scales for BRISK and SURF but from the images I can say that scales should be similar.
Here are the scales of BRISK points and SURF points:
BRISK SURF
11.9173 2.9333
11.9381 2.9333
12.3887 2.9333
12.4036 2.9333
12.5329 2.9333
26.8478 2.9333
31.8943 2.9333
36.0000 2.9333
48.0000 3.0667
72.0000 3.0667
72.0000 4.1333
72.0000 4.2667
72.0000 4.2667
72.0000 4.2667
72.0000 4.2667
4.2667
4.4000
4.4000
4.4000
6.1333
8.6667
8.8000
8.9333
11.6000
12.1333
12.2667
12.2667
Bigger values stands for bigger circles in the images.
It seems they are in completely different domains. How can I take them to the same domain? Or if the problem is something else again how can I fix it?
[EDIT]
Well, I've looked through extractFeatures
function. Which uses BRISKPoints or SURFPoints to extract features. There are conversion functions inside the function such that pointsToBRISKPoints
or parseSURFInputs
. In those functions scales are converted. But still there is a problematic part.
When BRISK points converted to SURF points BRISK scales are divided by 6. On the other hand when SURF points converted to BRISK points SURF scales are multiplied by 10! I think it should be 6 too! Why does not it is 6?
[EDIT]
Thanks!
The scales are represented differently between BRISK and SURF. The reported BRISK scale is based on the radius of the BRISK sampling pattern. The SURF scale is represented by the detection scale "s" of the box filters used for keypoint detection.
Details about this can be found in the original references:
(BRISK) http://www.robots.ox.ac.uk/~vgg/rg/papers/brisk.pdf
(SURF) http://www.vision.ee.ethz.ch/~surf/eccv06.pdf
SURF estimates the orientation from a region with radius of 6s. So when converting BRISK scale information into SURF, the BRISK scale is divided by 6 to make sure the orientation is estimated over a similar sized region. When SURF is converted to BRISK, the 10 comes from the fact that SURF descriptors are extracted over a 20s window so multiplying by 10 makes sure the BRISK sampling pattern covers most of the 20s window so the descriptor captures most of the same information.
These conversions can be done in other ways too. Just create a SURFPoints object from the information in the BRISKPoints object.
Having said that, BRISK is a corner based detector/descriptor while SURF is blob based detector/descriptor, so you can't really get a "correct" mapping that always makes sense.