How can I merge image points extracted from extractFeatures function into the original image?

조회 수: 3(최근 30일)
Marcos
Marcos 2020년 5월 21일
답변: Sai Bhargav Avula 2020년 5월 26일
Hi everyone!
I just extracted surfPoints with the extractFeatures function
[imagesFeatures{i}, imagesPoints{i}] = extractFeatures(imGray, detectSURFFeatures(imGray));
I know I can plot the surf extracted points with the plot function
figure(1); imshow(images{1}); hold on;
plot(imagesPoints{1}.selectStrongest(10),'showOrientation',true);
However I would like to merge the points and the original image into a single image. That is because I want to show all the features of my dataset of images with the montage function.
Thank you so much,
Marcos

답변(1개)

Sai Bhargav Avula
Sai Bhargav Avula 2020년 5월 26일
Hi,
You can save the final result using saveas and use montage to show all the features of the dataset.
Run the below sample code in loop for the dataset and montage over the saved images
I = imread('cameraman.tif');
points = detectSURFFeatures(I);
[features, valid_points] = extractFeatures(I, points);
f = figure;
imshow(I); hold on;
plot(valid_points.selectStrongest(10),'showOrientation',true);
saveas(f,'Result.png')
Hope this helps

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by