免费试用:最火的人工智能查询工具
     最强AI人工智能聊天工具
     对话机器人解答疑难问题
星外智问直连原始API接口
➡️未登录受限条数,请登陆使用完整服务>>>➡️
请输入您要问的问题:


查下百度  查下必应

以下是单个问题的回复:

问:1.实验内容:对一灰度图像,选择不同的灰度级变换函数s=T(r)实现图像的灰度范围线性扩展和非线性扩展,以及图像的灰度倒置和二值化。 2.实验方法和程序 1.选择一副图像lena,设置输入输出变换灰度级范围 ,a=0.3,b=0.6,c=0.1,d=0.9 2.设置非线性扩展函数的参数c-2 3.采用灰度倒置变换函数s-255-进行图像变换。 4.设置二值化图像的阈值,分别为level=0.4,level=0.7 写出该实验的matlab程序
GPT答: 7i24.cn
% 读取lena图像
I = imread('lena.jpg');

% 灰度范围线性扩展
a = 0.3;
b = 0.6;
c = 0.1;
d = 0.9;

linear_expanded_I = imadjust(I, [a b], [c d]);

% 非线性扩展
gamma = 2;

nonlinear_expanded_I = imadjust(I, [], [], gamma);

% 灰度倒置
inverted_I = imcomplement(I);

% 图像二值化
level1 = 0.4;
level2=0.7;

binary_I1=imbinarize(I, level1);
binary_I2=imbinarize(I, level2);

% 显示结果图像
subplot(3,3,1),imshow(I),title('原始图像');
subplot(3,3,4),imshow(linear_expanded_I),title('灰度范围线性扩展');
subplot(3,3,5),imshow(nonlinear_expanded_I),title('非线性扩展');
subplot(3,3,[7]),imshow(inverted_I),title('灰度倒置');
subplot(3 ,8,[10]), imshow(binary_ I1) , title ('二值化(level- O .4)');
 subplot (338) , imshow ( binary_ I2 ) , title ('二值化(level- O .7)' ) ;
一星  二星  三星  四星  五星 

互联网非法外之地,请不要输入不良内容
 查下百度 查下必应 2024-03-25 17:59:05



chatGPT中国版--星外智问--8v6.CN
当前运行网址:ask.7i24.com
客服微信:xwgdd_com APP下载 怎么问 识别真假GPT4 使用GPT赚钱 退出登陆