-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSIFTFeatureExtraction.m
More file actions
26 lines (19 loc) · 921 Bytes
/
SIFTFeatureExtraction.m
File metadata and controls
26 lines (19 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
%% SIFT feature extraction: Exisiting VL_SIFT implementation for a Single Image
%% Copyright (c) 2022 aR: This is simply using the tutorial of VL_SIFT; No modification
function [VLKeypoint, VLDescriptor] = SIFTFeatureExtraction(SingleImage)
%Tweakables
PeakThresh = PeakThresh; %colmap default:0.00667; SIFT default: 0.03
Octaves = Octaves;
Levels = Levels;
FirstOctave = FirstOctave;
% SingleImage = im2single(imread('./2D/images/3.png'));
% To generate noisy single image: check GeneratingSyntheticSingleImage Function
[VLKeypoint,VLDescriptor] = vl_sift(im2single(SingleImage), 'PeakThresh', PeakThresh, 'Octaves', Octaves, 'Levels', Levels, 'FirstOctave', FirstOctave) ;
%Visualisation
figure(2), imshow(SingleImage)
title('SIFT Implementation', 'FontSize', 20);
hold on
for j = 1:size(VLKeypoint,2)
CurFeat = VLKeypoint(:, j);
circle( [CurFeat(1), CurFeat(2)], CurFeat(3), [], 'yellow', 'linewidth', 2 );
end