TransWikia.com

Different type of padding in image?

Signal Processing Asked by Ritika malik on December 22, 2020

I want to implement a gradient operator on an image in Matlab. Should I have to pad the image before its implementation? How do I decide which padding to use e.g. whether to use zero-padding or Symmetric padding? How are they differ from each other? I am new to this field of image processing, Can you provide some references to learn this stuff?

One Answer

Gradients enhances differences. Hence, highly non-smooth padding (like zero-padding) yields higher gradients, as they don't ensure continuity. Symmetric extensions preserve continuity, and anti-symmetric ones are likely to better preserve derivatives. There is a lot of literature on that, for instance in the filter bank domain. Suppose that the edge sample is $x[0]$, you can have whole-sample anti-symmetry or half-sample anti-symmetry:

  • $x[-1] = -x[1]+2x[0] $
  • $x[-1] = x[0] $ and $x[-2] = -x[1]+2x[0] $

This is illustrated in the picture, from the first paper mentioned below. One can find whole-sample (WS) and half-sample (HS) symmetries and anti-symmetries. A lot of image processing operators combine symmetry or anti-symmetry, so those can be useful.

Lifted linear phase filter banks and the polyphase-with-advance representation [JPEG 2000 image coding applications

A couple of pointers:

Recently, unitary FIR filter banks with linear-phase have been completely parameterized by exploiting the eigenstructure of the exchange matrix. This correspondence gives new characterizations of polyphase matrices of filter banks with various types of symmetry on the filters. Using matrix extensions of the well-known hyperbolic and orthogonal lattices, we give a alternative proof for the parameterization of linear-phase unitary filter banks. A complete parameterization of FIR unitary filter banks with each of the different types of symmetries considered (not just linear-phase) is also given. These results can also be used to generate non-unitary filter banks with symmetries, though no completeness results can be obtained. In some cases implicit, and in others explicit parameterization of wavelet tight frames associated with these filter banks are also given. This paper only considers filter banks with an even number of channels. A similar theory can be developed if the number of channels is an odd integer.

Aside, there are many other possible extensions, using constant continuation (or pixel replication), or higher-order (eg linear, polynomial) extrapolations:

Correct answer by Laurent Duval on December 22, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP