Your AD CODE HERE

Post Reply 
 
Thread Rating:
  • 5 Votes - 4.2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mammogram classification by using Matlab code
09-24-2011, 11:32 PM
Post: #21
Your Google Ad Here
RE: Mammogram classification by using Matlab code
(09-24-2011 07:08 PM)oooivanooo Wrote:  Hi all

I just done the classifier for f1, f2, and f3/ftest, below are my results gain:


Although I get 60% for the accuracy, but the result are inaccurate. I think there is something need to improve in my code at segmentation part, because some of my images contain useless area, such as "white text" and pectoralis:


May I know how to crop those areas?

Thank you.
Segmentation is correct now. Whatever small problems are can be removed.
you concentrate on @expert.here s advice and incorporate feature extraction using FFT. Alternatively we can also post the code.


Don't be shy to share what you know! Knowledge grows that way!
[Image: wink.gif]
Help Us to Help You better Read More
[Image: wink.gif]
Find all posts by this user
Quote this message in a reply
   

09-25-2011, 01:14 AM
Post: #22
Your Google Ad Here
RE: Mammogram classification by using Matlab code
(09-24-2011 11:32 PM)admin Wrote:  
(09-24-2011 07:08 PM)oooivanooo Wrote:  Segmentation is correct now. Whatever small problems are can be removed.
you concentrate on @expert.here s advice and incorporate feature extraction using FFT. Alternatively we can also post the code.
Ok, I'm waiting both of you to guide me what to do next.Thank you guyzSmile You helped me a lot.

Find all posts by this user
Quote this message in a reply
   

09-25-2011, 01:09 PM
Post: #23
Your Google Ad Here
RE: Mammogram classification by using Matlab code
Now, We will Move to the Next Part and Complete the first phase of the Project


In this part our objective is to read all the images in a directory and extract their features to create the feature database.

Consider that there are two Directories in C:\, by name Normal and Abnormal,
Normal has 20 images and Abnormal has another 20 images. What we will do is divide them into two parts: one for training and one for testing.

So first 10 images from Normal directory must be read, their feature must be extracted and stored in a database along with the class type.
Hence if we make a final Variable F for storing the features and another variable C for storing the classes,
They will look as bellow( with mean and standard deviation)
F=[m1 s1
m2 s2
m3 s3
........
........
m10 s10
M1 S1
M2 S2
M3 S3
........
........
M10 S10]

where m and s represents features of Normal images and M and S represents features from Abnormal Images.
C will look like bellow.
C=[0
0
0
0
...
...
1
1
1
...
...
]


Don't be shy to share what you know! Knowledge grows that way!
[Image: wink.gif]
Help Us to Help You better Read More
[Image: wink.gif]
Find all posts by this user
Quote this message in a reply
   

09-25-2011, 01:19 PM (This post was last modified: 09-25-2011 01:20 PM by expert.here.)
Post: #24
Your Google Ad Here
Creating the database of Features from All images in Normal and Abnormal Directory
Code MATLAB :
 
dn='D:\ELEVEN\INDIVIDUALS\MAMO\Normal\'
%all normal Images are here
db={FNAMEL}.html">dir({FNAMEL}.html">strcat(dn,'*.pgm'));
k=1;
F=[];
C=[];
 
for(i=1:1:{FNAMEL}.html">length(db))
name=db(i).name;
name={FNAMEL}.html">strcat(dn,name);
{FNAMEL}.html">subplot(10,10,k);
im={FNAMEL}.html">imread(name);
im=SegmentMammo(im);
% segmentation program of yours
imshow(im);
f=Feature(im);
% Your feature function
F=[F;f];
k=k+1;
if(k>=101)
k=1;
{FNAMEL}.html">figure
{FNAMEL}.html">title('Normal');
end
C=[C;0];
% Normal is 0 th class
end
 
%% Now Read Abnormal Images
{FNAMEL}.html">figure,{FNAMEL}.html">title('Abnormal');
dn='D:\ELEVEN\INDIVIDUALS\MAMO\Abnormal\'
db={FNAMEL}.html">dir({FNAMEL}.html">strcat(dn,'*.pgm'));
k=1;
for(i=1:1:{FNAMEL}.html">length(db))
name=db(i).name;
name={FNAMEL}.html">strcat(dn,name);
{FNAMEL}.html">subplot(10,10,k);
im={FNAMEL}.html">imread(name);
im=SegmentMammo(im);
imshow(im);
f=Feature(im);
F=[F;f];
k=k+1;
if(k>=101)
k=1;
{FNAMEL}.html">figure
{FNAMEL}.html">title('Abnormal');
end
C=[C;1];
end
 
{FNAMEL}.html">figure,
{FNAMEL}.html">title('Normal');
 
 


Integrate all your programs and put it here. Dont look into your segmentation problem, we can set that right any day. If you get upto this, as you should, looking at the way you are working, You will be ready for classification.
Complete this task and I will surely upload SVM part.


Thanks @Rupam for your directions. Even I am Learning a Bit!Blush

Find all posts by this user
Quote this message in a reply
   

09-25-2011, 05:13 PM
Post: #25
Your Google Ad Here
RE: Mammogram classification by using Matlab code
Hi all

I have integrated all together and below are my results for C and F:
       

Besides that, what is this loop function does? Will it reach 101?
if(k>=101)
k=1;
figure
title('Normal');
end

Thank you Smile

Find all posts by this user
Quote this message in a reply
   

09-25-2011, 05:19 PM
Post: #26
Your Google Ad Here
RE: Mammogram classification by using Matlab code
Quote: Besides that, what is this loop function does? Will it reach 101?
if(k>=101)
k=1;
figure
title('Normal');
end

Thank you [Image: smile.gif]
I must say, You are rocking now. Great great work dude.
That is: You are displaying 100 images in 1 figure window. In your database if you have 150 images, first 100 will be shown in 1 window and remaining 50 in next window. You rock man.

I will write SVM code soon and put it here. But need, Admin's Guidelines! waiting for him to share his thought about this work. You make me feel so happy.

Find all posts by this user
Quote this message in a reply
   

09-25-2011, 08:08 PM
Post: #27
Your Google Ad Here
RE: Mammogram classification by using Matlab code
(09-25-2011 05:19 PM)expert.here Wrote:  
Quote: Besides that, what is this loop function does? Will it reach 101?
if(k>=101)
k=1;
figure
title('Normal');
end

Thank you [Image: smile.gif]
I must say, You are rocking now. Great great work dude.
That is: You are displaying 100 images in 1 figure window. In your database if you have 150 images, first 100 will be shown in 1 window and remaining 50 in next window. You rock man.

I will write SVM code soon and put it here. But need, Admin's Guidelines! waiting for him to share his thought about this work. You make me feel so happy.

Thanks for your explaination Smile
Except "Thank you", I don't what to say for both of you. Your help is appreciated Heart

Find all posts by this user
Quote this message in a reply
   

09-25-2011, 11:26 PM
Post: #28
Your Google Ad Here
RE: Mammogram classification by using Matlab code
Seems OK to me. Now rather than waiting for @expert.here why dont you @expert.here check the result with nearest Neighbor classifier.

Now your

F1=F(1:N,Smile % where N is number of Normal Images
F2=F(N+1:1:size(F,1),Smile;

% test image feature is ftest
sn=0; % sum of a test image from all the database normal images
for(i=1:1:size(F1,1))
s=abs(F1(i)-ftest);
sn=sn+s;
end

similarly sa is sum of abnormal images

if(sa>sn)
disp('Abnormal')
else
disp('Normal')
end


------------------------------------------------------------
This will complete your project roughly. You can simply replace this program by name say TestNN.m with svm.
Alternatively you can also present the comparision between the two. That would be a better Project then.


Don't be shy to share what you know! Knowledge grows that way!
[Image: wink.gif]
Help Us to Help You better Read More
[Image: wink.gif]
Find all posts by this user
Quote this message in a reply
   

09-26-2011, 09:08 AM
Post: #29
Your Google Ad Here
RE: Mammogram classification by using Matlab code
(09-15-2011 02:27 AM)admin Wrote:  
(09-14-2011 11:44 PM)oooivanooo Wrote:  Hi all
I'm new to this forum and I have a problem with my FYP, title "Mammogram image processing". I'm new to matlab and image processing too Sad
Below are my processing flow and problems I have facing:
1. Data collection: MIAS database (I have collected 20 for each normal and abnormal mammograms)

2. Image preprocessing: Morphology
Questions:
a. Am I using the right preprocessing method? Is it more accurate compare to others?
b. Do I need to crop the images manually before preprocessing step since all the images are bias and not consistent in size?

3. Image Analysis:
i. Feature Extraction: STFT
Questions:
a. Am I using the correct method? Any other suitable method I can try?
b. How to implement this step? As I mentioned in the step 2Qb, all the images are not consistent, so how to get the accurate result?

ii. Feature Selection: Standard Deviation, median, max, min, etc.
Questions:
a. How to know which feature selection I need to use and will get the correct results?

4. Image Classification: SVM
I will try to do this step by my own after done step 1-3.

Anyone have a matlab code which related to my project? Mine to share with me? It's ok if the methods used in your code are differ with me, because I just want it to use as my references.

Thank you for your time, wish to hear from you all soon [Image: smile.gif]
1. Database: For mammogram, you need a database of atleast 50 images each of Normal and abnormal. if possible, go for three class, malignant, normal and Benign. You can find these .pgm files in MIS database. 20 is just very low number for Image Processing.

2. Manual cropping is just not correct, with mamography point of view. Most suitable will be segmentation using K-means clustering. That will remove the extra part like "white written texts" from the image. No morphology processes binary images. You need the segmentation at the gray scale level.

3. STFT( short term fourier transform) is theoretically best suited for non stationary signals like ECG. any tumor is best represented by change in texture. So you will be better off using either Wavelet, GLCM or even Fourier transform. Though for a change STFT can be tried out.

4. Once you talk about features, statistical features like mean, standard deviation is fine. But more prominantly you need higher order moments like Energy, Entropy, Contrast etc.

How much time you have for the project? If you have time, we will guide you. we will put small snippets of code. otherwise you can directly go for a ready made code which will be charged here. you can PM me with your further considerations.



Hello,

The guidance given for the project is really awesome,.I am very much impressed.

I am also doing a project on Image Segmentation.But unlike kmeans i have to use EM algorithm to do the segmentation.

Can i also get some guidance for this pls? I require your support badly....


what ever happens keep trying....
Find all posts by this user
Quote this message in a reply
   

09-26-2011, 10:11 AM
Post: #30
Your Google Ad Here
RE: Mammogram classification by using Matlab code
that is what this forum all about friend. Create a thread in guidance section and elaborate your requirements. Work on the directions given by us and that will help you...

Find all posts by this user
Quote this message in a reply
   

Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Image source or Camera identification using MATLAB for Cannon and Nikkon DSLR Camera jithin 19 6,574 07-16-2018 03:28 PM
Last Post: ninest123
  Help: Pectoral Muscle removal from Mammogram by using Matlab oooivanooo 29 17,964 07-16-2018 03:15 PM
Last Post: ninest123
Lightbulb ECG Classification using artificial immune system roza 33 14,002 06-30-2018 05:32 PM
Last Post: ninest123
  set threshold for histogram comparison in matlab preethiraj 2 2,367 05-17-2018 07:22 PM
Last Post: ninest123
  Breast Skin-Line Estimation in Mammogram using Matlab hieuiph 2 2,012 05-17-2018 05:43 PM
Last Post: ninest123
  mini-Mias Mammogram database lesion extraction amithbhaskar 0 965 06-17-2015 01:07 PM
Last Post: amithbhaskar
  Classification of mammograms using Chebyshev moment Kamaleshforyou 6 4,096 10-29-2014 01:56 AM
Last Post: sara736
  classification of mammogram images using svm daya 2 5,483 06-14-2014 11:08 AM
Last Post: linzhenhua21
Question Matlab Loop Amira 7 3,069 06-15-2012 02:02 PM
Last Post: Rupam
  differnce between images in matlab preethiraj 3 4,917 05-24-2012 09:18 AM
Last Post: expert.here

Forum Jump:


User(s) browsing this thread: 1 Guest(s)