|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
' e7 L ~5 m* X5 m8 a$ ]/ z
一、简介$ W$ }- D$ i8 ^& p# ^2 |
首先,通过引入形态学重构操作将图像的局部空间信息纳入FRFCM中,以保证抗噪性和图像细节保留。其次,基于局部空间邻居和聚类中心内像素之间距离的成员资格分区的修改被仅依赖于成员资格分区的空间邻居的局部成员资格过滤所取代。与最新的算法相比,提出的FRFCM算法更简单且速度明显更快,因为无需计算局部空间邻居和聚类中心内像素之间的距离。另外,由于成员资格过滤能够有效地改善成员资格划分矩阵,因此对于噪声图像分割是有效的。在合成和真实世界的图像上进行的实验表明,与最新的图像分割算法相比,该算法不仅能获得更好的结果,而且所需的时间更少。$ B% |. C# k! \8 k' l
$ R6 A4 y4 a% F: N; m7 J0 x8 r
二、源代码
, }5 n8 G9 Y1 i3 R- k Z& W" O* L/ c. B
! G: _6 Q0 }! {% r/ ~# a; o* n- clc
- close all
- clear all
- %% parameters
- cluster=3; % the number of clustering centers
- se=3; % the parameter of structuing element used for morphological reconstruction
- w_size=3; % the size of fitlering window
- %% test a color image
- f_ori=imread('3096.jpg');
- figure(1)
- subplot(121);imshow(f_ori);title('原图')
- % GT=load('12003.mat'); % Ground Truth, download from 'https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/resources.html'
- f_ori=double(f_ori);
- %% implement the proposed algorithm
- tic
- [~,U1,~,~]=FRFCM_c(double(f_ori),cluster,se,w_size);
- Time1=toc;
- disp(strcat('running time is: ',num2str(Time1)))
- f_ori;
- f_seg=fcm_image_color(f_ori,U1);
- subplot(122)
- imshow(f_seg);title('分割后的图')
- 3 ]1 `" I2 l' q6 I3 a! D' \3 C
% _ P! K0 }4 E7 a, b$ z& J( s" R; M X/ E) ~8 g! z
r! [1 G+ {9 ]1 M- ~; l
二、运行结果
. c: t7 {. Z6 E+ N
{1 w- B& l( b; T* |
" G( H1 p4 f8 ~% m |
|