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-14-2011, 11:44 PM (This post was last modified: 09-30-2011 12:02 AM by Rupam.)
Post: #1
Your Google Ad Here
Mammogram classification by using Matlab code
Mammogram Database Download:
http://grasshoppernetwork.com/showthread...554#pid554
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]

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

09-15-2011, 02:27 AM
Post: #2
Your Google Ad Here
RE: Mammogram classification by using Matlab code
(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.


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-15-2011, 11:02 AM
Post: #3
Your Google Ad Here
RE: Mammogram classification by using Matlab code
Hi, thanks for your reply.
  1. I hope to go for three classes, but with my poor knowledge, I just want to try out 2 classes, will proceed to 3 classess after succeed. BTW, how to classified it into 3 classes? Do you mean MIAS database? Because I cant find MIS database on web. Can you send me the link for MIS database? Thanks.
  2. Ok, i will try change to K-means clustering instead of morphology. BTW, how about EM clustering? For the preprocessing, i will be done after doing clustering and proceed to feature extraction part?
  3. Because my project supervisor asked my to use STFT while my other friend using wavelet, but in case STFT is not suitable, I will try to discuss with my supervisor to change it, is it possible for me to use FFT?
  4. Thanks, will try out energy, entropy, contrast and etc after done preprocessing part.
I really hope you can guide me with small snippets of code for clear understanding with this project as well as matlab code.
Hope to hear from you soon, thank you.

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

09-15-2011, 03:08 PM (This post was last modified: 09-15-2011 03:10 PM by Rupam.)
Post: #4
Your Google Ad Here
mammogram segmentation code in matlab
Code MATLAB :
 
function [im1]=SegmentMammo(im)
% [fname path]=uigetfile('*.pgm')
% im=imread(strcat(path,fname));
%figure,
%subplot(1,3,1),title('ACTUAL')
imshow(im);
[clusters, result_image, clusterized_image] = kmeansclustering(im, 3);
a={FNAMEL}.html">find(result_image<130);
b={FNAMEL}.html">find(result_image>200);
im1=im;
im1(a)=0;
im1(b)=0;
%subplot(1,3,3),imshow(im1),title('FINAL SEGMENTED IMAGE');
%subplot(1,3,2),imshow(result_image),title('SEGMENTATION PART');
 

this function must be called from a main function. and it returns segmented mammogram image.
Also observe that it calls a sub function, i.e. kmeansclustering. which is put in the next port


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-15-2011, 03:12 PM
Post: #5
Your Google Ad Here
k means clustering code for mammogram segmentation
Code MATLAB :
 
function [clusters, result_image, clusterized_image] = kmeansclustering(im, k)
 
%histogram calculation
img_hist = {FNAMEL}.html">zeros(256,1);
hist_value = {FNAMEL}.html">zeros(256,1);
 
for i=1:256
img_hist(i)={FNAMEL}.html">sum({FNAMEL}.html">sum(im==(i-1)));
end;
for i=1:256
hist_value(i)=i-1;
end;
%cluster initialization
cluster = {FNAMEL}.html">zeros(k,1);
cluster_count = {FNAMEL}.html">zeros(k,1);
for i=1:k
cluster(i)={FNAMEL}.html">uint8({FNAMEL}.html">rand*255);
end;
 
old = {FNAMEL}.html">zeros(k,1);
while ({FNAMEL}.html">sum({FNAMEL}.html">sum({FNAMEL}.html">abs(old-cluster))) >k)
old = cluster;
closest_cluster = {FNAMEL}.html">zeros(256,1);
min_distance = {FNAMEL}.html">uint8({FNAMEL}.html">zeros(256,1));
min_distance = {FNAMEL}.html">abs(hist_value-cluster(1));
 
%calculate the minimum distance to a cluster
for i=2:k
min_distance ={FNAMEL}.html">min(min_distance, {FNAMEL}.html">abs(hist_value-cluster(i)));
end;
 
%calculate the closest cluster
for i=1:k
closest_cluster(min_distance==({FNAMEL}.html">abs(hist_value-cluster(i)))) = i;
end;
 
%calculate the cluster count
for i=1:k
cluster_count(i) = {FNAMEL}.html">sum(img_hist .*(closest_cluster==i));
end;
 
 
for i=1:k
if (cluster_count(i) == 0)
cluster(i) = {FNAMEL}.html">uint8({FNAMEL}.html">rand*255);
else
cluster(i) = {FNAMEL}.html">uint8({FNAMEL}.html">sum(img_hist(closest_cluster==i).*hist_value(closest_cluster==i))/cluster_count(i));
end;
end;

end;
imresult={FNAMEL}.html">uint8({FNAMEL}.html">zeros({FNAMEL}.html">size(im)));
for i=1:256
imresult(im==(i-1))=cluster(closest_cluster(i));
end;
 
clustersresult={FNAMEL}.html">uint8({FNAMEL}.html">zeros({FNAMEL}.html">size(im)));
for i=1:256
clustersresult(im==(i-1))=closest_cluster(i);
end;
 
clusters = cluster;
result_image = imresult;
clusterized_image = clustersresult;
end
 


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-15-2011, 03:13 PM
Post: #6
Your Google Ad Here
RE: Mammogram classification by using Matlab code
Integrate them and post a result of the method. If the segmentation is done appropriately, we will surely guide you through rest of the project.


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-16-2011, 01:25 AM
Post: #7
Your Google Ad Here
RE: Mammogram classification by using Matlab code
ok, i will try to integrate them and reply you my result a.s.a.p

once again, thank you so much.. Smile

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

09-17-2011, 01:29 PM
Post: #8
Your Google Ad Here
RE: Mammogram classification by using Matlab code
   
I have tested one of the mammogram I have downloaded from MIAS-database, attached file is the result after done the segmentation part, that final segmented image seems like gave me a wrong result. Or I missed something?
Do I need to do add some other preprocessing method (e.g. gray level, bw, contrast enhancement, etc) before proceed to k-means clustering part?
thank you.

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

09-17-2011, 04:56 PM
Post: #9
Your Google Ad Here
RE: Mammogram classification by using Matlab code
(09-17-2011 01:29 PM)oooivanooo Wrote:  I have tested one of the mammogram I have downloaded from MIAS-database, attached file is the result after done the segmentation part, that final segmented image seems like gave me a wrong result. Or I missed something?
Do I need to do add some other preprocessing method (e.g. gray level, bw, contrast enhancement, etc) before proceed to k-means clustering part?
thank you.
You have got correct result dear friend. The segmentation code is tweked a little. Observe carefully that you are getting the probable area of calcification out of the image.

The objective would be to keep that part 'which is missing' and 'remove the rest of the part which is now apparent'.
carefully play with following two lines will solve your problem.
Code MATLAB :
a={FNAMEL}.html">find(result_image<130);
b={FNAMEL}.html">find(result_image>200);
 


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-17-2011, 06:31 PM
Post: #10
Your Google Ad Here
RE: Mammogram classification by using Matlab code
(09-17-2011 04:56 PM)admin Wrote:  
(09-17-2011 01:29 PM)oooivanooo Wrote:  You have got correct result dear friend. The segmentation code is tweked a little. Observe carefully that you are getting the probable area of calcification out of the image.

The objective would be to keep that part 'which is missing' and 'remove the rest of the part which is now apparent'.
carefully play with following two lines will solve your problem.
Code MATLAB :
a={FNAMEL}.html">find(result_image<130);
b={FNAMEL}.html">find(result_image>200);
 

Sorry, I have tried out the code, but I still didn't really get what you mean Sad.
After segmentation process, why it remove the "important" part but not the "white written texts" from the image?
What image do I need to show actually? Like the image below?
   
Do I need to convert the image into binary and then crop out the extra part from the image before comes to segmentation?
Thank you.

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

Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Classification of mammograms using Chebyshev moment Kamaleshforyou 5 2,213 06-24-2014 03:02 PM
Last Post: tomsdoutlet
  classification of mammogram images using svm daya 2 3,830 06-14-2014 11:08 AM
Last Post: linzhenhua21
Question Matlab Loop Amira 7 1,201 06-15-2012 02:02 PM
Last Post: Rupam
  differnce between images in matlab preethiraj 3 2,931 05-24-2012 09:18 AM
Last Post: expert.here
  Help: Pectoral Muscle removal from Mammogram by using Matlab oooivanooo 25 7,858 05-20-2012 12:12 AM
Last Post: Pipoussa
  canny edge detction in matlab preethiraj 1 1,002 05-07-2012 03:48 PM
Last Post: Rupam
  set threshold for histogram comparison in matlab preethiraj 1 1,195 05-07-2012 03:42 PM
Last Post: Rupam
Smile Mammogram classification using Dual-Tree CWT srutika 4 1,096 03-25-2012 03:20 PM
Last Post: srutika
  Image source or Camera identification using MATLAB for Cannon and Nikkon DSLR Camera jithin 11 2,285 03-20-2012 02:05 AM
Last Post: jithin
Lightbulb ECG Classification using artificial immune system roza 29 4,123 03-18-2012 01:30 AM
Last Post: Amira

Forum Jump:


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