DOCLIB is a C++ toolkit that provides document/image analysis capabilities through a thoroughly documented, easy to use interface. This library seeks to provide a functional, stable, and robust environment that supports a plethora of image types whereby applications (research or production) can be built on top of.

Although DOCLIB currently assumes a Beta status, it has been successfully used as the underlying library for several government applications. The OO design accounts for image processing functions that are straightforward in  approach, but also allows room for extendable, "research" oriented behavior(s) where there exists several different methods of implementation. Because our main audience are traditional C-devlelopers, many design decisions were made to facilitate its use for users not familiar with OO concepts. DOCLIB supports a standard code base that can be built on both Linux and Windows platforms. The development team is currently working on supporting Solaris 7.1 as well.

Please report any bugs found and/or any additional applicable features to DOCLIB at the Bugtracker site located in the Devlelopers Corner. All DOCLIB related documents can be found in the Development Corner. Alternatively, please contact Summit Sampat (sampat_summit@bah.com) or Stefan Jaeger (jaeger@umiacs.umd.edu) with technical questions and Lynn Golebiowski (golebiowski_lynn@bah.com) or David Doermann (doermann@umiacs.umd.edu) for acquisition related discussions.

 





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

DLDegradation Class Reference

#include <DLDegradation.h>

List of all members.

Public Member Functions

DLImage dlDegradationHorLines (const DLImage &image, const int iMinLength, const int iMaxLength, const int iMinWidth, const int iMaxWidth, const float fMinDensity, const float fMaxDensity, const int iLines)
DLImage dlDegradationVerLines (const DLImage &image, const int iMinLength, const int iMaxLength, const int iMinWidth, const int iMaxWidth, const float fMinDensity, const float fMaxDensity, const int iLines)
DLImage dlDegradationDiscretization (const DLImage &image, int iHorResolution, int iVerResolution, int iThreshold)
DLImage dlDegradationReSample (const DLImage &image, const float fHRatio, const float fVRatio, const int iThres)
DLImage dlDegradationRotate (const DLImage &image, double dAngle)
DLImage dlDegradationRotate (const DLImage &image, DLPoint pCenter, double dAngle)
DLImage dlDegradationAddSpeckles_WDistribution (DLImage &image, const vector< float > &pSpeckles)
DLImage dlDegradationGaussianBlur (const DLImage &image, const int iWidth, const float fDeviation, const int iPass, const float fProba, const int iThresh=127)
DLImage dlDegradationJitter (const DLImage &image, const float fRadius)

Protected Member Functions

int dlDegradationAddSpeckles_ChooseSize (const vector< float > &fvDistri)
bool dlDegradationAddSpeckles_IsPointAlreadyIn (const int i, const int j, const vector< DLPoint > &vPoint)
void dlDegradationAddSpeckles_GetNewPoint (const DLImage &image, int &i, int &j, const vector< DLPoint > &vPoint)
void dlDegradationAddSpeckles_PutDots (DLImage &image, const int x, const int y, const int i)
void dlDegradationGet_RotatedSize (const int iW, const int iH, const double cos_angle, const double sin_angle, DLPoint &ULP, DLPoint &BLP, DLPoint &URP)
void dlDegradationSetPixelScale (BYTE *data, int x, int y, BYTE bScale, int iDepth, int iW, int iH, int iRowsize)
int min4 (int a, int b, int c, int d)
int max4 (int a, int b, int c, int d)
float min4 (float a, float b, float c, float d)
float max4 (float a, float b, float c, float d)
DLImage dlDegradationDiscrete (const DLImage &image, const int iHorRes, const int iVerRes, const int iThres)
void dlDegradationPut_Lines (DLImage &image, const int iType, const int iX, const int iY, const int iL, const int iW, const float fP, const BYTE bPixel)
void dlDegradationGet_AddLines_Para (const int iType, const int iWidth, const int iHeight, const int iMinLength, const int iMaxLength, const int iMinWidth, const int iMaxWidth, const float fMinDensity, const float fMaxDensity, int &iX, int &iY, int &iW, int &iH, float &fP)
DLImage dlDegradationAddLines (const DLImage &image, int iType, const int iMinLength, const int iMaxLength, const int iMinWidth, const int iMaxWidth, const float fMinDensity, const float fMaxDensity, const int iLines)
bool dlDegradationCheck_AddLines_Para (const int iMinLength, const int iMaxLength, const int iMinWidth, const int iMaxWidth, const float fMinDensity, const float fMaxDensity, const int iLines, const int iNumber)
bool dlDegradationCheck_Resolution (const int iR, const int iS)
int dlDegradationGet_Black_Pixels (BYTE *imageData, const int width, const int x0, const int x1, const int y0, const int y1)
double drand () const
double drand48 () const
void dlDegradationGenerateGaussianFilter (double **dMask, const int iW, const float fD)
DLImage dlDegradationGaussianBlurByteImage (const DLImage &image, const int iWidth, const float fDeviation, const int iPass, const float fProba)
DLImage dlDegradationConvolute (const DLImage &image, double **dMask, const int iW, const int iPass, const float fProb)
DLImage dlDegradationConvolute_Color (const DLImage &image, double **dMask, const int iW, const int iPass, const float fProb)
DLImage dlDegradationConvolute_NonColor (const DLImage &image, double **dMask, const int iW, const int iPass, const float fProb)


Detailed Description

The DLDegradation class performs generic degradation operations on DLImage objects.


Member Function Documentation

DLImage DLDegradation::dlDegradationAddLines const DLImage image,
int  iType,
const int  iMinLength,
const int  iMaxLength,
const int  iMinWidth,
const int  iMaxWidth,
const float  fMinDensity,
const float  fMaxDensity,
const int  iLines
[protected]
 

Add Lines

Parameters:
iType 
iMinLength 
iMaxLength 
iMinWidth 
iMaxWidth 
fMinDensity 
fMaxDensity 
iLines 
Returns:
bool

DLImage DLDegradation::dlDegradationAddSpeckles_WDistribution DLImage image,
const vector< float > &  pSpeckles
 

Put the speckles randomly to the image

Parameters:
pSpeckles,including the 10 speckle size distribution
Returns:
degraded image

bool DLDegradation::dlDegradationCheck_AddLines_Para const int  iMinLength,
const int  iMaxLength,
const int  iMinWidth,
const int  iMaxWidth,
const float  fMinDensity,
const float  fMaxDensity,
const int  iLines,
const int  iNumber
[protected]
 

Check Lines

Parameters:
iMinLength 
iMaxLength 
iMinWidth 
iMaxWidth 
fMinDensity 
fMaxDensity 
iLines 
iNumber 
Returns:
bool

bool DLDegradation::dlDegradationCheck_Resolution const int  iR,
const int  iS
[protected]
 

Check Resolution

Parameters:
iR 
iS 
Returns:
bool

DLImage DLDegradation::dlDegradationDiscrete const DLImage image,
const int  iHorRes,
const int  iVerRes,
const int  iThres
[protected]
 

Discrete value

Parameters:
iHorRes 
iVerRes 
iThres 
Returns:
DLImage

DLImage DLDegradation::dlDegradationDiscretization const DLImage image,
int  iHorResolution,
int  iVerResolution,
int  iThreshold
 

discretization

Parameters:
iHorResolution 
iVerResolution 
iThreshold 
Returns:
image

DLImage DLDegradation::dlDegradationGaussianBlur const DLImage image,
const int  iWidth,
const float  fDeviation,
const int  iPass,
const float  fProba,
const int  iThresh = 127
 

Blurring the image using Gaussian lower pass fileter

Parameters:
iWidth,the width of GLPF's matrix
fDeviation,the standard deviation of gaussian filter
iPass,the number of passes
fProba,the chance of given pixel will be blurred
Returns:
degraded image

void DLDegradation::dlDegradationGet_AddLines_Para const int  iType,
const int  iWidth,
const int  iHeight,
const int  iMinLength,
const int  iMaxLength,
const int  iMinWidth,
const int  iMaxWidth,
const float  fMinDensity,
const float  fMaxDensity,
int &  iX,
int &  iY,
int &  iW,
int &  iH,
float &  fP
[protected]
 

Put Lines

Parameters:
iType 
iWidth 
iHeight 
iMinLength 
iMaxLength 
iMinWidth 
iMaxWidth 
fMinDensity 
fMaxDensity 
iX 
iY 
iW 
iH 
fP 

int DLDegradation::dlDegradationGet_Black_Pixels BYTE *  imageData,
const int  width,
const int  x0,
const int  x1,
const int  y0,
const int  y1
[protected]
 

Check Lines

Parameters:
imageData 
width 
x0 
x1 
y0 
y1 
Returns:
int

DLImage DLDegradation::dlDegradationHorLines const DLImage image,
const int  iMinLength,
const int  iMaxLength,
const int  iMinWidth,
const int  iMaxWidth,
const float  fMinDensity,
const float  fMaxDensity,
const int  iLines
 

Add the horizontal lines to an image

Parameters:
iMinLength minimum length
iMaxLength maximum length
iMinWidth minimum width
iMaxWidth maximum width
fMinDensity minimum density
fMaxDensity maximum density
iLines number of lines added
Returns:
bool modified image

DLImage DLDegradation::dlDegradationJitter const DLImage image,
const float  fRadius
 

Jitter the image

Parameters:
fRadius,the radius of the jitter
Returns:
degraded image

void DLDegradation::dlDegradationPut_Lines DLImage image,
const int  iType,
const int  iX,
const int  iY,
const int  iL,
const int  iW,
const float  fP,
const BYTE  bPixel
[protected]
 

Put Lines

Parameters:
iType 
iX 
iY 
iL 
iW 
fP 
bPixel 

DLImage DLDegradation::dlDegradationReSample const DLImage image,
const float  fHRatio,
const float  fVRatio,
const int  iThres
 

Resample

Parameters:
fHRatio 
fVRatio 
iThres 
Returns:
result image

DLImage DLDegradation::dlDegradationRotate const DLImage image,
DLPoint  pCenter,
double  dAngle
 

Rotate image (don't change the image size, and rotation point can be specified)

Parameters:
pCenter DLPoint to rotate arround
angle double to rotate image by
Returns:
rotated image

DLImage DLDegradation::dlDegradationRotate const DLImage image,
double  dAngle
 

Rotate image ( this will change the image size, and only rotate arround the center point)

Parameters:
angle double to rotate image by
Returns:
rotated image

void DLDegradation::dlDegradationSetPixelScale BYTE *  data,
int  x,
int  y,
BYTE  bScale,
int  iDepth,
int  iW,
int  iH,
int  iRowsize
[protected]
 

Degradation Set Pixel Scale

Parameters:
data 
x 
y 
bScale 
iDepth 
iW 
iH 
iRowsize 

DLImage DLDegradation::dlDegradationVerLines const DLImage image,
const int  iMinLength,
const int  iMaxLength,
const int  iMinWidth,
const int  iMaxWidth,
const float  fMinDensity,
const float  fMaxDensity,
const int  iLines
 

Add the vertical lines to an image

Parameters:
iMinLength minimum length
iMaxLength maximum length
iMinWidth minimum width
iMaxWidth maximum width
fMinDensity minimum density
fMaxDensity maximum density
iLines number of lines added
Returns:
modified image

double DLDegradation::drand48  )  const [inline, protected]
 

drand 48

Returns:
double

int DLDegradation::max4 int  a,
int  b,
int  c,
int  d
[protected]
 

max out of all values

Parameters:
a 
b 
c 
d 
Returns:
int

int DLDegradation::min4 int  a,
int  b,
int  c,
int  d
[protected]
 

min out of all values

Parameters:
a 
b 
c 
d 
Returns:
int


The documentation for this class was generated from the following file: * ************************************************************************ ************************************************************************ *
DocLib is being developed under contract by a collaboration between:
The Laboratory for Language and Media Processing
Unviersity of Maryland, College Park
and
Booz Allen Hamilton

All Rights Reserved, 2003
* *************************************************************************************************************************************************