图像模糊处理
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
给定 行 列的图像各像素点的灰度值,要求用如下方法对其进行模糊化处理:
四周最外侧的像素点灰度值不变;
中间各像素点新灰度值为该像素点及其上下左右相邻四个像素点原灰度值的平均(舍入到最接近的整数)。
输入格式
第一行包含两个整数 和 ,表示图像包含像素点的行数和列数。,。
接下来 行,每行 个整数,表示图像的每个像素点灰度。相邻两个整数之间用单个空格隔开,每个元素均在 ∼ 之间。
输出格式
行,每行 个整数,为模糊处理后的图像。相邻两个整数之间用单个空格隔开。
输入输出样例 #1
输入 #1
4 5
100 0 100 0 50
50 100 200 0 0
50 50 100 100 200
100 100 50 50 100
输出 #1
100 0 100 0 50
50 80 100 60 0
50 80 100 90 200
100 100 50 50 100
龙凤苑中学3.26
- Status
- Done
- Rule
- IOI
- Problem
- 3
- Start at
- 2025-3-26 16:30
- End at
- 2025-3-26 18:30
- Duration
- 2 hour(s)
- Host
- Partic.
- 19