102 int dpiX,
int dpiY,
int * centerX,
int * centerY,
double * finSlope);
120 int centerX,
int centerY,
double slope,
int bg_color);
140 int dpiX,
int dpiY,
int * top,
int * bot,
int * left,
int * right);
158 int top,
int bot,
int left,
int right);
192 int dpiX,
int dpiY,
double thresh);
209 int dpiX,
int dpiY,
int * angle);
void sanei_magic_init(void)
Initialize sanei_magic.
SANE_Status sanei_magic_findEdges(SANE_Parameters *params, SANE_Byte *buffer, int dpiX, int dpiY, int *top, int *bot, int *left, int *right)
Find the edges of the media inside the image, parallel to image edges.
SANE_Status sanei_magic_isBlank2(SANE_Parameters *params, SANE_Byte *buffer, int dpiX, int dpiY, double thresh)
Determine if image is blank, enhanced version.
SANE_Status sanei_magic_crop(SANE_Parameters *params, SANE_Byte *buffer, int top, int bot, int left, int right)
Crop the image, parallel to image edges.
SANE_Status sanei_magic_isBlank(SANE_Parameters *params, SANE_Byte *buffer, double thresh)
Determine if image is blank.
SANE_Status sanei_magic_despeck(SANE_Parameters *params, SANE_Byte *buffer, SANE_Int diam)
Update the image buffer, replacing dots with surrounding background color.
SANE_Status sanei_magic_turn(SANE_Parameters *params, SANE_Byte *buffer, int angle)
Coarse image rotation (90 degree increments)
SANE_Status sanei_magic_rotate(SANE_Parameters *params, SANE_Byte *buffer, int centerX, int centerY, double slope, int bg_color)
Correct the skew of the media inside the image, via simple rotation.
SANE_Status sanei_magic_findSkew(SANE_Parameters *params, SANE_Byte *buffer, int dpiX, int dpiY, int *centerX, int *centerY, double *finSlope)
Find the skew of the media inside the image, via edge detection.
SANE_Status sanei_magic_findTurn(SANE_Parameters *params, SANE_Byte *buffer, int dpiX, int dpiY, int *angle)
Determine coarse image rotation (90 degree increments)