Lecture 11+12
Lecture 11+12
Read 2 images
Extract features and matching
Estimate geometric transform
Create panorama
Matched Points
Read more than 2 pictures
Matched Points Between Image 1 and Image 2
Matched Points Between Image 2 and Image 3
numImages = numel(buildingScene.Files);
tforms(numImages) = projective2d(eye(3));
% Read I(n).
I = readimage(buildingScene, n);
centerIdx = floor((numel(tforms)+1)/2);
centerImageIdx = idx(centerIdx);
%%
% Finally, apply the center image's inverse transform to all
the others.
Tinv = invert(tforms(centerImageIdx));
for i = 1:numel(tforms)
tforms(i).T = tforms(i).T * Tinv.T;
end
for i = 1:numel(tforms)
[xlim(i,:), ylim(i,:)] = outputLimits(tforms(i), [1
imageSize(i,2)], [1 imageSize(i,1)]);
end
maxImageSize = max(imageSize);
I = readimage(buildingScene, i);
figure
imshow(panorama)
toc
for i = 1:numImages
points = detectSURFFeatures(grayImages{i}); % Detect
SURF features
[features{i}, validPoints{i}] =
extractFeatures(grayImages{i}, points); % Extract features
end