Linear Methods for Image Interpolation
Defines | Functions
lkernels.c File Reference

Interpolation kernel and basis functions for linear interpolation. More...

#include <math.h>
#include <string.h>
#include "lkernels.h"
Include dependency graph for lkernels.c:

Go to the source code of this file.

Defines

#define M_PI   3.14159265358979323846264338327950288
 The constant pi.
#define NUMEL(x)   (sizeof(x)/sizeof(*(x)))
 Macro to get the number of elements in a static array.

Functions

float NearestNeighborKernel (float x)
 Bilinear interpolation kernel (KernelRadius = 0.5)
interpmethodGetInterpMethod (const char *Name)
 Get the interpmethod struct for an interpolation method by name.

Detailed Description

Interpolation kernel and basis functions for linear interpolation.

Author:
Pascal Getreuer <getreuer@gmail.com>

Copyright (c) 2010-2011, Pascal Getreuer All rights reserved.

This program is free software: you can use, modify and/or redistribute it under the terms of the simplified BSD License. You should have received a copy of this license along this program. If not, see <http://www.opensource.org/licenses/bsd-license.html>.

Definition in file lkernels.c.


Define Documentation

#define M_PI   3.14159265358979323846264338327950288

The constant pi.

Definition at line 22 of file lkernels.c.

#define NUMEL (   x)    (sizeof(x)/sizeof(*(x)))

Macro to get the number of elements in a static array.

Definition at line 26 of file lkernels.c.


Function Documentation

interpmethod* GetInterpMethod ( const char *  Name)

Get the interpmethod struct for an interpolation method by name.

Parameters:
Namename of the interpolation method
Returns:
pointer to interpmethod struct on success, null pointer on failure.

Choices are

  • "nearest"
  • "bilinear"
  • "bicubic"
  • "lanczosN" with N = 2, 3, or 4
  • "schaumN" with N = 2 or 3
  • "bsplineN" with N = 2, 3, 5, 7, 9, or 11
  • "omomsN" with N = 3, 5 or 7

Definition at line 492 of file lkernels.c.

Here is the caller graph for this function:

float NearestNeighborKernel ( float  x)

Bilinear interpolation kernel (KernelRadius = 0.5)

Parameters:
xcoordinate at which to evaluate the kernel
Returns:
the kernel value at x

Definition at line 34 of file lkernels.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines