作者tom21tom21 (平凡就好)
看板MATLAB
标题[讨论] FCM 影像切割(mri)
时间Wed Sep 26 12:58:17 2012
小弟想把一张mri的图片做切割
图片转成double 也可以跑完fcm
但是在来我就不知道如何把计算结果 在上面更改
以下是我的程式码
clear all;
close all;
load mri % load mri image
D=squeeze(D); % 4D to 3D
figure('Colormap',map)
image_num=8;%assume to load 8th image
image(D(:,:,image_num))
ab1=double(D(:,:,image_num));% unit8 to double
options = [2;100;1e-5;0];%m=2
[center,U,obj_fcn] = fcm(ab1,2,options);%分2组 U is fuzzy membership matrix
maxU = max(U); %find max U
index1 = find(U(1,:) == maxU);%分类
index2 = find(U(2,:) == maxU);%分类
figure('Colormap',map)
image(ab1)
想要把ab1里面东西做改变(根据fcm结果)
之後把ab1呈现出来
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 118.171.245.104