SurpriseControl< PIXTYPE, BETATYPE, FLOAT > Class Template Reference

Control surprise in a movie. More...

#include <Surprise/SurpriseControl.H>

Collaboration diagram for SurpriseControl< PIXTYPE, BETATYPE, FLOAT >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SurpriseControl (const ushort sizeX, const ushort sizeY)
InputAndInit

These methods are used to init the object and input maps and variables that affect the way SurpriseControl will work. These methods only need to be called once

void SCinit (const ushort sizeX, const ushort sizeY)
 Init the basic variables.
void SCsetMasterConspicBias (const FLOAT bias)
void SCuseMaxLevel (const bool useML)
 use max level from conspicuity map rather than sum the levels
void SCuseTemporal (const bool useTMP)
 Shoud we use the temporal component? default is yes.
void SCnormalizeBiasWithScale (const bool useNBS)
 normalize the biases with scale
void SCsetConspicBias (const FLOAT chan, const int chan_enum)
 Tell us we are going to use this channel and set the bias.
void SCsetMyScale (const ushort scale)
 give me my scale if any
void SCsetAxisBias (const FLOAT X, const FLOAT Y, const FLOAT Z)
 set the bias over a single axis
void SCsetH2SVBias (const FLOAT H1, const FLOAT H2, const FLOAT S, const FLOAT V)
 set the bias per H2SV channel on output
void SCsetLambda (const FLOAT lambda)
 set the decay term over the beta map
void SCsetTargetFrame (const uint frame)
 set which frame if any is a target frame
void SCsetOriginalImageWeight (const FLOAT origImageBias)
 set how much the original image will be combined back
void SCcreateAndersonSepFilters (const ushort size)
 create the seperable filters per image
void SCcreateSepFilters (const FLOAT spatSigma, const FLOAT tempSigma, const FLOAT stdDevSize)
 create the seperable filters per image
void SCfindConvolutionEndPoints ()
 find parameters over convolution
InputPerFrame

These methods need to be feed data per frame such as the saliency map and the raw image for each frame. These should be called each frame.

void SCinputRawImage (const Image< PixRGB< FLOAT > > &rawImage)
 input the raw image frame for processing
void SCinputSalMap (const Image< FLOAT > &salMap)
 input the salmap for this frame
void SCinputConspicMap (const Image< FLOAT > &cmap, const int cmap_enum)
 input the intensity conspicuity map for this frame
InputOptional

These methods allow optional masks or bayes weight images to be set

void SCinputBayesWeightImage (const Image< FLOAT > &bayesImage)
 Input a bayes weight image to bias surprise reduction.
void SCinputMaskImage (const Image< FLOAT > &maskImage)
 Input an independant mask to control where we apply the filter.
RunPerFrame

Call to SCprocessFrameSeperable to run each frame. It should call SCcomputeNewBeta and SCseperateConv for you.

void SCcomputeNewBeta ()
 compute new betaImage values
void SCprocessFrameSeperable ()
 process a single frame of video using seperable filters
void SCcomputeLocalBias ()
 find the local channel biases
void SCseperateConvXYZ ()
 Helper method to call SCseperateConv over x,y and z.
void SCseperateConvXY ()
 Helper method to call SCseperateConv over x,y but not z.
void SCseperateConv (const char axis)
 process each axis by itself
Output

Output from each frame can be obtained by calling these methods

Image< PixRGB< FLOAT > > SCgetSharpened (const PIXTYPE scale_factor) const
 get the alternative surprise increased version of the image
Image< PixRGB< FLOAT > > SCgetFrame () const
 process and return the final image
Image< PixRGB< FLOAT > > SCgetOutImage () const
 process and return the filtered image
Image< PixRGB< FLOAT > > SCgetInImage () const
 Return the temporal offset input image.
Image< PIXTYPE > SCgetRawOutImage () const
 get the raw PIXTYPE output image
Image< PIXTYPE > SCgetRawInImage () const
 get the input image converted as PIXTYPE
Image< BETATYPE > SCgetBetaImage () const
 get the beta image of smoothed salMaps used in filter
ushort SCgetTemporalOffset () const
 Get the temporal offset we are using.
bool SCisOutputReady () const
 Is the output ready?
void SCgetLocalBiasImages (Image< FLOAT > &H1, Image< FLOAT > &H2, Image< FLOAT > &S, Image< FLOAT > &V) const
 Get the local bias maps proportional to effect.
void SCgetSeperableParts (Image< PIXTYPE > &Zimg, Image< PIXTYPE > &Yimg) const
 Get the y and z parts of the seperable filter.

Detailed Description

template<class PIXTYPE, class BETATYPE, class FLOAT>
class SurpriseControl< PIXTYPE, BETATYPE, FLOAT >

Control surprise in a movie.

Definition at line 139 of file SurpriseControl.H.


Member Function Documentation

template<class PIXTYPE , class BETATYPE , class FLOAT >
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCcomputeLocalBias (  )  [inline]
template<class PIXTYPE , class BETATYPE , class FLOAT >
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCcomputeNewBeta (  )  [inline]
template<class PIXTYPE , class BETATYPE , class FLOAT >
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCcreateAndersonSepFilters ( const ushort  size  )  [inline]

create the seperable filters per image

Definition at line 251 of file SurpriseControl.C.

template<class PIXTYPE , class BETATYPE , class FLOAT>
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCcreateSepFilters ( const FLOAT  spatSigma,
const FLOAT  tempSigma,
const FLOAT  stdDevSize 
) [inline]

create the seperable filters per image

Definition at line 320 of file SurpriseControl.C.

References exp(), and sqrt().

template<class PIXTYPE , class BETATYPE , class FLOAT >
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCfindConvolutionEndPoints (  )  [inline]

find parameters over convolution

Definition at line 413 of file SurpriseControl.C.

References Image< T >::beginw(), and Image< T >::resize().

template<class PIXTYPE , class BETATYPE , class FLOAT >
Image< BETATYPE > SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCgetBetaImage (  )  const [inline]

get the beta image of smoothed salMaps used in filter

Definition at line 1516 of file SurpriseControl.C.

References Image< T >::beginw(), Image< T >::endw(), and Image< T >::resize().

template<class PIXTYPE , class BETATYPE , class FLOAT >
Image< PixRGB< FLOAT > > SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCgetFrame (  )  const [inline]

process and return the final image

Definition at line 1408 of file SurpriseControl.C.

References Image< T >::beginw(), Image< T >::endw(), and Image< T >::resize().

template<class PIXTYPE , class BETATYPE , class FLOAT >
Image< PixRGB< FLOAT > > SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCgetInImage (  )  const [inline]

Return the temporal offset input image.

Definition at line 1452 of file SurpriseControl.C.

References Image< T >::begin(), Image< T >::beginw(), Image< T >::endw(), Image< T >::getHeight(), Image< T >::getWidth(), and Image< T >::resize().

template<class PIXTYPE , class BETATYPE , class FLOAT>
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCgetLocalBiasImages ( Image< FLOAT > &  H1,
Image< FLOAT > &  H2,
Image< FLOAT > &  S,
Image< FLOAT > &  V 
) const [inline]

Get the local bias maps proportional to effect.

Definition at line 1554 of file SurpriseControl.C.

References Image< T >::beginw(), Image< T >::endw(), and Image< T >::resize().

template<class PIXTYPE , class BETATYPE , class FLOAT >
Image< PixRGB< FLOAT > > SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCgetOutImage (  )  const [inline]

process and return the filtered image

Definition at line 1431 of file SurpriseControl.C.

References Image< T >::begin(), Image< T >::beginw(), Image< T >::endw(), Image< T >::getHeight(), Image< T >::getWidth(), and Image< T >::resize().

template<class PIXTYPE , class BETATYPE , class FLOAT >
Image< PIXTYPE > SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCgetRawInImage (  )  const [inline]

get the input image converted as PIXTYPE

Definition at line 1495 of file SurpriseControl.C.

References Image< T >::beginw(), Image< T >::endw(), and Image< T >::resize().

template<class PIXTYPE , class BETATYPE , class FLOAT >
Image< PIXTYPE > SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCgetRawOutImage (  )  const [inline]

get the raw PIXTYPE output image

Definition at line 1487 of file SurpriseControl.C.

template<class PIXTYPE, class BETATYPE , class FLOAT >
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCgetSeperableParts ( Image< PIXTYPE > &  Zimg,
Image< PIXTYPE > &  Yimg 
) const [inline]

Get the y and z parts of the seperable filter.

Definition at line 1578 of file SurpriseControl.C.

References Image< T >::beginw(), Image< T >::endw(), and Image< T >::resize().

template<class PIXTYPE, class BETATYPE , class FLOAT >
Image< PixRGB< FLOAT > > SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCgetSharpened ( const PIXTYPE  scale_factor  )  const [inline]

get the alternative surprise increased version of the image

Definition at line 1351 of file SurpriseControl.C.

References Image< T >::begin(), Image< T >::beginw(), Image< T >::endw(), Image< T >::getHeight(), Image< T >::getWidth(), and Image< T >::resize().

template<class PIXTYPE , class BETATYPE , class FLOAT >
ushort SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCgetTemporalOffset (  )  const [inline]

Get the temporal offset we are using.

Definition at line 1538 of file SurpriseControl.C.

template<class PIXTYPE , class BETATYPE , class FLOAT >
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCinit ( const ushort  sizeX,
const ushort  sizeY 
) [inline]

Init the basic variables.

Definition at line 160 of file SurpriseControl.C.

References Image< T >::beginw(), Image< T >::endw(), and Image< T >::resize().

template<class PIXTYPE , class BETATYPE , class FLOAT>
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCinputBayesWeightImage ( const Image< FLOAT > &  bayesImage  )  [inline]

Input a bayes weight image to bias surprise reduction.

Definition at line 646 of file SurpriseControl.C.

template<class PIXTYPE , class BETATYPE , class FLOAT>
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCinputConspicMap ( const Image< FLOAT > &  cmap,
const int  cmap_enum 
) [inline]

input the intensity conspicuity map for this frame

Definition at line 567 of file SurpriseControl.C.

References Image< T >::begin(), Image< T >::beginw(), Image< T >::getHeight(), Image< T >::getWidth(), normalizeScaleRainbow(), and Raster::WriteRGB().

template<class PIXTYPE , class BETATYPE , class FLOAT>
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCinputMaskImage ( const Image< FLOAT > &  maskImage  )  [inline]

Input an independant mask to control where we apply the filter.

Definition at line 656 of file SurpriseControl.C.

References getMinMax().

template<class PIXTYPE , class BETATYPE , class FLOAT>
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCinputRawImage ( const Image< PixRGB< FLOAT > > &  rawImage  )  [inline]

input the raw image frame for processing

Definition at line 502 of file SurpriseControl.C.

References Image< T >::beginw(), Image< T >::endw(), and rawImage.

template<class PIXTYPE , class BETATYPE , class FLOAT>
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCinputSalMap ( const Image< FLOAT > &  salMap  )  [inline]

input the salmap for this frame

Definition at line 544 of file SurpriseControl.C.

References Image< T >::getHeight(), and Image< T >::getWidth().

template<class PIXTYPE , class BETATYPE , class FLOAT >
bool SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCisOutputReady (  )  const [inline]

Is the output ready?

Definition at line 1546 of file SurpriseControl.C.

template<class PIXTYPE , class BETATYPE , class FLOAT >
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCnormalizeBiasWithScale ( const bool  useNBS  )  [inline]

normalize the biases with scale

Definition at line 105 of file SurpriseControl.C.

template<class PIXTYPE , class BETATYPE , class FLOAT >
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCprocessFrameSeperable (  )  [inline]
template<class PIXTYPE , class BETATYPE , class FLOAT >
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCseperateConv ( const char  axis  )  [inline]
template<class PIXTYPE , class BETATYPE , class FLOAT >
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCseperateConvXY (  )  [inline]

Helper method to call SCseperateConv over x,y but not z.

Definition at line 1110 of file SurpriseControl.C.

References SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCseperateConv().

Referenced by SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCprocessFrameSeperable().

template<class PIXTYPE , class BETATYPE , class FLOAT >
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCseperateConvXYZ (  )  [inline]

Helper method to call SCseperateConv over x,y and z.

Definition at line 1100 of file SurpriseControl.C.

References SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCseperateConv().

Referenced by SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCprocessFrameSeperable().

template<class PIXTYPE , class BETATYPE , class FLOAT>
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCsetAxisBias ( const FLOAT  X,
const FLOAT  Y,
const FLOAT  Z 
) [inline]

set the bias over a single axis

Definition at line 140 of file SurpriseControl.C.

template<class PIXTYPE , class BETATYPE , class FLOAT>
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCsetConspicBias ( const FLOAT  chan,
const int  chan_enum 
) [inline]

Tell us we are going to use this channel and set the bias.

Definition at line 122 of file SurpriseControl.C.

template<class PIXTYPE , class BETATYPE , class FLOAT>
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCsetH2SVBias ( const FLOAT  H1,
const FLOAT  H2,
const FLOAT  S,
const FLOAT  V 
) [inline]

set the bias per H2SV channel on output

Definition at line 149 of file SurpriseControl.C.

template<class PIXTYPE , class BETATYPE , class FLOAT>
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCsetLambda ( const FLOAT  lambda  )  [inline]

set the decay term over the beta map

Definition at line 223 of file SurpriseControl.C.

template<class PIXTYPE , class BETATYPE , class FLOAT >
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCsetMyScale ( const ushort  scale  )  [inline]

give me my scale if any

Definition at line 132 of file SurpriseControl.C.

template<class PIXTYPE , class BETATYPE , class FLOAT>
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCsetOriginalImageWeight ( const FLOAT  origImageBias  )  [inline]

set how much the original image will be combined back

Definition at line 242 of file SurpriseControl.C.

template<class PIXTYPE , class BETATYPE , class FLOAT >
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCsetTargetFrame ( const uint  frame  )  [inline]

set which frame if any is a target frame

Definition at line 231 of file SurpriseControl.C.

template<class PIXTYPE , class BETATYPE , class FLOAT >
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCuseMaxLevel ( const bool  useML  )  [inline]

use max level from conspicuity map rather than sum the levels

Definition at line 89 of file SurpriseControl.C.

template<class PIXTYPE , class BETATYPE , class FLOAT >
void SurpriseControl< PIXTYPE, BETATYPE, FLOAT >::SCuseTemporal ( const bool  useTMP  )  [inline]

Shoud we use the temporal component? default is yes.

Definition at line 97 of file SurpriseControl.C.


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:50 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3