mirror of https://github.com/opencv/opencv.git
Open Source Computer Vision Library
https://opencv.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
730 B
35 lines
730 B
11 years ago
|
#ifndef IOUTPUT_H
|
||
|
#define IOUTPUT_H
|
||
|
|
||
|
#include <cstdio>
|
||
|
|
||
|
#include "_cvcommon.h"
|
||
|
|
||
|
struct CvMat;
|
||
|
struct CvRect;
|
||
|
|
||
|
class IOutput
|
||
|
{
|
||
|
public:
|
||
|
enum OutputType {PNG_TRAINING_SET, JPG_TEST_SET};
|
||
|
public:
|
||
|
virtual bool write( const CvMat& img,
|
||
|
const CvRect& boundingBox ) =0;
|
||
|
|
||
|
virtual ~IOutput();
|
||
|
|
||
|
static IOutput* createOutput( const char *filename, OutputType type );
|
||
|
protected:
|
||
|
IOutput();
|
||
|
/* finds the beginning of the last token in the path */
|
||
|
void findFilePathPart( char **partOfPath, char *fullPath );
|
||
|
virtual bool init( const char* filename );
|
||
|
protected:
|
||
|
int currentIdx;
|
||
|
char imgFullPath[PATH_MAX];
|
||
|
char* imgFileName;
|
||
|
FILE* annotationsList;
|
||
|
};
|
||
|
|
||
|
#endif // IOUTPUT_H
|