基于PCNN卷积神经网络的图像去噪仿真
X1=(double(imread('2.bmp')));
X = X1(:,:,2);
figure;
imshow((X),[]);
Weight=[0.5 1 0.5;1 0 1;0.5 1 0.5];%3*3临近神经元连接权重矩阵
Beta = 0.1;%连接强度常数
Yuzhi = 256;
Decay = 0.1;%衰减时间常数
[a,b]=size(X);
Threshold = zeros(a,b);%神经元阈值矩阵
S= zeros(a+2,b+2);%用于存储邻近神经元的输出
B= zeros(a,b);%标记样板,表明该PIXEL是否被激活过
Y=zeros(a,b);%结果矩阵
T=zeros(a,b);
Edge= zeros(a,b);%边缘图
n=1;