I want to solve the equation (1,2) in the attached picture which (2) tells the local mean value of the window. But i don't have any idea about how to evaluate this equation using matlab code. I could only guess w indicates window size. If i fix w=5 in this equation (2), then m and n starts from negative values. What does g(m,n) means? Can anyone please help me to solve this concept? I have tried some coding and please helpme to solve this.