Critical Link MityCam SoC Firmware
1.0
Critical Link MityCam SoC Firmware
|
#include <Conv5x5.h>
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 |
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.
enum tcConv5x5::teWeights |
tcConv5x5::tcConv5x5 | ( | int | anBaseAddress | ) |
Class constructor.
anBaseAddress | Physical Address of the core, typically in the 0xFF20xxxx range |
|
virtual |
Class Destructor
void tcConv5x5::enable | ( | bool | abEnable | ) |
Enable the core for operation.
abEnable | true to enable the core, false to disable the core |
|
static |
Compute 5 point gaussian weights for given standard of deviation
std_dev | the standard of deviation |
weight_type | the type of weights being computed |
bool tcConv5x5::initialized | ( | ) |
|
inline |
int tcConv5x5::setGaussianWeightsBayer | ( | float | sigmaX_G, |
float | sigmaY_G, | ||
float | sigmaX_RB, | ||
float | sigmaY_RB | ||
) |
Setup Gaussian shaded weights for Bayer mode
sigmaX_G | guassian standard deviation in X dimension, green |
sigmaY_G | guassian standard deviation in Y dimension, green |
sigmaX_RB | guassian standard deviation in X dimension, red/blue |
sigmaY_RB | guassian standard deviation in Y dimension, red/blue |
|
inline |
int tcConv5x5::setGaussianWeightsMono | ( | float | sigmaX, |
float | sigmaY | ||
) |
Setup Gaussian shaded weights for Monochrome mode
sigmaX | guassian standard deviation in X dimension |
sigmaY | guassian standard deviation in Y dimension |
|
inline |
void tcConv5x5::setOperatingMode | ( | teOperatingMode | aeMode | ) |
Sets the weight application mode of the 5x5 convolution.
aeMode | the operating mode |
int tcConv5x5::setPassThroughWeights | ( | void | ) |
Configure pass-through weights on all channels / modes.
int tcConv5x5::setWeight | ( | teWeights | aeWeights, |
int | index, | ||
float | weight | ||
) |
Set the array of 5 specified weights.
aeWeights | the weight type / vector |
index | the index (0-4) to set |
Weights | array of 5 floating point weights. |
int tcConv5x5::setWeights | ( | teWeights | aeWeights, |
const std::vector< float > & | avWeights | ||
) |
Set the array of 5 specified weights.
aeWeights | the weight type / vector |
avWeights | array of 5 floating point weights. |
|
protected |