AVIR
High-quality pro image resizing library
 All Classes Files Functions Variables Typedefs Macros
Public Member Functions | List of all members
avir::CDSPWindowGenPeakedCosine Class Reference

#include <avir.h>

Public Member Functions

 CDSPWindowGenPeakedCosine (const double aAlpha, const double aLen2)
 
double generate ()
 

Detailed Description

Peaked Cosine window function generator class.

Class implements Peaked Cosine window function generator. Generates the right-handed half of the window function. The Alpha parameter of this window function offers the control of the balance between the early and later taps of the filter. E.g. at Alpha=1 both early and later taps are attenuated, but at Alpha=4 mostly later taps are attenuated. This offers a great control over ringing artifacts produced by a low-pass filter in image processing, without compromising achieved image sharpness.

Constructor & Destructor Documentation

avir::CDSPWindowGenPeakedCosine::CDSPWindowGenPeakedCosine ( const double  aAlpha,
const double  aLen2 
)

Constructor initializes *this window function generator.

Parameters
aAlphaAlpha parameter, affects the peak shape (peak augmentation) of the window function. Any positive value can be used.
aLen2Half filter's length (non-truncated).

Member Function Documentation

double avir::CDSPWindowGenPeakedCosine::generate ( )
Returns
The next Peaked Cosine window function coefficient.