Critical Link MityCam SoC Firmware  1.0
Critical Link MityCam SoC Firmware
Conv5x5.h
Go to the documentation of this file.
1 
9 #ifndef CONV5X5_H
10 #define CONV5X5_H
11 
12 #include <libfpga/fpgaregister.h>
13 
14 #include <vector>
15 
21 class tcConv5x5
22 {
23 public:
25  typedef enum {
30 
32  typedef enum {
39  } teWeights;
40 
41  tcConv5x5(int anAddress);
42  virtual ~tcConv5x5();
43 
44  bool initialized();
45 
46  void enable(bool abEnable);
47 
48  void setOperatingMode(teOperatingMode aeMode);
49 
50  int setWeight(teWeights aeWeights, int index, float weight);
51  int setWeights(teWeights aeWeights, const std::vector<float>& avWeights);
52 
53  int setPassThroughWeights(void);
54 
55  int setGaussianWeightsMono(float sigmaX, float sigmaY);
56  int setGaussianWeightsMono(float sigmaXY)
57  {
58  return setGaussianWeightsMono(sigmaXY, sigmaXY);
59  }
60 
61  int setGaussianWeightsBayer(float sigmaX_G, float sigmaY_G, float sigmaX_RB, float sigmaY_RB);
62  int setGaussianWeightsBayer(float sigmaXY_G, float sigmal_XY_RB)
63  {
64  return setGaussianWeightsBayer(sigmaXY_G, sigmaXY_G, sigmal_XY_RB, sigmal_XY_RB);
65  }
66  int setGaussianWeightsBayer(float sigma)
67  {
68  return setGaussianWeightsBayer(sigma, sigma, sigma, sigma);
69  }
70 
71  static std::vector<float> Gaussian(float std_dev, teWeights weight_type);
72 
73 protected:
74 
75  tcFPGARegister<uint32_t> mcReg;
76 };
77 
78 #endif // CONV5X5_H
tcConv5x5::eeRedBlue_Horizontal
@ eeRedBlue_Horizontal
Definition: Conv5x5.h:37
tcConv5x5::initialized
bool initialized()
Definition: Conv5x5.cpp:46
tcConv5x5::eeMono_Horizontal
@ eeMono_Horizontal
Definition: Conv5x5.h:33
tcConv5x5::setGaussianWeightsBayer
int setGaussianWeightsBayer(float sigma)
Definition: Conv5x5.h:66
tcConv5x5::eeGreen_Vertical
@ eeGreen_Vertical
Definition: Conv5x5.h:36
tcConv5x5::teWeights
teWeights
Definition: Conv5x5.h:32
tcConv5x5::setWeight
int setWeight(teWeights aeWeights, int index, float weight)
Definition: Conv5x5.cpp:93
tcConv5x5::setGaussianWeightsMono
int setGaussianWeightsMono(float sigmaX, float sigmaY)
Definition: Conv5x5.cpp:260
tcConv5x5::eeGreen_Horizontal
@ eeGreen_Horizontal
Definition: Conv5x5.h:35
tcConv5x5
Definition: Conv5x5.h:21
tcConv5x5::setGaussianWeightsBayer
int setGaussianWeightsBayer(float sigmaXY_G, float sigmal_XY_RB)
Definition: Conv5x5.h:62
tcConv5x5::setGaussianWeightsBayer
int setGaussianWeightsBayer(float sigmaX_G, float sigmaY_G, float sigmaX_RB, float sigmaY_RB)
Definition: Conv5x5.cpp:279
tcConv5x5::setPassThroughWeights
int setPassThroughWeights(void)
Definition: Conv5x5.cpp:184
tcConv5x5::setGaussianWeightsMono
int setGaussianWeightsMono(float sigmaXY)
Definition: Conv5x5.h:56
tcConv5x5::setOperatingMode
void setOperatingMode(teOperatingMode aeMode)
Definition: Conv5x5.cpp:68
tcConv5x5::~tcConv5x5
virtual ~tcConv5x5()
Definition: Conv5x5.cpp:39
tcConv5x5::eeBayerModeGreenSecond
@ eeBayerModeGreenSecond
Definition: Conv5x5.h:28
tcConv5x5::setWeights
int setWeights(teWeights aeWeights, const std::vector< float > &avWeights)
Definition: Conv5x5.cpp:137
tcConv5x5::eeMono_Vertical
@ eeMono_Vertical
Definition: Conv5x5.h:34
tcConv5x5::tcConv5x5
tcConv5x5(int anAddress)
Definition: Conv5x5.cpp:29
tcConv5x5::mcReg
tcFPGARegister< uint32_t > mcReg
Definition: Conv5x5.h:75
tcConv5x5::teOperatingMode
teOperatingMode
Definition: Conv5x5.h:25
tcConv5x5::enable
void enable(bool abEnable)
Definition: Conv5x5.cpp:55
tcConv5x5::Gaussian
static std::vector< float > Gaussian(float std_dev, teWeights weight_type)
Definition: Conv5x5.cpp:202
tcConv5x5::eeBayerModeGreenFirst
@ eeBayerModeGreenFirst
Definition: Conv5x5.h:27
tcConv5x5::eeMonochrome
@ eeMonochrome
Definition: Conv5x5.h:26
tcConv5x5::eeRedBlue_Vertical
@ eeRedBlue_Vertical
Definition: Conv5x5.h:38