Region

Description

A region is a set of pixel locations, or an optimized representation of a binary image.

Technically, a region is defined by its FrameWidth, FrameHeight and a run-length encoded list of (x, y) Location.

An image of a blade.

The region corresponding to the object of the blade.

Regions are typically used to identify sets of pixels corresponding to some objects within an image. This information can be used for high-level information retrieval (so called Region Analysis) or as a parameter of some further image processing operations constrained to this particular set of pixels.

Remarks

  • Connected components within regions are called blobs.
  • Most of image processing operations have an optional inRoi (Region of Interest) input.
  • Regions can be automatically converted to images without any loss of information.
  • Images can be manually converted to regions using the ThresholdToRegion filter.
  • Maximum region frame dimensions are 65535 x 65535.
  • Technically, the compressed representation of a region is a list of so called point-runs. A point-run consist of three 16-bit unsigned integers: X, Y and Length, and represents a horizontal sequence of consecutive pixel locations. Point-runs in a region are sorted by Y and X coordinates (in this order), are guaranteed not to overlap and not to exceed the region frame dimensions (0..FrameWidth-1, 0..FrameHeight-1). It is also not allowed to create a region with two point-runs that could be merged into a single one.