LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::susanDenoise Class Reference

The susan denoiser enhances pictures by removing the noise from any colour channel. More...

#include <ltiSusanDenoise.h>

Inheritance diagram for lti::susanDenoise:
Inheritance graph
[legend]
Collaboration diagram for lti::susanDenoise:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 the parameters for the class susanDenoise More...

Public Member Functions

 susanDenoise ()
 susanDenoise (const susanDenoise &other)
virtual ~susanDenoise ()
virtual const char * getTypeName () const
bool apply (channel8 &srcdest) const
bool apply (channel &srcdest) const
bool apply (const channel8 &src, channel8 &dest) const
bool apply (const channel &src, channel &dest) const
susanDenoisecopy (const susanDenoise &other)
virtual functorclone () const
const parametersgetParameters () const

Static Protected Member Functions

static void setupBrightnessLUT (lti::ubyte *bp, int thresh, int form)
static void susanSmoothing (int threeByThree, lti::ubyte *in, lti::ubyte *&out, float dt, int xSize, int ySize, lti::ubyte *bp)
static int enlarge (lti::ubyte *&in, lti::ubyte *tmp_image, int &xSize, int &ySize, const int &border)

Detailed Description

The susan denoiser enhances pictures by removing the noise from any colour channel.

Most times it gives good results in just denoising the intensity channel. It might (in very few cases) be better to denoise every channel if the noise strongly differs between them.

   lti::susanDenoise denoiser;  // the susan denoiser
   lti::susanDenoise::parameters param;

   param.kernelSize=9;
   param.threshold=12;

   denoiser.setParameters(param);

   denoiser.apply(chnl_in,chnl_out);

The parameter kernelSize accepts two values: 9 and 37. It specifies the number of pixels around the center to use to calculate a value for the new pixel. The large value (37) results in very good pictures and the small one (9) makes the algorithm about 10 times faster. Giving another value will result in kernelSize become 37.

To denoise a single frame the denoiser must be told the maximum value of the noise (i.e. +/- 9 gray values). The greater this value the more blury the picture becomes. To determine the optimal value it is recomended to examine a light area of a picture: Adjust the threshold until the noise of this area disappears and then don't raise it any more.

There are four ways to call the denoiser:

   denoiser.apply(channel8 chnl,channel8 chnl2);
   denoiser.apply(channel8 chnl2);
   denoiser.apply(channel chnl,channel chnl2);
   denoiser.apply(channel chnl2);

The first call ist the fastest one. If it is possible use this method.


Constructor & Destructor Documentation

lti::susanDenoise::susanDenoise (  ) 

default constructor

lti::susanDenoise::susanDenoise ( const susanDenoise other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::susanDenoise::~susanDenoise (  )  [virtual]

destructor


Member Function Documentation

bool lti::susanDenoise::apply ( const channel src,
channel dest 
) const [virtual]

operates on a copy of the given parameters.

Parameters:
src channel with the source data.
dest channel where the result will be left.
Returns:
true if ok, false otherwise.

Reimplemented from lti::modifier.

bool lti::susanDenoise::apply ( const channel8 src,
channel8 dest 
) const [virtual]

operates on a copy of the given parameters.

This ist the fastest implementation of the susan denoiser. All other apply-functions call this one. It is strongly recommended that you use this "apply" for maximum speed!

Parameters:
src channel8 with the source data.
dest channel8 where the result will be left.
Returns:
true if ok, false otherwise.

Reimplemented from lti::modifier.

bool lti::susanDenoise::apply ( channel srcdest  )  const [virtual]

operates on the given parameter.

Parameters:
srcdest channel with the source data. The result will be left here too.
Returns:
true if ok, false otherwise.

Reimplemented from lti::modifier.

bool lti::susanDenoise::apply ( channel8 srcdest  )  const [virtual]

operates on the given parameter.

Parameters:
srcdest channel8 with the source data. The result will be left here too.
Returns:
true if ok, false otherwise.

Reimplemented from lti::modifier.

virtual functor* lti::susanDenoise::clone (  )  const [virtual]

returns a pointer to a clone of the functor.

Implements lti::functor.

susanDenoise& lti::susanDenoise::copy ( const susanDenoise other  ) 

copy data of "other" functor.

Reimplemented from lti::functor.

static int lti::susanDenoise::enlarge ( lti::ubyte *&  in,
lti::ubyte tmp_image,
int &  xSize,
int &  ySize,
const int &  border 
) [static, protected]

create a border around the image data pointed by "in" using tmpImage as temporary buffer.

The pointer "in" and the xSize and ySize variables will be updated

const parameters& lti::susanDenoise::getParameters (  )  const

returns used parameters

Reimplemented from lti::modifier.

virtual const char* lti::susanDenoise::getTypeName (  )  const [virtual]

returns the name of this type ("susanDenoise")

Reimplemented from lti::modifier.

static void lti::susanDenoise::setupBrightnessLUT ( lti::ubyte bp,
int  thresh,
int  form 
) [static, protected]

This function is called by susan_smoothing.

Don't call it yourself.

Parameters:
bp pointer to the brightnes table
thresh brightnis threshold
form form of the evaluation function
static void lti::susanDenoise::susanSmoothing ( int  threeByThree,
lti::ubyte in,
lti::ubyte *&  out,
float  dt,
int  xSize,
int  ySize,
lti::ubyte bp 
) [static, protected]
Parameters:
threeByThree flag for speed mode: if threeByThree is 1 the smaller kernel (size 9) ist taken, else this value must be 0.
in pointer to the ubyte array of the input image channel
out pointer to the ubyte array of the output image channel
dt distance threshold - only used if threeByThree is 0. It defines the size of the USAN.
xSize x-resolution (columns) of the frame
ySize y-resolution (rows) of the frame
bp pointer to the brightnes table generated by setupBrightnessLUT

The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:27:55 2010 for LTI-Lib by Doxygen 1.6.1