Skip to content

Commit

Permalink
fixed missing break statement in py_net_search.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dech committed Apr 28, 2019
1 parent 3bfc4f0 commit c06a576
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/omv/py/py_nn.c
Expand Up @@ -206,16 +206,19 @@ STATIC mp_obj_t py_net_search(uint n_args, const mp_obj_t *args, mp_map_t *kw_ar
int pixel = COLOR_BINARY_TO_GRAYSCALE(IMAGE_GET_BINARY_PIXEL(arg_img, a, b));
sum += pixel;
sum_2 += pixel * pixel;
break;
}
case IMAGE_BPP_GRAYSCALE: {
int pixel = IMAGE_GET_GRAYSCALE_PIXEL(arg_img, a, b);
sum += pixel;
sum_2 += pixel * pixel;
break;
}
case IMAGE_BPP_RGB565: {
int pixel = COLOR_RGB565_TO_GRAYSCALE(IMAGE_GET_RGB565_PIXEL(arg_img, a, b));
sum += pixel;
sum_2 += pixel * pixel;
break;
}
}
}
Expand Down

0 comments on commit c06a576

Please sign in to comment.