00001 #ifndef _DLDOCID_H_ 00002 #define _DLDOCID_H_ 00003 00004 #include "DLLBP.h" 00005 #include "DLImage.h" 00006 #include "DLBitsPerPixelConverter.h" 00007 #include "DLSVMClassifier.h" 00008 00009 #include <vector> 00010 00011 using namespace std; 00012 00017 class DLDocID 00018 { 00019 public: 00020 00024 enum DLImageContentType 00025 { 00026 DL_DOCUMENT_IMAGE = 1, 00027 DL_IMAGE_WITH_TEXT = 2, 00028 DL_NONDOCUMENT_IMAGE = 3 00029 }; 00030 00039 DLDocID(string modelfilename, int windowsize, bool test); 00040 00046 bool batchTraining( string filelistname ); 00047 00053 DLImageContentType test( string testfilename ); 00054 00060 DLImageContentType test( const DLImage& testImage ); 00061 00062 protected: 00063 00065 DLSVMClassifier* classifier; 00066 00068 string model_filename; 00069 00071 int winsize; 00072 }; 00073 00074 #endif