View Source ExVision.Types.BBox (Ex Vision v0.4.0)

A struct describing the bounding box returned by the object detection model.

Summary

Types

t()

Exactly like t/1, but doesn't put any constraints on the label field

A type describing the Bounding Box object.

Functions

Return the height of the bounding box

Return the width of the bounding box

Types

@type t() :: t(term())

Exactly like t/1, but doesn't put any constraints on the label field:

@type t(label_t) :: %ExVision.Types.BBox{
  label: label_t,
  score: number(),
  x1: number(),
  x2: number(),
  y1: number(),
  y2: number()
}

A type describing the Bounding Box object.

Bounding box is a rectangle encompassing the region. When used in object detectors, this box will describe the location of the object in the image.

  • x1 - x componenet of the upper left corner
  • y1 - y componenet of the upper left corner
  • x2 - x componenet of the lower right
  • y2 - y componenet of the lower right
  • score - confidence of the predition
  • label - label assigned to this bounding box

Functions

@spec height(t()) :: number()

Return the height of the bounding box

@spec width(t()) :: number()

Return the width of the bounding box