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-17-2011, 06:39 PM
Post: #11
Your Google Ad Here
RE: Mammogram classification by using Matlab code
(09-17-2011 06:31 PM)oooivanooo Wrote:  
(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.
Exactly this is the image that you need. This is the breast part where calcification can occur. If you get this image, you are half done with the project. This is a normal mammogram.


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, 10:57 PM
Post: #12
Your Google Ad Here
RE: Mammogram classification by using Matlab code
(09-17-2011 06:39 PM)admin Wrote:  
(09-17-2011 06:31 PM)oooivanooo Wrote:  Exactly this is the image that you need. This is the breast part where calcification can occur. If you get this image, you are half done with the project. This is a normal mammogram.


No, that is not the image I got from the segmentation process, that one is I edited and show you about my previous question.

What I get from the segmentation process are like attachments, I just remove the code below, Am I correct to do so?
b=find(result_image>200);
im1(b)=0;:

Abnormal
       
Normal
       

My questions are:
1. How to remove extra white text and unwanted area?
2. How to differentiate my previous posted image was normal mammogram? From my attachment now, both normal and abnormal look equivalent.
Thank you so much for helping me Smile

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

09-17-2011, 11:08 PM
Post: #13
Your Google Ad Here
RE: Mammogram classification by using Matlab code
(09-17-2011 10:57 PM)oooivanooo Wrote:  
(09-17-2011 06:39 PM)admin Wrote:  
(09-17-2011 06:31 PM)oooivanooo Wrote:  Exactly this is the image that you need. This is the breast part where calcification can occur. If you get this image, you are half done with the project. This is a normal mammogram.


No, that is not the image I got from the segmentation process, that one is I edited and show you about my previous question.

What I get from the segmentation process are like attachments, I just remove the code below, Am I correct to do so?
b=find(result_image>200);
im1(b)=0;:

Abnormal

Normal


My questions are:
1. How to remove extra white text and unwanted area?
2. How to differentiate my previous posted image was normal mammogram? From my attachment now, both normal and abnormal look equivalent.
Thank you so much for helping me Smile
you can not make the difference of normal and abnormal just by looking at them. That is why texture analysis is required.

b) whit pixels wll have pixel vale more than 220. so eliminate those pixels.
black will be bellow 70, eliminate that also. 75-200 are ideal mammography image pixels.

but I must appreciate your desire and dedication of learning.
keep the spirit. I know you will surely complete it. just need to give a bit of time ob the work


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, 11:34 PM
Post: #14
Your Google Ad Here
RE: Mammogram classification by using Matlab code
(09-17-2011 11:08 PM)admin Wrote:  
(09-17-2011 10:57 PM)oooivanooo Wrote:  you can not make the difference of normal and abnormal just by looking at them. That is why texture analysis is required.

b) whit pixels wll have pixel vale more than 220. so eliminate those pixels.
black will be bellow 70, eliminate that also. 75-200 are ideal mammography image pixels.

but I must appreciate your desire and dedication of learning.
keep the spirit. I know you will surely complete it. just need to give a bit of time ob the work

No wonder! Now I know why your code find result < 130 and >200, thanks for the explaination Smile
-But in case unwanted area and white text pixel is between 130 and 200, how to cut them out?
-Means after done segmentation, I will proceed to texture analysis? Is it feature extraction?
Thank you~

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

09-18-2011, 05:31 PM
Post: #15
Your Google Ad Here
RE: Mammogram classification by using Matlab code
While waiting your reply, I have found out segmentation process will cut out value pixel on the mammogram, and some white text scraps still there, how to fix it Sad
   
Thank you.

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

09-18-2011, 06:06 PM
Post: #16
Your Google Ad Here
RE: Mammogram classification by using Matlab code
(09-17-2011 11:34 PM)oooivanooo Wrote:  
(09-17-2011 11:08 PM)admin Wrote:  
(09-17-2011 10:57 PM)oooivanooo Wrote:  you can not make the difference of normal and abnormal just by looking at them. That is why texture analysis is required.

b) whit pixels wll have pixel vale more than 220. so eliminate those pixels.
black will be bellow 70, eliminate that also. 75-200 are ideal mammography image pixels.

but I must appreciate your desire and dedication of learning.
keep the spirit. I know you will surely complete it. just need to give a bit of time ob the work

No wonder! Now I know why your code find result < 130 and >200, thanks for the explaination Smile
-But in case unwanted area and white text pixel is between 130 and 200, how to cut them out?
-Means after done segmentation, I will proceed to texture analysis? Is it feature extraction?
Thank you~
You are Spot On. Proceed for Feature extraction. We will shortly release the GLCM part of code here. You can just see that and change it ti FT.


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-19-2011, 02:42 AM (This post was last modified: 09-19-2011 03:13 AM by Rupam.)
Post: #17
Your Google Ad Here
How to Train the Image?
1. First write a Method call Feature. pass the segmented image as input and return the features either as a structure or as an array. From main program call that. We are putting here the feature extraction using FFT. you can easily use fft. Rather DCT or wavelet. Take mean and standard deviation.

Code MATLAB :
 
function [f]=Feature(im)
im=imresize(im,[256 256]);% all the images must be of same size for image training and testing
im={FNAMEL}.html">double(im); % dct and fft needs exponential operation which can be performed only in double data typeim1=fft2(im);
im1={FNAMEL}.html">real(im1);
im1={FNAMEL}.html">abs(im1);
m={FNAMEL}.html">mean({FNAMEL}.html">mean(im1));
s=std2(im1);
f=[m s];% remember if you are using some more features like say moment2 and representing it with m2%than, f=[m s m2] and so on.
% all features are returned as a single row matrix.
 



In the main program call this function and get the features. Your next task:

1) Read one abnormal image, segment and extract features say f1.
2) Read a normal image, segment, extract feature say f2
3) Read a test image which you must know if normal or abnormal and its segmented features will be ftest.

Put the program here with the images and values for f1,f2,ftest.

You are 60% done with your project. Little more effort will fetch you the result. C'mon you can do that. If your learning experience is smooth here, please tell your friends and help us show people how project should be done and what is meant by guidance.


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-23-2011, 03:47 PM (This post was last modified: 09-23-2011 03:53 PM by oooivanooo.)
Post: #18
Your Google Ad Here
RE: Mammogram classification by using Matlab code
(09-19-2011 02:42 AM)admin Wrote:  1. First write a Method call Feature. pass the segmented image as input and return the features either as a structure or as an array. From main program call that. We are putting here the feature extraction using FFT. you can easily use fft. Rather DCT or wavelet. Take mean and standard deviation.

Code MATLAB :
 
function [f]=Feature(im)
im=imresize(im,[256 256]);% all the images must be of same size for image training and testing
im={FNAMEL}.html">double(im); % dct and fft needs exponential operation which can be performed only in double data typeim1=fft2(im);
im1={FNAMEL}.html">real(im1);
im1={FNAMEL}.html">abs(im1);
m={FNAMEL}.html">mean({FNAMEL}.html">mean(im1));
s=std2(im1);
f=[m s];% remember if you are using some more features like say moment2 and representing it with m2%than, f=[m s m2] and so on.
% all features are returned as a single row matrix.
 



In the main program call this function and get the features. Your next task:

1) Read one abnormal image, segment and extract features say f1.
2) Read a normal image, segment, extract feature say f2
3) Read a test image which you must know if normal or abnormal and its segmented features will be ftest.

Put the program here with the images and values for f1,f2,ftest.

You are 60% done with your project. Little more effort will fetch you the result. C'mon you can do that. If your learning experience is smooth here, please tell your friends and help us show people how project should be done and what is meant by guidance.


Sorry for late reply.
Actually I'm not really understand what must I do with this "feature" code. I do not know what are the differences between normal and abnormal image's values I get from this code.

Below are my images and values for:
f1 (abnormal)
       
f2 (normal)
       
for ftest, I will put it on the following reply..





ftest (normal)
       

and this
.zip  myCode.zip (Size: 1.9 KB / Downloads: 161) is my code.

I have a few questions:
1 What I get from this code is to find out mean and std deviation for each normal and abnormal images. But why only choose mean and sd?
2 How to find image moments, I have found that moments is important value after segmentation.
3. Why I no need to use fft() code to find images's feature?
Thank you and once again, sorry for late reply.

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

09-24-2011, 01:49 PM
Post: #19
Your Google Ad Here
RE: Mammogram classification by using Matlab code
(09-23-2011 03:47 PM)oooivanooo Wrote:  
(09-19-2011 02:42 AM)admin Wrote:  1. First write a Method call Feature. pass the segmented image as input and return the features either as a structure or as an array. From main program call that. We are putting here the feature extraction using FFT. you can easily use fft. Rather DCT or wavelet. Take mean and standard deviation.

Code MATLAB :
 
function [f]=Feature(im)
im=imresize(im,[256 256]);% all the images must be of same size for image training and testing
im={FNAMEL}.html">double(im); % dct and fft needs exponential operation which can be performed only in double data typeim1=fft2(im);
im1={FNAMEL}.html">real(im1);
im1={FNAMEL}.html">abs(im1);
m={FNAMEL}.html">mean({FNAMEL}.html">mean(im1));
s=std2(im1);
f=[m s];% remember if you are using some more features like say moment2 and representing it with m2%than, f=[m s m2] and so on.
% all features are returned as a single row matrix.
 



In the main program call this function and get the features. Your next task:

1) Read one abnormal image, segment and extract features say f1.
2) Read a normal image, segment, extract feature say f2
3) Read a test image which you must know if normal or abnormal and its segmented features will be ftest.

Put the program here with the images and values for f1,f2,ftest.

You are 60% done with your project. Little more effort will fetch you the result. C'mon you can do that. If your learning experience is smooth here, please tell your friends and help us show people how project should be done and what is meant by guidance.


Sorry for late reply.
Actually I'm not really understand what must I do with this "feature" code. I do not know what are the differences between normal and abnormal image's values I get from this code.

Below are my images and values for:
f1 (abnormal)

f2 (normal)

for ftest, I will put it on the following reply..





ftest (normal)


and this is my code.

I have a few questions:
1 What I get from this code is to find out mean and std deviation for each normal and abnormal images. But why only choose mean and sd?
2 How to find image moments, I have found that moments is important value after segmentation.
3. Why I no need to use fft() code to find images's feature?
Thank you and once again, sorry for late reply.
1. Mean and standarad deviations are most primitive features and gives a good understanding of the feature extraction process. Read the above thread of @Rupam carefully. He says, once you are able to complete this, you can replace mean and standard deveation with any other suitable features.

suppose f1 and f2 are the features of normal and abnormal images,

and f3 is the feature of test images. do following code:
Code MATLAB :

The above code is simplest classifier called nearest neighbor classifier. When you try that we various normal/abnormal and test criteria, you can see 40% cases your program is detecting the test image correctly. Now improve the features and slowly that % will be improved to 70%. All you have to do is replace this classifier with SVM then.

This is step by step of reaching to the GOAL. your program framing is correct and there is no reason why you cant complete it. You will. Now perform As I wrote and post the number of input f3 you have given and out of them, how many are correctly recognized.

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

09-24-2011, 07:08 PM
Post: #20
Your Google Ad Here
RE: Mammogram classification by using Matlab code
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.

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)