Handling edge cases Corner and edge pixels do not have a 4x4 neighbourhood so interpolated their values using the nearest neighbour method which involves setting their value to the that of the nearest known pixel but other techniques like clamping, mirroring and wrapping can be used to interpolate their values.