mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Cast sin/cos to ints in draw_keypoints.
This commit is contained in:
parent
5467993b38
commit
cfdb4bdc90
@ -491,8 +491,8 @@ static mp_obj_t py_image_draw_keypoints(uint n_args, const mp_obj_t *args, mp_ma
|
||||
int cx = kp->x;
|
||||
int cy = kp->y;
|
||||
int size = arg_s/2;
|
||||
float si = sin_table[kp->angle] * size;
|
||||
float co = cos_table[kp->angle] * size;
|
||||
int si = (int) (sin_table[kp->angle] * size);
|
||||
int co = (int) (cos_table[kp->angle] * size);
|
||||
imlib_draw_line(arg_img, cx, cy, cx+co, cy+si, arg_c);
|
||||
imlib_draw_circle(arg_img, cx, cy, size, arg_c);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user