Padding at the Edge of an Image Filter

A filter window near an edge may reference positions outside the image. Padding supplies values under an explicit extension rule.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace the first sample
  2. Check constant regions

Trace the first sample

For samples 3 and 6, a centered width-three mean on the first position gives three under left zero padding. Repeating the first sample instead gives four. Local averaging supplies that calculation.

Check constant regions

A constant image can develop dark edges under zero padding even when interior averages equal the constant. Test borders separately from interiors. See boundary test cases.[1][2]

References

  1. scikit-image Contributors, NumPy Images and Coordinate Conventions ↩
  2. scikit-image Contributors, Image Data Types and Representable Values ↩