#ifndef __TEXT_LOCATE__
#define __TEXT_LOCATE__

#include "PreprocFuncs.h"
#include "ConnectedComponents.h"
#include "TextLine.h"


#include <vector>
#include <set>
#include <map>

using namespace std;

#define THRESHOLDING_KOEF	0.85
#define OCR_THRESHOLDS	0.8f, 0.95f 

int CalcYOverlap(const CRect & a, const CRect & b);
void MarkEmptyVerticalSpace(int *pBp, int nWidth, int nHeight);
CTextLines *LocateTextLines(const UCHAR *p8bppImage, const UCHAR* p1bppBoW, const UCHAR* p1bppWoB, 
								   const ImgRotationInfo &iri, int nBverWThreshold,
								   int & nActualAngle);

#endif
