⛄一、获取代码方式
获取代码方式1:
完整代码已上传我的资源:【图像分割】基于matlab多模态粒子群算法图像分割【含Matlab源码 5134期】
点击上面蓝色字体,直接付费下载,即可。
获取代码方式2:
付费专栏Matlab图像处理(初级版)
备注:
点击上面蓝色字体付费专栏Matlab图像处理(初级版),扫描上面二维码,付费29.9元订阅海神之光博客付费专栏Matlab图像处理(初级版),凭支付凭证,私信博主,可免费获得1份本博客上传CSDN资源代码(有效期为订阅日起,三天内有效);
点击CSDN资源下载链接:1份本博客上传CSDN资源代码
⛄二、部分源代码
clear ;close all;clc;
%%
show_3D_Histogram = 1;
show_Color_distribution = 1; % Take long, 0 is recomanded
show_smoothed_Color_distribution = 1; % Take long, 0 is recommanded
show_cluster_center_on_color_space = 1;
show_cluster_center_on_color_space_smoothed = 1;
addpath (‘LSelectrostatic’);
addpath (‘altmany’);
nich = 80; % Minimum euclidean distance between cluster centers
dim = 3; % do not change this variable
global GausHist;
global FileName;
global I;
[FileName,PathName] = uigetfile(‘.tif;.bmp;.png;.jpg’,‘Select file’,‘D:\Academic\Projects\Image Processing\BSDS300\images\Select’);
I = imread(strcat(PathName,FileName));
mkdir(‘Results’,FileName);
[U,V,~] = size(I);
Hist = Hist3D(I);
GausHist = smooth3(Hist,‘gaussian’,[13 13 13],7);
if show_3D_Histogram
figure
[freq, freq_emph, freq_ly] = image_hist_RGB_3d(I,10);
end
if show_Color_distribution
figure
ColorSpace( Hist )
end
if show_smoothed_Color_distribution
figure
ColorSpace( GausHist )
end
⛄三、运行结果
⛄四、matlab版本及参考文献
1 matlab版本
2014a
2 参考文献
[1]杨章静,钱建军,黄璞,张凡龙,杨国为.基于Gabor变换的GrabCut纹理图像分割[J].控制与决策. 2016,31(01)
3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除