Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bicubic Spline Interpolation

Bicubic spline interpolation is an arithmetic method commonly used for resizing images and performing smooth interpolation of pixel values. This guide explains how to perform bicubic interpolation in Python using the Pillow library.


Table of Contents

  1. Introduction
  2. Prerequisites
  3. Installation
  4. Usage Example

Introduction

Bicubic interpolation is a technique that considers the values of nearby pixels to calculate new pixel values. Compared to other interpolation methods, such as bilinear, bicubic interpolation offers smoother results, making it ideal for scaling images. The parallel implementation is running on 3 CPU cores and is calculating the interpolation for each color channel on parallel.


Prerequisites

Before diving in, ensure you have the following:

  • Python 3.6 or newer.
  • The Pillow library for image manipulation.

Installation

Install Pillow using pip:

pip install pillow

Usage Example

Below is a step-by-step example demonstrating how to use bicubic interpolation with Pillow to resize an image.

python3 bsisequential.py <Input Image> <Multiplicative Factor> <Output Image>

or

python3 bsiparallel.py <Input Image> <Multiplicative Factor> <Output Image>

Metrics

About

This repository implements the comparison of Bicubic Spline Interpolation in Python and C++, a powerful technique for smooth and accurate interpolation of images in two dimensions.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages