From 9357d8f186760fda060fe3324d88480c877c21f3 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 4 Mar 2011 18:14:54 +0100 Subject: Transformation matrix shouldn't be integer --- src/detector.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/detector.c') diff --git a/src/detector.c b/src/detector.c index e53d5331..b9d91118 100644 --- a/src/detector.c +++ b/src/detector.c @@ -32,7 +32,7 @@ static int atob(const char *a) } -static int dir_conv(const char *a, signed int *sx, signed int *sy) +static int dir_conv(const char *a, double *sx, double *sy) { if ( strcmp(a, "-x") == 0 ) { *sx = -1; *sy = 0; @@ -79,8 +79,8 @@ struct rvec get_q(struct image *image, double fs, double ss, /* Convert xs and ys, which are in fast scan/slow scan coordinates, * to x and y */ - xs = (fs-p->min_fs)*p->fsx + (ss-p->min_ss)*p->ssx; - ys = (fs-p->min_fs)*p->fsy + (ss-p->min_ss)*p->ssy; + xs = (fs-(double)p->min_fs)*p->fsx + (ss-(double)p->min_ss)*p->ssx; + ys = (fs-(double)p->min_fs)*p->fsy + (ss-(double)p->min_ss)*p->ssy; rx = (xs + p->cnx) / p->res; ry = (ys + p->cny) / p->res; -- cgit v1.2.3