Image Pyramid using OpenCV | Python
Image Pyramids are one of the most beautiful concept of image processing.Normally, we work with images with default resolution but many times we need to change the resolution (lower it) or resize the original image in that case image pyramids comes handy.
pyrUp() function increases the size to double of its original size and
pyrDown() function decreases the size to half. If we keep the original image as a base image and go on applying
pyrDown function on it and keep the images in a vertical stack, it will look like a pyramid. The same is true for upscaling the original image by
Once we scale down and if we rescale it to the original size, we lose some information and the resolution of the new image is much lower than the original one.
Below is an example of Image Pyramiding –
Advantages of Image pyramids:
- Lowering of resolution
- Getting various sizes of image
- Image Blending
- Edge detection
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course