Last change
on this file since 7 was 7, checked in by Sanahuja Guillaume, 8 years ago |
filter and meta
|
File size:
1.2 KB
|
Rev | Line | |
---|
| 1 | // created: 2011/05/01
|
---|
| 2 | // filename: LowPassFilter.cpp
|
---|
| 3 | //
|
---|
| 4 | // author: Guillaume Sanahuja
|
---|
| 5 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 6 | //
|
---|
| 7 | // version: $Id: $
|
---|
| 8 | //
|
---|
| 9 | // purpose: Class defining a first order low pass filter
|
---|
| 10 | //
|
---|
| 11 | //
|
---|
| 12 | /*********************************************************************/
|
---|
| 13 |
|
---|
| 14 | #include "LowPassFilter.h"
|
---|
| 15 | #include "LowPassFilter_impl.h"
|
---|
| 16 | #include <cvmatrix.h>
|
---|
| 17 | #include <LayoutPosition.h>
|
---|
| 18 |
|
---|
| 19 | using std::string;
|
---|
| 20 | using namespace flair::core;
|
---|
| 21 | using namespace flair::gui;
|
---|
| 22 |
|
---|
| 23 | namespace flair
|
---|
| 24 | {
|
---|
| 25 | namespace filter
|
---|
| 26 | {
|
---|
| 27 |
|
---|
| 28 | LowPassFilter::LowPassFilter(const IODevice* parent,const LayoutPosition* position,string name,const cvmatrix* init_value) : IODevice(parent,name)
|
---|
| 29 | {
|
---|
| 30 | pimpl_=new LowPassFilter_impl(this,position,name,init_value);
|
---|
| 31 | AddDataToLog(pimpl_->output);
|
---|
| 32 | }
|
---|
| 33 |
|
---|
| 34 | LowPassFilter::~LowPassFilter()
|
---|
| 35 | {
|
---|
| 36 | delete pimpl_;
|
---|
| 37 | }
|
---|
| 38 |
|
---|
| 39 | cvmatrix *LowPassFilter::Matrix(void) const
|
---|
| 40 | {
|
---|
| 41 | return pimpl_->output;
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | float LowPassFilter::Output(int row,int col) const
|
---|
| 45 | {
|
---|
| 46 | return pimpl_->output->Value(row,col);
|
---|
| 47 | }
|
---|
| 48 |
|
---|
| 49 | void LowPassFilter::UpdateFrom(const io_data *data)
|
---|
| 50 | {
|
---|
| 51 | pimpl_->UpdateFrom(data);
|
---|
| 52 | ProcessUpdate(pimpl_->output);
|
---|
| 53 | }
|
---|
| 54 |
|
---|
| 55 | } // end namespace filter
|
---|
| 56 | } // end namespace flair
|
---|
Note:
See
TracBrowser
for help on using the repository browser.