DLSkew.h

Go to the documentation of this file.
00001 #ifndef _DLSKEW_H_
00002 #define _DLSKEW_H_
00003 
00004 #include "DLImage.h"
00005 #include "DLPoint.h"
00006 #include "DLBitsPerPixelConverter.h"
00007 #include "DLAngle.h"
00008 
00009 #include <cmath>
00010 
00017 class DLSkew
00018 {
00019    private:
00020    typedef struct {
00021       float x,y,area;
00022    } DLSkewSpot;
00023 
00024    public:
00026 
00029    DLSkew();
00030 
00034    virtual ~DLSkew();
00036 
00045    static double dlDetectSkewTwoBit(const DLImage &in);
00046 
00051    static double dlDetectSkew(const DLImage & image, const DLAngle & lowerBound,
00052                               const DLAngle & upperBound, const DLAngle & delta);
00053 
00090    static double dlDetectSkew(const DLImage& image, double lowerBound = -20, double upperBound = 20, double delta = 1); 
00091 
00092    private:
00093 
00094    static double dliGetSkewAngleTwoBit(int iCols, int iRows, DLSkewSpot *points, int number_points, double max_angle);
00095 
00096 
00106    static double dlCalculateSkew(DLImage *byteImage, DLPointList *head, double lowerBound, double upperBound, double delta) ;
00107 
00108 
00109 };//end class
00110 
00111 #endif //_DLSKEW_H_

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-2007