Image Interpolation with Contour Stencils
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Functions
cwinterp.h File Reference

Contour stencil windowed interpolation. More...

#include "basic.h"
Include dependency graph for cwinterp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cwparams
 struct of interpolation parameters More...
 

Functions

int32_t * PreCWInterp (cwparams Param)
 Precomputations before windowed interpolation CWInterp. More...
 
int CWInterp (uint32_t *Output, const uint32_t *Input, int InputWidth, int InputHeight, const int32_t *Psi, cwparams Param)
 Contour stencil windowed interpolation. More...
 
int CWInterpEx (uint32_t *Output, int OutputWidth, int OutputHeight, const uint32_t *Input, int InputWidth, int InputHeight, const int32_t *Psi, cwparams Param)
 Contour stencil windowed interpolation for arbitrary scale factors. More...
 
int DisplayContours (uint32_t *Output, int OutputWidth, int OutputHeight, uint32_t *Input, int InputWidth, int InputHeight, cwparams Param)
 Display the estimated contour orientations. More...
 

Detailed Description

Contour stencil windowed interpolation.

Author
Pascal Getreuer getre.nosp@m.uer@.nosp@m.gmail.nosp@m..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 cwinterp.h.

Function Documentation

int CWInterp ( uint32_t *  Output,
const uint32_t *  Input,
int  InputWidth,
int  InputHeight,
const int32_t *  Psi,
cwparams  Param 
)

Contour stencil windowed interpolation.

Parameters
Outputpointer to memory for holding the interpolated image
Inputthe input image
InputWidth,InputHeightinput image dimensions
Psi$\psi$ samples computed by PreCWInterp
Paramcwparams struct of interpolation parameters

Definition at line 847 of file cwinterp.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int CWInterpEx ( uint32_t *  Output,
int  OutputWidth,
int  OutputHeight,
const uint32_t *  Input,
int  InputWidth,
int  InputHeight,
const int32_t *  Psi,
cwparams  Param 
)

Contour stencil windowed interpolation for arbitrary scale factors.

Parameters
Outputpointer to memory for holding the interpolated image
OutputWidth,OutputHeightoutput image dimensions
Inputthe input image
InputWidth,InputHeightinput image dimensions
Psi$\psi$ samples computed by PreCWInterp
Paramcwparams struct of interpolation parameters

Definition at line 1270 of file cwinterp.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int DisplayContours ( uint32_t *  Output,
int  OutputWidth,
int  OutputHeight,
uint32_t *  Input,
int  InputWidth,
int  InputHeight,
cwparams  Param 
)

Display the estimated contour orientations.

Definition at line 1391 of file cwinterp.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int32_t* PreCWInterp ( cwparams  Param)

Precomputations before windowed interpolation CWInterp.

Parameters
Paramcwparams struct of interpolation parameters
Returns
Pointer to $\psi$ samples array, or null on failure

PreCWInterp precomputes samples of the $\psi$ functions,

\[ \psi^n_\mathcal{S}(x) = \sum_{m\in\mathcal{N}} (A_\mathcal{S})^{-1}_{m,n} \varphi^m_\mathcal{S}(x - m). \]

The routine allocates memory to store the samples and returns a pointer to this memory. It is the responsibility of the caller to call free on this pointer when done to release the memory.

A non-null pointer indicates success. On failure, the returned pointer is null.

Definition at line 319 of file cwinterp.c.

Here is the caller graph for this function: