5.3.4.81. Function image_color_draw_BBs

5.3.4.81.1. Function Documentation

void image_color_draw_BBs(img_data_t *img_data, const uint8_t **img, const enum pixfmt_e pixfmt, const BB_t *BBs, const enum color_e *BBs_color, const size_t n_BBs, const uint8_t show_id, const uint8_t is_gt, const uint8_t draw_legend)

Draw bounding boxes (BBs) on a color image. If the program is linked with the OpenCV library, then the show_id boolean can be used to draw the ids corresponding to each BB on the color image. Moreover, if the program is linked with OpenCV, this routine add the legend on the top left corner.

Parameters
  • img_data – Image data.

  • img – 2D grayscale or color image (2D array of size \([\texttt{img\_data->height}][\texttt{img\_data->width}]\)). This image will be copied in img_data.

  • pixfmt – Pixels format (grayscale or RGB) of img.

  • BBs – List of bounding boxes.

  • BBs_color – List of colors associated to the bounding boxes.

  • n_BBs – Number of bounding boxes to draw.

  • show_id – Boolean to enable display of the BB ids (has no effect if the program has not be linked with the OpenCV).

  • is_gt – Boolean to draw the ground truth legend (has no effect is the program has not been linked with OpenCV).

  • draw_legend – If 1, draw the legend (has no effect is the program has not been linked with OpenCV).