mirror of
https://github.com/opencv/opencv.git
synced 2024-12-16 10:29:11 +08:00
984eb99428
[~] Automatically tracked dependencies between modules [+] Support for optional module dependencies [+] Options to choose modules to build [~] Removed hardcoded modules lists from OpenCVConfig.cmake, opencv.pc and OpenCV.mk [+] Added COMPONENTS support for FIND_PACKAGE(OpenCV) [~] haartraining and traincascade are moved outside of modules folder since they aren't the modules
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
#ifndef _OPENCV_IMAGESTORAGE_H_
|
|
#define _OPENCV_IMAGESTORAGE_H_
|
|
|
|
#include "highgui.h"
|
|
|
|
using namespace cv;
|
|
|
|
class CvCascadeImageReader
|
|
{
|
|
public:
|
|
bool create( const String _posFilename, const String _negFilename, Size _winSize );
|
|
void restart() { posReader.restart(); }
|
|
bool getNeg(Mat &_img) { return negReader.get( _img ); }
|
|
bool getPos(Mat &_img) { return posReader.get( _img ); }
|
|
|
|
private:
|
|
class PosReader
|
|
{
|
|
public:
|
|
PosReader();
|
|
virtual ~PosReader();
|
|
bool create( const String _filename );
|
|
bool get( Mat &_img );
|
|
void restart();
|
|
|
|
short* vec;
|
|
FILE* file;
|
|
int count;
|
|
int vecSize;
|
|
int last;
|
|
int base;
|
|
} posReader;
|
|
|
|
class NegReader
|
|
{
|
|
public:
|
|
NegReader();
|
|
bool create( const String _filename, Size _winSize );
|
|
bool get( Mat& _img );
|
|
bool nextImg();
|
|
|
|
Mat src, img;
|
|
vector<String> imgFilenames;
|
|
Point offset, point;
|
|
float scale;
|
|
float scaleFactor;
|
|
float stepFactor;
|
|
size_t last, round;
|
|
Size winSize;
|
|
} negReader;
|
|
};
|
|
|
|
#endif
|