Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 3

brain tumor Matlab

Hello,

I am using brain tumor image database 3000 images in .mat format. I want to read/show these images in matlab & extract GLCM features. I am facing problem to display image from .mat format?? Any idea?

2 Replies
Commander Lvl 1
Message 2 of 3

Re: brain tumor Matlab

What problems/errors are you getting? What code can you show us for loading and displaying one of the images?

Please follow-up to let us know how you made out. For good karma, mark a reply as the answer if it helped!

Copilot Lvl 2
Message 3 of 3

Re: brain tumor Matlab

Hello , Thanks for reply..I tried following code--

close all;
clear all;
clc;

tic
dirpath='I:\PROJECT DATABASE\1';
type = 'mat';


str = [dirpath,'',num2str(i)];
x = load([str '.' type]);

mask = int16(x.cjdata.tumorMask);
img = x.cjdata.image;
t = img.*mask;

imshow(t);
saveas(gcf,'a.bmp');

b = imread('a.bmp');
c = rgb2gray(b);
imshow(c);

I got error

Error in trrrr (line 13)
x = load([str '.' type]);

 

 

I am using 3064 .mat files(database available online).. for feature extraction & classification I am trying to read these images in matlab

Even I tried to check code on mathswork--

How to save images as jpgs from .mat files struct..

but still I am unable to get..