API Reference

textfeat module

Classes:

TextFeatExtractor(*args, **kwargs)

Proxy of C++ TextFeatExtractor class.

ptr_float()

Proxy of C++ ptr_float class.

Functions:

TextFeatExtractor_version()

ptr_float_frompointer(t)

param t

class textfeat.TextFeatExtractor(*args, **kwargs)[source]

Bases: object

Proxy of C++ TextFeatExtractor class.

Methods:

estimateAngles(self, cvimg, _slope, _slant)

param cvimg

extract(self, image[, rotate, _slope, ...])

param image

extractFeats(self, feaimg[, slope, slant, ...])

param feaimg

isImageFormat(self)

preprocess(self, cvimg[, _fcontour, randomize])

param cvimg

printConf(self[, file])

param file

version()

write(self, feats[, file])

param feats

Attributes:

featTypes

formatNames

thisown

The membership flag

estimateAngles(self, cvimg, _slope, _slant, rotate=0.0)[source]
Parameters
  • cvimg (cv::Mat &) –

  • _slope (float *) –

  • _slant (float *) –

  • rotate (float) –

extract(self, image, rotate=0.0, _slope=None, _slant=None, _fpgram=None, _fcontour=None) cv::Mat[source]
Parameters
  • image (cv::Mat &) –

  • rotate (float) –

  • _slope (float *) –

  • _slant (float *) –

  • _fpgram (std::vector< cv::Point2f,std::allocator< cv::Point2f > > *) –

  • _fcontour (std::vector< cv::Point,std::allocator< cv::Point > > *) –

extractFeats(self, feaimg, slope=0.0, slant=0.0, xheight=0, _fpgram=None, randomize=False, rotate=0.0, direction=PAGEXML_READ_DIRECTION_LTR) cv::Mat[source]
Parameters
  • feaimg (cv::Mat &) –

  • slope (float) –

  • slant (float) –

  • xheight (int) –

  • _fpgram (std::vector< cv::Point2f,std::allocator< cv::Point2f > > *) –

  • randomize (bool) –

  • rotate (float) –

  • direction (int) –

property featTypes
property formatNames
isImageFormat(self) bool[source]
preprocess(self, cvimg, _fcontour=None, randomize=False)[source]
Parameters
  • cvimg (cv::Mat &) –

  • _fcontour (std::vector< cv::Point,std::allocator< cv::Point > > *) –

  • randomize (bool) –

printConf(self, file=stdout)[source]
Parameters

file (FILE *) –

property thisown

The membership flag

static version() char *[source]
write(self, feats, file=stdout)[source]
Parameters
  • feats (cv::Mat const &) –

  • file (FILE *) –

  • write(self

  • feats

  • fname)

  • feats

  • fname (char const *) –

textfeat.TextFeatExtractor_version() char *[source]
class textfeat.ptr_float[source]

Bases: object

Proxy of C++ ptr_float class.

Methods:

assign(self, value)

param value

cast(self)

frompointer(t)

param t

value(self)

Attributes:

thisown

The membership flag

assign(self, value)[source]
Parameters

value (float) –

cast(self) float *[source]
static frompointer(t) ptr_float[source]
Parameters

t (float *) –

property thisown

The membership flag

value(self) float[source]
textfeat.ptr_float_frompointer(t) ptr_float[source]
Parameters

t (float *) –