oops in hough_circle.c
This commit is contained in:
parent
b1c0acf3e2
commit
04070445eb
@ -84,16 +84,14 @@ vips_hough_circle_normalise( VipsHoughCircle *hough_circle )
|
|||||||
int radius = b * scale + min_radius;
|
int radius = b * scale + min_radius;
|
||||||
double circumference = 2 * VIPS_PI * radius;
|
double circumference = 2 * VIPS_PI * radius;
|
||||||
double ratio = max_circumference / circumference;
|
double ratio = max_circumference / circumference;
|
||||||
|
size_t n_pels = (size_t) width * height * bands;
|
||||||
|
|
||||||
int x, y;
|
size_t i;
|
||||||
guint *q;
|
guint *q;
|
||||||
|
|
||||||
q = b + (guint *) VIPS_IMAGE_ADDR( hough->out, 0, 0 );
|
q = b + (guint *) VIPS_IMAGE_ADDR( hough->out, 0, 0 );
|
||||||
for( y = 0; y < height; y++ ) {
|
for( i = 0; i < n_pels; i += bands )
|
||||||
for( x = 0; x < width; x++ )
|
q[i] *= ratio;
|
||||||
*q *= ratio;
|
|
||||||
q += bands;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user