您的位置:首页 > 其它

img 直方图均衡化

2013-04-14 22:28 106 查看


>> i=imread('4.jpg');
>> i=im2double(i);
>> %对于对比度较大的图像
>> i1=2*i-55/255;
>> subplot(4,4,1);
>> imshow(i1);
>> subplot(4,4,2);
>> imhist(i1);
>> subplot(4,4,3);
>> imshow(histeq(i1));
>> subplot(4,4,4);
>> imhist(histeq(i1));
>> %对于对比度较小的图像
>> i2=0.5*i+55/255;
>> subplot(4,4,5);
>> imshow(i2);
>> subplot(4,4,6);
>> imhist(i2);
>> subplot(4,4,7);
>> imshow(histeq(i2));
>> subplot(4,4,8);
>> imhist(histeq(i2));
>> %对于线性增加亮度的图像
>> i3=i+55/255;
>> subplot(4,4,9);
>> imshow(i3);
>> subplot(4,4,10);
>> imhist(i3);
>> subplot(4,4,11);
>> imshow(histeq(i3));
>> subplot(4,4,12);
>> imhist(histeq(i3));
>> %对于线性减小亮度的图像
>> i4=i-55/255;
>> subplot(4,4,13);
>> imshow(i4);
>> subplot(4,4,14);
>> imhist(i4);
>> subplot(4,4,15);
>> imshow(histeq(i4));
>> subplot(4,4,16);
>> imhist(histeq(i4));
>>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: