📄 localhist.m
字号:
% Program No:6
% Write an M-function for performing local histogram equalization
% function localhist(x)
f=imread('im_1_cameraman.tif');
f=im2double(f);
w=input('\nEnter the Neighborhood or Window size : ');
k=input('\nEnter the value of the constant k (value should be between 0 and 1) : ');
M=mean2(f);
z=colfilt(f,[w w],'sliding',@std);
m=colfilt(f,[w w],'sliding',@mean);
A=k*M./z;
g=A.*(f-m)+m;
imshow(f), figure, imshow(g);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -