00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __FIREVISION_FILTER_H_
00025 #define __FIREVISION_FILTER_H_
00026
00027 #include <fvutils/base/types.h>
00028 #include <fvutils/base/roi.h>
00029
00030 namespace firevision {
00031 #if 0
00032 }
00033 #endif
00034
00035 class Filter
00036 {
00037 public:
00038 Filter(const char *name, unsigned int max_num_buffers = 1);
00039 virtual ~Filter();
00040
00041 virtual void set_src_buffer(unsigned char *buf, ROI *roi,
00042 orientation_t ori = ORI_HORIZONTAL,
00043 unsigned int buffer_num = 0);
00044
00045 virtual void set_src_buffer(unsigned char *buf, ROI *roi,
00046 unsigned int buffer_num);
00047
00048 virtual void set_dst_buffer(unsigned char *buf, ROI *roi);
00049
00050
00051 virtual void set_orientation(orientation_t ori, unsigned int buffer_num);
00052 virtual const char * name();
00053
00054 virtual void apply() = 0 ;
00055
00056 void shrink_region(ROI *r, unsigned int n);
00057
00058 protected:
00059
00060 unsigned int _max_num_buffers;
00061
00062 char *_name;
00063
00064
00065 unsigned char **src;
00066
00067 unsigned char *dst;
00068
00069
00070 ROI **src_roi;
00071
00072 ROI *dst_roi;
00073
00074
00075 orientation_t *ori;
00076 };
00077
00078 }
00079
00080 #endif