#include <DLDocID.h>
Public Types | |
enum | DLImageContentType { DL_DOCUMENT_IMAGE = 1, DL_IMAGE_WITH_TEXT = 2, DL_NONDOCUMENT_IMAGE = 3 } |
Public Member Functions | |
DLDocID (string modelfilename, int windowsize, bool test) | |
bool | batchTraining (string filelistname) |
DLImageContentType | test (string testfilename) |
DLImageContentType | test (const DLImage &testImage) |
Protected Attributes | |
DLSVMClassifier * | classifier |
User a multi-class SVM classifier for classification. | |
string | model_filename |
File name of the classifier model file. | |
int | winsize |
Window size of the rescaled image in which texture analysis is performed. |
Image content types
DLDocID::DLDocID | ( | string | modelfilename, | |
int | windowsize, | |||
bool | test | |||
) |
DLDocID Constructor: Initialize parameters for training or testing In training, a new model file in LIBSVM format will be created by the given file name. In testing, the specified model file in LIBSVM format will be used for classification.
model_filename | file name of the SVM model file in LIBSVM format. | |
windowsize | dimension of the rescaled image size in which texture analysis is carried out | |
test | Boolean type indicator. True for testing, false for training. |
bool DLDocID::batchTraining | ( | string | filelistname | ) |
Batch training using a list of training images
filelistname | name of the file containing the list of training images |
DLDocID::DLImageContentType DLDocID::test | ( | string | testfilename | ) |
Classify a test image of a given file name
testfilename | file name of the test image |
DLDocID::DLImageContentType DLDocID::test | ( | const DLImage & | testImage | ) |
Classify a test image of DLImage type
testImage | file name of the test image |