Question:

Applying a 3 × 3 mean filter centered on the grey shaded pixel in the input image, shown below, will result in an output value of __________ (Answer in integer).
Input image

Show Hint

Take the average of all 9 pixel values in the 3x3 window centred on the shaded pixel.
Updated On: Jul 20, 2026
Show Solution
collegedunia
Verified By Collegedunia

Correct Answer: 3

Solution and Explanation

Step 1: Identify the 3x3 neighbourhood.
The grey shaded pixel has value 5. Reading the input image, the 3x3 block of pixels centred on this shaded pixel is \[ \begin{bmatrix} 0 & 1 & 3 \\ 2 & 5 & 4 \\ 8 & 3 & 1 \end{bmatrix} \]

Step 2: Recall the mean filter operation.
A 3x3 mean (averaging) filter replaces the centre pixel's value with the arithmetic mean of all 9 pixel values in its 3x3 neighbourhood (including the centre pixel itself): \[ g(x,y) = \frac{1}{9} \sum_{i=-1}^{1}\sum_{j=-1}^{1} f(x+i, y+j) \]

Step 3: Sum the 9 neighbourhood values.
\[ 0 + 1 + 3 + 2 + 5 + 4 + 8 + 3 + 1 = 27 \]

Step 4: Divide by 9 to get the mean.
\[ g(x,y) = \frac{27}{9} = 3 \] This is already an integer, so no rounding is needed. \[ \boxed{\text{Output value} = 3} \]
Was this answer helpful?
0
0