👨🎓个人主页:研学社的博客
💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
📚2 运行结果
🌈3 Matlab代码实现
🎉4 参考文献
💥1 概述
本文基于神经气体网络 (NGN)实现图像分割附matlab代码
📚2 运行结果
部分代码:
clc;
clear;
close all;
%% Load Image
Org=imread('Veg.jpg');
X = rgb2gray(Org);
X=double(X);
img=X;
X=X(:)';
%% Neural Gas Network (NGN) Parameters
ParVal.N = 16; % Number of Segments
ParVal.MaxIt = 50; % Number of runs
ParVal.tmax = 100000;
ParVal.epsilon_initial = 0.3;
ParVal.epsilon_final = 0.02;
ParVal.lambda_initial = 2;
ParVal.lambda_final = 0.1;
ParVal.T_initial = 5;
ParVal.T_final = 10;
%% Training Neural Gas Network
NGNnetwok = GasNN(X, ParVal);
%% Vector to image and plot
Weight=sum(round(rescale(NGNnetwok.w,1,ParVal.N)));
Weight=round(rescale(Weight,1,ParVal.N));
indexed=reshape(Weight(1,:),size(img));
segmented = label2rgb(indexed);
% Plot Res
figure('units','normalized','outerposition',[0 0 1 1])
subplot(2,2,1)
imshow(Org,[]); title('Original');
subplot(2,2,2)
imshow(img,[]); title('Grey');
subplot(2,2,3)
imshow(segmented);
title(['Segmented in [' num2str(ParVal.N) '] Segments']);
subplot(2,2,4)
imshow(indexed,[]);
title(['Quantized in [' num2
🌈3 Matlab代码实现
🎉4 参考文献
部分理论来源于网络,如有侵权请联系删除。
[1]张烨,樊一超,许艇,郭艺玲.基于轻量化图像分割的物流车辆特征定位研究[J].浙江工业大学学报,2020,48(04):426-434.