0 votes
Asked by Gomathi C on 2 Mar 2012
Latest activity Commented on by YASSER on 6 Mar 2014
I have a segmented liver. I need to segment the tumor in it. I used the FCM method. It is a 3 level FCM
function [bw,level]=fcmthresh IM,sw
%FCMTHRESH Thresholding by ‐class fuzzy c‐means clustering
% [bw,level]=fcmthresh IM,sw outputs the binary image bw and threshold level of % image IM using a ‐class fuzzy c‐means clustering. It often works better
% than Otsu's methold which outputs larger or smaller threshold on % fluorescence images.
% sw is 0 or , a switch of cut‐off position. % sw=0, cut between the small and middle class % sw= , cut between the middle and large class %
% Contributed by Guanglei Xiong xgl99@mails.tsinghua.edu.cn % at Tsinghua University, Beijing, China.
% check the parameters if nargin<
error 'You must provide an image.' ; elseif nargin==
sw=0;
elseif sw~=0 && sw~=
error 'sw must be 0 or .' ; end
data=reshape IM,[], ;
[center,member]=fcm data, ; [center,cidx]=sort center ; member=member';
member=member :,cidx ;
[maxmember,label]=max member,[], ; if sw==0
level= max data label== +min data label== / ; else
level= max data label== +min data label== / ; end
bw=im bw IM,level ;
%testfcmthresh.m
clear;clc;
im=imread 'mliver .jpg' ; fim=mat gray im ;
level=graythresh fim ; bwfim=im bw fim,0. ;
[bwfim0,level0]=fcmthresh fim,0 ; [bwfim ,level ]=fcmthresh fim, ; subplot , , ;
imshow fim ;title 'Original' ; subplot , , ;
imshow bwfim ;title sprintf 'Otsu,level=%f',level ; subplot , , ;
imshow bwfim0 ;title sprintf 'FCM0,level=%f',level0 ; subplot , , ;
imshow bwfim ;title sprintf 'FCM ,level=%f',level ; % imwrite bwfim ,'fliver6.jpg' ;
1 Comment
YASSER on 6 Mar 2014
Link
you say that you have 3 class images, but in the result you have 2 Images why? and how to get the third imge?
fuzzy segmentation
Tags
No products are associated with this question.
Products
1 Answer
Link
Answer by Nerea Zubiaurre on 2 Mar 2012 Where did you find the FCM method?
1 Comment
Gomathi C on 2 Mar 2012
Link
matlab central file exchange as FCM Thresholding