Background Color Visualization

Draw a colour in regions not detected by a model.

About this block

The Background Color Visualization block lets you change the color of regions not detected by a detection model.

This is useful for if you want to highlight detected regions so they are easier to see in an image, or if you want to remove backgrounds from an image.

By default, this block makes regions not detected by a detection model opaque. You can also configure the block to change the colour of undetected regions.

This block works with:

  • Object detection models

  • Segmentation models

The Label Visualization block.

What you can send into this block

To use this block, you need:

  1. An input image or video frame, and;

  2. Predictions from an Object Detection or Segmentation model.

What this block returns

This block makes regions not detected by a model more opaque.

Here is an example output from this block:

The background of the image is more opaque than the highlighted object

You can change the colour and opacity of the background from the block configuration options:

The colour can be any hex value or a common color like BLACK, WHITE, BLUE, or RED.

Here is an example where the background is set to BLACK and the opacity is set to 1:

The background is now completely removed from the image.

Use cases

This block is useful if you want to focus on regions in an image that have been detected, or if you want to remove undetected (background) regions from an image.

Last updated

Was this helpful?