Commit e0463ba67a6072b943bcaf722827599a794b85a8

Authored by Josh Klontz
1 parent 1dec1ee2

openbr tutorial for @lbestrowden

Showing 1 changed file with 21 additions and 0 deletions
sdk/plugins/reduce.cpp
... ... @@ -119,6 +119,27 @@ private:
119 119  
120 120 BR_REGISTER(Transform, StatTransform)
121 121  
  122 +/*!
  123 + * \ingroup transforms
  124 + * \brief Downsample the rows and columns of a matrix.
  125 + */
  126 +class DownsampleTransform : public UntrainableTransform
  127 +{
  128 + Q_OBJECT
  129 + Q_PROPERTY(int k READ get_k WRITE set_k RESET reset_k STORED false)
  130 + BR_PROPERTY(int, k, 1)
  131 +
  132 + void project(const Template &src, Template &dst) const
  133 + {
  134 + Mat input = src.m();
  135 + Mat output;
  136 + (void) input; // TODO: write me!
  137 + dst.m() = output;
  138 + }
  139 +};
  140 +
  141 +BR_REGISTER(Transform, DownsampleTransform)
  142 +
122 143 } // namespace br
123 144  
124 145 #include "reduce.moc"
... ...