Critical Link MityCam SoC Firmware  1.0
Critical Link MityCam SoC Firmware
tcConv5x5 Class Reference

#include <Conv5x5.h>

Collaboration diagram for tcConv5x5:

Public Types

enum  teOperatingMode { eeMonochrome = 0, eeBayerModeGreenFirst = 1, eeBayerModeGreenSecond = 2 }
 
enum  teWeights {
  eeMono_Horizontal = 0, eeMono_Vertical = 1, eeGreen_Horizontal = 2, eeGreen_Vertical = 3,
  eeRedBlue_Horizontal = 4, eeRedBlue_Vertical = 5
}
 

Public Member Functions

 tcConv5x5 (int anAddress)
 
virtual ~tcConv5x5 ()
 
bool initialized ()
 
void enable (bool abEnable)
 
void setOperatingMode (teOperatingMode aeMode)
 
int setWeight (teWeights aeWeights, int index, float weight)
 
int setWeights (teWeights aeWeights, const std::vector< float > &avWeights)
 
int setPassThroughWeights (void)
 
int setGaussianWeightsMono (float sigmaX, float sigmaY)
 
int setGaussianWeightsMono (float sigmaXY)
 
int setGaussianWeightsBayer (float sigmaX_G, float sigmaY_G, float sigmaX_RB, float sigmaY_RB)
 
int setGaussianWeightsBayer (float sigmaXY_G, float sigmal_XY_RB)
 
int setGaussianWeightsBayer (float sigma)
 

Static Public Member Functions

static std::vector< float > Gaussian (float std_dev, teWeights weight_type)
 

Protected Attributes

tcFPGARegister< uint32_t > mcReg
 

Detailed Description

The tcConv5x5 class manages the conv_5x5 MityCAM IP core, which performs a 5x5 convolution using an X/Y separable kernel. Note the weights must be between 0.0f and 1.9f.

Member Enumeration Documentation

◆ teOperatingMode

Weight application mode

Enumerator
eeMonochrome 
eeBayerModeGreenFirst 
eeBayerModeGreenSecond 

◆ teWeights

Weight selection enum

Enumerator
eeMono_Horizontal 
eeMono_Vertical 
eeGreen_Horizontal 
eeGreen_Vertical 
eeRedBlue_Horizontal 
eeRedBlue_Vertical 

Constructor & Destructor Documentation

◆ tcConv5x5()

tcConv5x5::tcConv5x5 ( int  anBaseAddress)

Class constructor.

Parameters
anBaseAddressPhysical Address of the core, typically in the 0xFF20xxxx range

◆ ~tcConv5x5()

tcConv5x5::~tcConv5x5 ( )
virtual

Class Destructor

Member Function Documentation

◆ enable()

void tcConv5x5::enable ( bool  abEnable)

Enable the core for operation.

Parameters
abEnabletrue to enable the core, false to disable the core

◆ Gaussian()

std::vector< float > tcConv5x5::Gaussian ( float  std_dev,
teWeights  weight_type 
)
static

Compute 5 point gaussian weights for given standard of deviation

Note
this routine will normalize the weights for unity gain
Parameters
std_devthe standard of deviation
weight_typethe type of weights being computed
Returns
the 5 vector weights.

◆ initialized()

bool tcConv5x5::initialized ( )
Returns
true when unit is correctly initialized

◆ setGaussianWeightsBayer() [1/3]

int tcConv5x5::setGaussianWeightsBayer ( float  sigma)
inline

◆ setGaussianWeightsBayer() [2/3]

int tcConv5x5::setGaussianWeightsBayer ( float  sigmaX_G,
float  sigmaY_G,
float  sigmaX_RB,
float  sigmaY_RB 
)

Setup Gaussian shaded weights for Bayer mode

Parameters
sigmaX_Gguassian standard deviation in X dimension, green
sigmaY_Gguassian standard deviation in Y dimension, green
sigmaX_RBguassian standard deviation in X dimension, red/blue
sigmaY_RBguassian standard deviation in Y dimension, red/blue
Returns
non-zero on error

◆ setGaussianWeightsBayer() [3/3]

int tcConv5x5::setGaussianWeightsBayer ( float  sigmaXY_G,
float  sigmal_XY_RB 
)
inline

◆ setGaussianWeightsMono() [1/2]

int tcConv5x5::setGaussianWeightsMono ( float  sigmaX,
float  sigmaY 
)

Setup Gaussian shaded weights for Monochrome mode

Parameters
sigmaXguassian standard deviation in X dimension
sigmaYguassian standard deviation in Y dimension
Returns
non-zero on error

◆ setGaussianWeightsMono() [2/2]

int tcConv5x5::setGaussianWeightsMono ( float  sigmaXY)
inline

◆ setOperatingMode()

void tcConv5x5::setOperatingMode ( teOperatingMode  aeMode)

Sets the weight application mode of the 5x5 convolution.

Parameters
aeModethe operating mode

◆ setPassThroughWeights()

int tcConv5x5::setPassThroughWeights ( void  )

Configure pass-through weights on all channels / modes.

Returns
non-zero on error.

◆ setWeight()

int tcConv5x5::setWeight ( teWeights  aeWeights,
int  index,
float  weight 
)

Set the array of 5 specified weights.

Parameters
aeWeightsthe weight type / vector
indexthe index (0-4) to set
Weightsarray of 5 floating point weights.

◆ setWeights()

int tcConv5x5::setWeights ( teWeights  aeWeights,
const std::vector< float > &  avWeights 
)

Set the array of 5 specified weights.

Parameters
aeWeightsthe weight type / vector
avWeightsarray of 5 floating point weights.

Member Data Documentation

◆ mcReg

tcFPGARegister<uint32_t> tcConv5x5::mcReg
protected

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