Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ave_Filter.h

Go to the documentation of this file.
00001 /* ---------------------------------------------------------------------------
00002     Phission :
00003         Realtime Vision Processing System
00004 
00005     Copyright (C) 2003 Philip D.S. Thoren (pthoren@cs.uml.edu)
00006     University of Massachusetts at Lowell,
00007     Laboratory for Artificial Intelligence and Robotics
00008 
00009     This file is part of Phission.
00010 
00011     Phission is free software; you can redistribute it and/or modify
00012     it under the terms of the GNU General Public License as published by
00013     the Free Software Foundation; either version 2 of the License, or
00014     (at your option) any later version.
00015 
00016     Phission is distributed in the hope that it will be useful,
00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019     GNU General Public License for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with Phission; if not, write to the Free Software
00023     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 
00025  ---------------------------------------------------------------------------*/
00026 #ifndef _AVE_FILTER_H
00027 #define _AVE_FILTER_H
00028 
00029 #include <stdint.h>
00030 #include <phFilter.h>
00031 
00032 /* ------------------------------------------------------------------------ */
00033 class ave_Filter : public phFilter
00034 {
00035 private:
00036     uint32_t m_nFrames;
00037     uint32_t m_frame_step;
00038     uint32_t m_total_stored;
00039     uint32_t m_first_frame_index;
00040     uint32_t m_current_frame_index;
00041     
00042     uint32_t m_frame_elems;
00043     uint32_t m_frame_size;
00044    
00045     double  *m_last_result;
00046     uint32_t m_last_result_size;
00047 
00048     double  *m_last_result_weight;
00049     uint32_t m_last_result_weight_size;
00050    
00051     uint8_t *m_temp;
00052     uint32_t m_temp_size;
00053 
00054     uint8_t **m_imgptrs;
00055     uint32_t m_imgptrs_size;
00056     uint8_t *m_buffer;
00057     uint32_t m_buffer_size;
00058     uint8_t *m_outputBuffer;
00059     uint32_t m_outputBuffer_size;
00060 
00061     uint32_t m_buf_height;
00062     uint32_t m_buf_width;
00063     uint32_t m_buf_depth;
00064     uint32_t m_buf_format;
00065     uint32_t m_buf_nframes;
00066     uint32_t m_buf_step;
00067 
00068     int check_buffers(uint32_t alloc = 0);
00069     
00070 protected:
00071     int filter();
00072 
00073 public:
00074     ave_Filter(uint32_t nFrames = 2,
00075                uint32_t frame_step = 1);
00076     ~ave_Filter();
00077     
00078     int set(uint32_t nFrames = 2,
00079             uint32_t frame_step = 1);
00080     int flush();
00081     
00082     phFilter *cloneFilter();
00083 
00084 };
00085 
00086 #endif /* _AVE_FILTER_H */
00087 




Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo

Generated on Sat Jun 16 02:44:05 2007 for phission by  doxygen 1.4.4