MATLAB Answers


How do I create a matrix of the surf features for about 100 images?

Lauren Pitts さんによって質問されました 2019 年 7 月 31 日
最新アクティビティ Rena Berman さんによって 編集されました 2019 年 10 月 3 日
Basically, I'm creating a Neural Network.. I have all of my images and I have the code to detect the SURF Features. Now, I need help to place the images with detected features into a matrix please.
This is the SURF code with the image it display with SURF points. I need to do this for 300 images made into a matrix to start training my NN.
close all;
I = imread('D:\test\chair\0001.png');
figure; imshow(I);
I = rgb2gray(I);
figure; imshow(I);
points = detectSURFFeatures(I);
imshow(I); hold on;
[features, valid_points] = extractFeatures(I, points);
coffee cup.png

  3 件のコメント

You have done for one image, now you want to do same for 300 images right?
Now, I need help to place the images with detected features into a matrix please
Which matrix, variable name please?
@KALYAN ACHARJYA Right, I need to do it on all of my testing images. Do you mean what do I want to name the matrix?
@Prabhan is already answerd, hope the problem is resolved, if not let me know?

サインイン to comment.

1 件の回答

Answer by Prabhan Purwar on 5 Aug 2019
Edited by Rena Berman on 3 Oct 2019
 Accepted Answer

I am assuming that you are making use of a Neural Network for classification purpose.
Following code makes a row-wise matrix for 300 images using SURF features as descriptors.
close all
for i=1:300
I = imread(st);
I = rgb2gray(I);
points = detectSURFFeatures(I);
[features, valid_points] = extractFeatures(I, points);
The following link describes basic image classification using a simple convolution Neural Network:
I would like to suggest you make use of "Image category classification using a bag of features approach" which uses SURF features and SVM classifier. This gives you a single vector that you can use at the input to a neural network or any other classifier of your choice.

  1 件のコメント

Hey @Prabhan, The code you provided above does not work, it gives me an error: "The following error occurred converting from binaryFeatures to double:
Conversion to double from binaryFeatures is not possible."

サインイン to comment.

Translated by