mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
ORB: support RGB images.
This commit is contained in:
parent
d5ab4e4919
commit
14617a0713
@ -343,7 +343,7 @@ static void image_scale(image_t *src, image_t *dst)
|
|||||||
int sy = (y*y_ratio)>>16;
|
int sy = (y*y_ratio)>>16;
|
||||||
for (int x=0; x<dst->w; x++) {
|
for (int x=0; x<dst->w; x++) {
|
||||||
int sx = (x*x_ratio)>>16;
|
int sx = (x*x_ratio)>>16;
|
||||||
dst->pixels[y*dst->w+x] = src->pixels[sy*src->w+sx];
|
dst->pixels[y*dst->w+x] = IM_TO_GS_PIXEL(src, sx, sy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5115,7 +5115,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_lbp_obj, 2, py_image_find_lbp);
|
|||||||
|
|
||||||
static mp_obj_t py_image_find_keypoints(uint n_args, const mp_obj_t *args, mp_map_t *kw_args)
|
static mp_obj_t py_image_find_keypoints(uint n_args, const mp_obj_t *args, mp_map_t *kw_args)
|
||||||
{
|
{
|
||||||
image_t *arg_img = py_helper_arg_to_image_grayscale(args[0]);
|
image_t *arg_img = py_helper_arg_to_image_mutable(args[0]);
|
||||||
|
|
||||||
rectangle_t roi;
|
rectangle_t roi;
|
||||||
py_helper_keyword_rectangle_roi(arg_img, n_args, args, 1, kw_args, &roi);
|
py_helper_keyword_rectangle_roi(arg_img, n_args, args, 1, kw_args, &roi);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user