@decorator_util.jit()<EOL>def total_border_pixels_from_mask_and_edge_pixels(mask, edge_pixels, masked_grid_index_to_pixel):
border_pixel_total = <NUM_LIT:0><EOL>for i in range(edge_pixels.shape[<NUM_LIT:0>]):<EOL><INDENT>if check_if_border_pixel(mask, edge_pixels[i], masked_grid_index_to_pixel):<EOL><INDENT>border_pixel_total += <NUM_LIT:1><EOL><DEDENT><DEDENT>return border_pixel_total<EOL>
Compute the total number of borders-pixels in a masks.