% Write an M-function for performing local histogram equalization

function localhist(x)
f=imread(x);
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);
end

大家能告诉我
A=k*M./z;   
g=A.*(f-m)+m; 
这两个式子具体代表什么含义吗?
我现在这些代码我都看得懂,就是不知道这两行代码要实现的是什么目的.