filter.h
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 class Filter
00031 {
00032
00033 public:
00034 Filter(const char *name, unsigned int max_num_buffers = 1);
00035 virtual ~Filter();
00036
00037 virtual void set_src_buffer(unsigned char *buf, ROI *roi,
00038 orientation_t ori = ORI_HORIZONTAL,
00039 unsigned int buffer_num = 0);
00040
00041 virtual void set_src_buffer(unsigned char *buf, ROI *roi,
00042 unsigned int buffer_num);
00043
00044 virtual void set_dst_buffer(unsigned char *buf, ROI *roi);
00045
00046
00047 virtual void set_orientation(orientation_t ori, unsigned int buffer_num);
00048 virtual const char * name();
00049
00050 virtual void apply() = 0 ;
00051
00052 void shrink_region(ROI *r, unsigned int n);
00053
00054 protected:
00055
00056 unsigned int _max_num_buffers;
00057
00058 char *_name;
00059
00060
00061 unsigned char **src;
00062
00063 unsigned char *dst;
00064
00065
00066 ROI **src_roi;
00067
00068 ROI *dst_roi;
00069
00070
00071 orientation_t *ori;
00072 };
00073
00074 #endif