src/skew.c
l_int32
pixFindSkew(PIX        *pixs,
            l_float32  *pangle,
            l_float32  *pconf)
{
    PROCNAME("pixFindSkew");

    if (!pixs)
        return ERROR_INT("pixs not defined", procName, 1);
    if (pixGetDepth(pixs) != 1)
        return ERROR_INT("pixs not 1 bpp", procName, 1);
    if (!pangle)
        return ERROR_INT("&angle not defined", procName, 1);
    if (!pconf)
        return ERROR_INT("&conf not defined", procName, 1);

    return pixFindSkewSweepAndSearch(pixs, pangle, pconf,
                                     DEFAULT_SWEEP_REDUCTION,
                                     DEFAULT_BS_REDUCTION,
                                     DEFAULT_SWEEP_RANGE,
                                     DEFAULT_SWEEP_DELTA,
                                     DEFAULT_MINBS_DELTA);
}
/*!
 *  pixFindSkew()
 *
 *      Input:  pixs  (1 bpp)
 *              &angle   (<return> angle required to deskew, in degrees)
 *              &conf    (<return> confidence value is ratio max/min scores)
 *      Return: 0 if OK, 1 on error or if angle measurment not valid
 *
 *  Notes:
 *      (1) This is a simple high-level interface, that uses default
 *          values of the parameters for reasonable speed and accuracy.
 *      (2) The angle returned is the negative of the skew angle of
 *          the image.  It is the angle required for deskew.
 *          Clockwise rotations are positive angles.
 */
pixFindSkew()
Input:  pixs  (1 bpp)
∠   ( angle required to deskew, in degrees)
&conf    ( confidence value is ratio max/min scores)
Return: 0 if OK, 1 on error or if angle measurment not valid

(1) This is a simple high-level interface, that uses default
values of the parameters for reasonable speed and accuracy.
(2) The angle returned is the negative of the skew angle of
the image.  It is the angle required for deskew.
Clockwise rotations are positive angles.
pixFindSkew () Input : pixs ( 1 bpp ) ∠ ( angle required to deskew in degrees ) &conf ( confidence value is ratio max / min scores ) Return : 0 if OK 1 on error or if angle measurment not valid ( 1 ) This is a simple high - level interface that uses default values of the parameters for reasonable speed and accuracy . ( 2 ) The angle returned is the negative of the skew angle of the image . It is the angle required for deskew . Clockwise rotations are positive angles .
l_int32
pixFindSkew(PIX        *pixs,
            l_float32  *pangle,
            l_float32  *pconf)
{
    PROCNAME("pixFindSkew");
    if (!pixs)
        return ERROR_INT("pixs not defined", procName, 1);
    if (pixGetDepth(pixs) != 1)
        return ERROR_INT("pixs not 1 bpp", procName, 1);
    if (!pangle)
        return ERROR_INT("&angle not defined", procName, 1);
    if (!pconf)
        return ERROR_INT("&conf not defined", procName, 1);
    return pixFindSkewSweepAndSearch(pixs, pangle, pconf,
                                     DEFAULT_SWEEP_REDUCTION,
                                     DEFAULT_BS_REDUCTION,
                                     DEFAULT_SWEEP_RANGE,
                                     DEFAULT_SWEEP_DELTA,
                                     DEFAULT_MINBS_DELTA);
}
l_int32 pixFindSkew ( PIX * pixs , l_float32 * pangle , l_float32 * pconf ) { PROCNAME ( " " ) ; if ( ! pixs ) return ERROR_INT ( " " , procName , 1 ) ; if ( pixGetDepth ( pixs ) != 1 ) return ERROR_INT ( " " , procName , 1 ) ; if ( ! pangle ) return ERROR_INT ( " " , procName , 1 ) ; if ( ! pconf ) return ERROR_INT ( " " , procName , 1 ) ; return pixFindSkewSweepAndSearch ( pixs , pangle , pconf , DEFAULT_SWEEP_REDUCTION , DEFAULT_BS_REDUCTION , DEFAULT_SWEEP_RANGE , DEFAULT_SWEEP_DELTA , DEFAULT_MINBS_DELTA ) ; }
pixFindSkew()
      Input:  pixs  (1 bpp)
              &angle   (<return> angle required to deskew, in degrees)
              &conf    (<return> confidence value is ratio max/min scores)
      Return: 0 if OK, 1 on error or if angle measurment not valid
pixFindSkew () Input : pixs ( 1 bpp ) &angle ( <return > angle required to deskew in degrees ) &conf ( <return > confidence value is ratio max / min scores ) Return : 0 if OK 1 on error or if angle measurment not valid