Skip to content

This is the function to interpolate any image using different Interpolation technique

Notifications You must be signed in to change notification settings

sunnyiisc/Image-Conversions

Repository files navigation

Image-Conversions

This repository had several functions and their working code for several Image Conversions as follows:

  • Color to GrayScale Conversion
  • Color to Binary Conversion
  • Image Interpolation

Sample Images Folder - 'Image_Samples' click here

Color to Grayscale Conversion:

The RBG image consists of 3 bands 'Red', 'Green' and 'Blue'. This three bands can be combined to get a single grayscale band according the formula given ITU Recommendation (Rec. 601) as

$$ Y = (0.299 \times R) + (0.587 \times G) + (0.114 \times B) $$

  • Function for RGB to Gray. click here
  • Main code for RGB to Gray Conversion with 'Lena' Image. click here

Result on Lena Image: color_to_grayscale

Image Interpolation:

Image interpolation can be used to increase the size of an image.

  • Function for Image Interpolation. click here
  • Code for interpolation of RGB 'Lena' Image by some factor. - Function for RGB to Gray. click here

Result on Lena Image for interpolation with a factor of 8: interpolation_scipy

About

This is the function to interpolate any image using different Interpolation technique

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages