clear all;
imageA1 = imread('D:\MATLAB\bin\lena.bmp'); %读取图像
[row,col,th] = size(imageA1); %获取图像尺寸
imageA2 = double(imageA1); %将图像中像素转换为浮点型
imageA = imageA2+normrnd(0,10,[row,col,th]); %给图像加均值为0,标准差为10的高斯噪声
imageA = uint8(imageA); %像素值类型转换
figure;
subplot(121);imshow(imageA1);
subplot(122);imshow(imageA); %显示图像
学习笔记:matlab给图像加高斯噪声
最新推荐文章于 2025-02-13 09:00:00 发布