Image pyramid is widely used in computer vision which allow us to convert an image / frame to a different size ( smaller or larger ) than its original size. There are two possible method available in openCV which allow us to up size and down size an image.
A collection of images, all of them are transformed from an original image / frame ( either down sampled or up sampled )
Provides two type of image pyramids
Gaussian pyramid ( used to down sample image / frame)
Laplacian pyramid ( use to up sample image / frame)
A set of reduced images, added on top of each other will construct a pyramid (higher the layer, smaller the size ). To produce the reduced layer of images the two steps are involved in Gaussian pyramid (Convolve with a Gaussian kernel and remove every even number row and column) . The resulting image will be exactly one quarter of its predecessor. Iterating on original image will produce different layers of pyramid. OpenCV provides pyrDown function ( using Gaussian pyramid ) to down size the image.
To up size the image twice of its original size in each dimension, add even rows and columns filled with zeros and then approximate the values of missing image pixels by performing convolution with the similar kernal discussed above. OpenCV provides pyrUp function ( using Gaussian pyramid ) to up size the image.