Main Page | Namespace List | Class List | Directories | File List | Class Members | File Members

objectInfoClass Class Reference

#include <objectInfoClass.h>

List of all members.

Public Member Functions

 objectInfoClass (std::string filename, JScript *scriptInfo, int line_count_limit, char *output_directory, int pixelDataFlag, int scansoftFlag, int dctFlag)
 objectInfoClass (std::string filename, JScript *scriptInfo, int scansoftFlag, int dctFlag)
 ~objectInfoClass ()
int getObjectCount () const
objectInfoobjectStructure () const
void printObjectInfo (char *filename)
void printTextLineInfo (FILE *fp)
unsigned long getImageHeight () const
unsigned long getImageWidth () const
unsigned long getOriginalImageHeight () const
unsigned long getOriginalImageWidth () const
double getOriginalSkew () const
unsigned char * getPixelData () const
double getSlopeVarSqr () const
int getLineCount () const
char * getScript ()
char * getBestFitScript ()
int getlineDirection ()
int getscriptIdOrientation ()
void writeG4Tiff (char *fname)
void writeG4TiffGray (char *fname, float *skew, int image_rotation)
void writeG4TiffGray (char *fname, int orientation)
float getPeakValue () const
float getPeakRatio () const
double getNormLineHeightVar () const
double getNormLineWidthVar () const
double getNormLineLeftIndentVar () const
double getNormLineRightIndentVar () const
double getAvgLineHeight () const
void computeScansoftSegments (DLImage *doink, objectInfo *imageObjects, int *index, char *filename)
int countScansoftSegments (char *filename)
objectInfocomputeObjectInfo (std::string fname, int pixelDataFlag)
void computeInterlineSpacingFeatures (DLImage *doink, DLlineInfo *textLines, int long_line_count, float *peakValue, float *peakRatio)
void find_first_peak (double *input_array, int length, int offset, int *location)
void computeLineStatistics (DLlineInfo *textLines, int long_line_count)
void getSkewRotationCorrectedImageData (char *fname, float *skew, int rotation, unsigned char **ptr, int *new_height, int *new_width)
int tbComputeDCT (double *input, int winsize, double **dct_array)
void tbCalcMeanStddev (float *values, int value_count, double *mean, double *stddev)
void tbStructureComputeMeanStddev (double *values, int value_count, int separation, double *mean, double *stddev)
void tbComputeMeanStddev (double *values, int value_count, double *mean, double *stddev)


Detailed Description

The objectInfoClass is used to contain a collection of information/features calculated for a document image.


Constructor & Destructor Documentation

objectInfoClass::objectInfoClass std::string  filename,
JScript *  scriptInfo,
int  line_count_limit,
char *  output_directory,
int  pixelDataFlag,
int  scansoftFlag,
int  dctFlag
 

This method creates and instance of an objectInfoClass. The following paramenters are used: filename - path the the image file scriptInfo - an instance of the JScript classed that is used to calculate page level script identification line_count_limit - maximum number of text lines to include in the class output_directory - directory where output data files containing the object info. are stored. Prior to computing the needed features, the software will look in the specified data directory to see if a .dat file corresponding to the image exists. If so, the data in that file will be read in instead of recalculating the features. pixelDataFlag - indicates whether the pixel data for the image should be stored in the class scansoftFlag - unused at this point. Can be used, with code modifications to indicate if scansoft bounding boxes should be included. dctFlag - indicates if features relating to interline spacing should be included.

objectInfoClass::objectInfoClass std::string  filename,
JScript *  scriptInfo,
int  scansoftFlag,
int  dctFlag
 

This method creates and instance of an objectInfoClass. The following paramenters are used: filename - path the the image file scriptInfo - an instance of the JScript classed that is used to calculate page level script identification scansoftFlag - unused at this point. Can be used, with code modifications to indicate if scansoft bounding boxes should be included. dctFlag - indicates if features relating to interline spacing should be included.

objectInfoClass::~objectInfoClass  ) 
 

This method destroys and instance of an objectInfoClass.


Member Function Documentation

void objectInfoClass::computeInterlineSpacingFeatures DLImage *  doink,
DLlineInfo *  textLines,
int  long_line_count,
float *  peakValue,
float *  peakRatio
 

void objectInfoClass::computeLineStatistics DLlineInfo *  textLines,
int  long_line_count
 

objectInfo* objectInfoClass::computeObjectInfo std::string  fname,
int  pixelDataFlag
 

void objectInfoClass::computeScansoftSegments DLImage *  doink,
objectInfo imageObjects,
int *  index,
char *  filename
 

int objectInfoClass::countScansoftSegments char *  filename  ) 
 

void objectInfoClass::find_first_peak double *  input_array,
int  length,
int  offset,
int *  location
 

double objectInfoClass::getAvgLineHeight  )  const [inline]
 

getAvgLineHeight returns the average line height

char* objectInfoClass::getBestFitScript  )  [inline]
 

getBestFitScript returns the best fitting image script as calculated by the JScript class. This may or may not be the same value as returned by the getScript class. There are occasions where an image is classified as unknown. This occurs when the best fitting script is

unsigned long objectInfoClass::getImageHeight  )  const [inline]
 

getImageHeight returns the height of the deskewed image

unsigned long objectInfoClass::getImageWidth  )  const [inline]
 

getImageWidth returns the width of the deskewed image

int objectInfoClass::getLineCount  )  const [inline]
 

getLineCount returns the number of text lines calculated

int objectInfoClass::getlineDirection  )  [inline]
 

getlineDirection returns the line orientation (horizontal/vertical) of the text

double objectInfoClass::getNormLineHeightVar  )  const [inline]
 

getNormLineHeightVar returns the square of the normalized height variation

double objectInfoClass::getNormLineLeftIndentVar  )  const [inline]
 

getNormLineIndentVar returns the square of the left indent variation

double objectInfoClass::getNormLineRightIndentVar  )  const [inline]
 

getNormLineRightIndentVar returns the square of the right indent variation

double objectInfoClass::getNormLineWidthVar  )  const [inline]
 

getNormLineHeightVar returns the square of the normalized height variation

int objectInfoClass::getObjectCount  )  const [inline]
 

unsigned long objectInfoClass::getOriginalImageHeight  )  const [inline]
 

getImageHeight returns the height of the original image

unsigned long objectInfoClass::getOriginalImageWidth  )  const [inline]
 

getImageWidth returns the width of the original image

double objectInfoClass::getOriginalSkew  )  const [inline]
 

getOriginalSkew returns the skew value calculated

float objectInfoClass::getPeakRatio  )  const [inline]
 

getPeakRatio - This is not yet implemented.

float objectInfoClass::getPeakValue  )  const [inline]
 

getPeakValue returns the value corresponding to the first peak of the dct used to compute the interlinen spacing. This is not yet implemented.

unsigned char* objectInfoClass::getPixelData  )  const [inline]
 

getPixelData returns an 8 bit/pixel representation of the pixel data

char* objectInfoClass::getScript  )  [inline]
 

getScript returns the image script as calculated by the JScript class

int objectInfoClass::getscriptIdOrientation  )  [inline]
 

getscriptIdOrientation returns the image orientation as calculated by the JScript class

void objectInfoClass::getSkewRotationCorrectedImageData char *  fname,
float *  skew,
int  rotation,
unsigned char **  ptr,
int *  new_height,
int *  new_width
 

double objectInfoClass::getSlopeVarSqr  )  const [inline]
 

getSlopeVarSqr returns the variance of the slope values squared

objectInfo* objectInfoClass::objectStructure  )  const [inline]
 

void objectInfoClass::printObjectInfo char *  filename  ) 
 

void objectInfoClass::printTextLineInfo FILE *  fp  ) 
 

void objectInfoClass::tbCalcMeanStddev float *  values,
int  value_count,
double *  mean,
double *  stddev
 

int objectInfoClass::tbComputeDCT double *  input,
int  winsize,
double **  dct_array
 

void objectInfoClass::tbComputeMeanStddev double *  values,
int  value_count,
double *  mean,
double *  stddev
 

void objectInfoClass::tbStructureComputeMeanStddev double *  values,
int  value_count,
int  separation,
double *  mean,
double *  stddev
 

void objectInfoClass::writeG4Tiff char *  fname  ) 
 

writeG4Tiff writes out a group 4 compressed version of the original image

void objectInfoClass::writeG4TiffGray char *  fname,
int  orientation
 

writeG4Tiff writes out a group 4 compressed version of image rotated according to the values specified by the input parameters. This is not yet implemented.

void objectInfoClass::writeG4TiffGray char *  fname,
float *  skew,
int  image_rotation
 

writeG4Tiff writes out a group 4 compressed version of image rotated and deskewed according to the values specified by the input parameters.


The documentation for this class was generated from the following file:
Generated on Tue Aug 29 11:42:42 2006 for PageLayoutDOCLIB by  doxygen 1.4.2