tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
tesseract::TextlineProjection Class Reference

#include <textlineprojection.h>

Public Member Functions

 TextlineProjection (int resolution)
 
 ~TextlineProjection ()
 
void ConstructProjection (TO_BLOCK *input_block, const FCOORD &rotation, Pix *nontext_map)
 
void PlotGradedBlobs (BLOBNBOX_LIST *blobs, ScrollView *win)
 
void MoveNonTextlineBlobs (BLOBNBOX_LIST *blobs, BLOBNBOX_LIST *small_blobs) const
 
void DisplayProjection () const
 
int DistanceOfBoxFromPartition (const TBOX &box, const ColPartition &part, const DENORM *denorm, bool debug) const
 
int DistanceOfBoxFromBox (const TBOX &from_box, const TBOX &to_box, bool horizontal_textline, const DENORM *denorm, bool debug) const
 
int VerticalDistance (bool debug, int x, int y1, int y2) const
 
int HorizontalDistance (bool debug, int x1, int x2, int y) const
 
bool BoxOutOfHTextline (const TBOX &box, const DENORM *denorm, bool debug) const
 
int EvaluateColPartition (const ColPartition &part, const DENORM *denorm, bool debug) const
 
int EvaluateBox (const TBOX &box, const DENORM *denorm, bool debug) const
 

Private Member Functions

int EvaluateBoxInternal (const TBOX &box, const DENORM *denorm, bool debug, int *hgrad1, int *hgrad2, int *vgrad1, int *vgrad2) const
 
int BestMeanGradientInRow (const DENORM *denorm, int16_t min_x, int16_t max_x, int16_t y, bool best_is_max) const
 
int BestMeanGradientInColumn (const DENORM *denorm, int16_t x, int16_t min_y, int16_t max_y, bool best_is_max) const
 
int MeanPixelsInLineSegment (const DENORM *denorm, int offset, TPOINT start_pt, TPOINT end_pt) const
 
void IncrementRectangle8Bit (const TBOX &box)
 
void ProjectBlobs (BLOBNBOX_LIST *blobs, const FCOORD &rotation, const TBOX &image_box, Pix *nontext_map)
 
bool PadBlobBox (BLOBNBOX *blob, TBOX *bbox)
 
void TransformToPixCoords (const DENORM *denorm, TPOINT *pt) const
 
void TruncateToImageBounds (TPOINT *pt) const
 
int ImageXToProjectionX (int x) const
 
int ImageYToProjectionY (int y) const
 

Private Attributes

int scale_factor_
 
int x_origin_
 
int y_origin_
 
Pix * pix_
 

Constructor & Destructor Documentation

◆ TextlineProjection()

tesseract::TextlineProjection::TextlineProjection ( int  resolution)
explicit

◆ ~TextlineProjection()

tesseract::TextlineProjection::~TextlineProjection ( )

Member Function Documentation

◆ BestMeanGradientInColumn()

int tesseract::TextlineProjection::BestMeanGradientInColumn ( const DENORM denorm,
int16_t  x,
int16_t  min_y,
int16_t  max_y,
bool  best_is_max 
) const
private

◆ BestMeanGradientInRow()

int tesseract::TextlineProjection::BestMeanGradientInRow ( const DENORM denorm,
int16_t  min_x,
int16_t  max_x,
int16_t  y,
bool  best_is_max 
) const
private

◆ BoxOutOfHTextline()

bool tesseract::TextlineProjection::BoxOutOfHTextline ( const TBOX box,
const DENORM denorm,
bool  debug 
) const

◆ ConstructProjection()

void tesseract::TextlineProjection::ConstructProjection ( TO_BLOCK input_block,
const FCOORD rotation,
Pix *  nontext_map 
)

◆ DisplayProjection()

void tesseract::TextlineProjection::DisplayProjection ( ) const

◆ DistanceOfBoxFromBox()

int tesseract::TextlineProjection::DistanceOfBoxFromBox ( const TBOX from_box,
const TBOX to_box,
bool  horizontal_textline,
const DENORM denorm,
bool  debug 
) const

◆ DistanceOfBoxFromPartition()

int tesseract::TextlineProjection::DistanceOfBoxFromPartition ( const TBOX box,
const ColPartition part,
const DENORM denorm,
bool  debug 
) const

◆ EvaluateBox()

int tesseract::TextlineProjection::EvaluateBox ( const TBOX box,
const DENORM denorm,
bool  debug 
) const

◆ EvaluateBoxInternal()

int tesseract::TextlineProjection::EvaluateBoxInternal ( const TBOX box,
const DENORM denorm,
bool  debug,
int *  hgrad1,
int *  hgrad2,
int *  vgrad1,
int *  vgrad2 
) const
private

◆ EvaluateColPartition()

int tesseract::TextlineProjection::EvaluateColPartition ( const ColPartition part,
const DENORM denorm,
bool  debug 
) const

◆ HorizontalDistance()

int tesseract::TextlineProjection::HorizontalDistance ( bool  debug,
int  x1,
int  x2,
int  y 
) const

◆ ImageXToProjectionX()

int tesseract::TextlineProjection::ImageXToProjectionX ( int  x) const
private

◆ ImageYToProjectionY()

int tesseract::TextlineProjection::ImageYToProjectionY ( int  y) const
private

◆ IncrementRectangle8Bit()

void tesseract::TextlineProjection::IncrementRectangle8Bit ( const TBOX box)
private

◆ MeanPixelsInLineSegment()

int tesseract::TextlineProjection::MeanPixelsInLineSegment ( const DENORM denorm,
int  offset,
TPOINT  start_pt,
TPOINT  end_pt 
) const
private

◆ MoveNonTextlineBlobs()

void tesseract::TextlineProjection::MoveNonTextlineBlobs ( BLOBNBOX_LIST *  blobs,
BLOBNBOX_LIST *  small_blobs 
) const

◆ PadBlobBox()

bool tesseract::TextlineProjection::PadBlobBox ( BLOBNBOX blob,
TBOX bbox 
)
private

◆ PlotGradedBlobs()

void tesseract::TextlineProjection::PlotGradedBlobs ( BLOBNBOX_LIST *  blobs,
ScrollView win 
)

◆ ProjectBlobs()

void tesseract::TextlineProjection::ProjectBlobs ( BLOBNBOX_LIST *  blobs,
const FCOORD rotation,
const TBOX image_box,
Pix *  nontext_map 
)
private

◆ TransformToPixCoords()

void tesseract::TextlineProjection::TransformToPixCoords ( const DENORM denorm,
TPOINT pt 
) const
private

◆ TruncateToImageBounds()

void tesseract::TextlineProjection::TruncateToImageBounds ( TPOINT pt) const
private

◆ VerticalDistance()

int tesseract::TextlineProjection::VerticalDistance ( bool  debug,
int  x,
int  y1,
int  y2 
) const

Member Data Documentation

◆ pix_

Pix* tesseract::TextlineProjection::pix_
private

◆ scale_factor_

int tesseract::TextlineProjection::scale_factor_
private

◆ x_origin_

int tesseract::TextlineProjection::x_origin_
private

◆ y_origin_

int tesseract::TextlineProjection::y_origin_
private

The documentation for this class was generated from the following files: