How can I make .mat file for SVM with 85 images?

4 ビュー (過去 30 日間)
Saad Rana
Saad Rana 2022 年 6 月 24 日
回答済み: Image Analyst 2022 年 6 月 25 日
I am working on a project that can distinguish between MRI images and tell weather the user uploaded image is benign or malignant. I've seen many codes online that uses .mat file with variables "label" and "meas". But I have no idea how to create that .mat file. Any help would be appreciated.

回答 (2 件)

Eamon Gekakis
Eamon Gekakis 2022 年 6 月 24 日
Try creating a structure and store the image data in a field you specify. Then, use the save function to save the structure as a .mat with data stored in the structure fields. Hope this helps.
  1 件のコメント
Saad Rana
Saad Rana 2022 年 6 月 25 日
I need .mat file that has meas and labels for classes. Can you guide e with that?

サインインしてコメントする。


Image Analyst
Image Analyst 2022 年 6 月 25 日
What are the features that you measure for your SVM? You can collect them all in to a table for your training images, then use Classification Learner app, on the Apps tab of the tool ribbon, to get a model. Then you can use classify or something to make predictions with your trained SVM model. The model will tell you how to make the call to the prediction function.
Can you upload your table with 85 rows, one for each training image, and N columns, one for each feature that you're going to consider? Use the paperclip icon to attach the table in a .mat file, like
save('answers.mat', 'mySVMFeatureTable');

カテゴリ

Help Center および File ExchangeGet Started with Statistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by