Image Smoother
题目描述
Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray scale of each cell becomes the average gray scale (rounding down) of all the 8 surrounding cells and itself. If a cell has less than 8 surrounding cells, then use as many as you can.
题目链接
https://leetcode.com/problems/image-smoother/description/
Java
题目要求算出每个点的附近点的平均灰度,设要求的点(i,j)附近点范围(i-1~i+1,j-1~j+1)
Last updated