VidSegm.hpp

00001 
00008 #ifndef VIDSEGM_HPP
00009 #define VIDSEGM_HPP
00010 
00011 
00012 using namespace cv;
00013 using namespace std;
00014 
00015 
00026 class VidSegm
00027 {
00028         //variables
00029         public:
00030 
00035                 DytexMix dtm;
00040                 Mat initSegm;
00045                 PatchOptions popt;
00050                 int K;
00055                 int n;
00060                 double regV;    
00065                 int nfrm;       
00066         
00071                 Point3i              coff;        
00076                 vector<int>          allx;        
00081                 vector<int>          ally;        
00086                 vector<int>          allz;  
00091                 Point3i              vidsize;     
00096                 vector<Point3i>      locall;        
00101                 vector<bool>         locall_mask;         
00106                 std::vector<int>     allclasses;                
00107         
00108         //methods
00109         public: 
00110                 //initialize a video segmentor object
00111                 VidSegm(int winxy,int winz,int stepxy,int stepz,PatchOptions::norm_type nt,double bkv,int K,int n,double reg,int nf=0,int bkvf=0);
00112 
00113                 //learn the dtm using training video
00114                 void learnDTM(string vpath,bool doseg=true);            
00115 
00116                 //segments a set of videos in a sequence
00117                 void segmentVideoSequence(std::vector<string> path,int stepxy,int stepz,int filtxy,int filtz,string opath);
00118 
00119                 //segments the current video in the sequence
00120                 Mat segmentVideo(Mat vid,int stepxy,int stepz,int filtxy,int filtz,Mat &osmask);
00121                 //computes segmentation mask using class and location info of patches
00122                 Mat segm_mask();
00123                 //maximum vote filter
00124                 Mat maxvotefilt(Mat I,int sx,int sy,int sz,int nclass);
00125 
00126 };
00127 
00128 #endif

Generated on 18 Dec 2014 for libdt-OpenCV by  doxygen 1.6.1