Image Interpolation with Contour Stencils
|
Select the best-fitting contour stencils. More...
#include "basic.h"
Go to the source code of this file.
Functions | |
int | FitStencils (int *Stencil, int32_t *Image, int Width, int Height, int StencilMul) |
Select the best-fitting contour stencils. More... | |
Select the best-fitting contour stencils.
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 fitsten.h.
int FitStencils | ( | int * | Stencil, |
int32_t * | Image, | ||
int | Width, | ||
int | Height, | ||
int | StencilMul | ||
) |
Select the best-fitting contour stencils.
Stencil | pointer to array of size Width by Height to be filled with the best-fitting stencil for each pixels |
Image | the input RGB image |
Width,Height | image dimensions |
StencilMul | multiply the stencil index by this factor |
FitStencils
finds the best-fitting stencil at each pixel of the input image
to estimate the local contour orientation. The result Stencil
is a two-dimensional array with the index (0, 1, ..., or 7) of the best-fitting stencil for each pixel. The stencil TV estimates are filtered by [1,2,1; 2,4,2; 1,2,1]/16 to improve reliability.
For efficiency in CWFirstPass
and CWCorrectionPass
, the stencil indices are multiplied by StencilMul
(so that the index may be used directly as an offset into the samples table).
Definition at line 70 of file fitsten.c.