How to Extract features from a cell array and save it from training

Hello I read and saved images in a mat file. I need to know how to extract glcm features from the images saved in the mat file,
Here is the code I used. Thanks
img1 = imread('.....');
img2 = imread('.....');
fetch = {img1, img2};
save fetch

6 件のコメント

Walter Roberson
Walter Roberson 2019 年 2 月 27 日
You are not storing the images that you read, and you overwrite the variable fetch with constants. You are not going to be able to extract features from that cell array.
img1 = imread('.....');
img2 = imread('.....');
fetch = {img1, img2};
save fetch
Chidiebere Orisakwe
Chidiebere Orisakwe 2019 年 2 月 27 日
@Walter Roberson thanks for your help. So how can I extract Glcm features after saving fetch?
Walter Roberson
Walter Roberson 2019 年 2 月 27 日
Everything else is just a matter of loading the data (if needed) and using cell indexing to extract an individual image.
Note: JPEG images are almost always RGB, even when they look gray.
Chidiebere Orisakwe
Chidiebere Orisakwe 2019 年 2 月 27 日
Hello thanks again. All the images are in gray scale I did the conversion while I was resizing them. Can you please give me an example code that uses cell indexing as I have no clue. Thanks
Shivam Gupta
Shivam Gupta 2019 年 3 月 6 日
MATLAB command GRAYCOMATRIX helps to find the GLCM. Please refer to the documentation at:
For more information see:
https://in.mathworks.com/matlabcentral/fileexchange/22187-glcm-texture-features
Walter Roberson
Walter Roberson 2019 年 3 月 6 日
cellfun(@graycomatrix, fetch, 'uniform', 0))

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

回答 (0 件)

質問済み:

2019 年 2 月 27 日

コメント済み:

2019 年 3 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by