Class MarkToObjectConverter

Object
MarkToObjectConverter

public class MarkToObjectConverter extends Object
Converts a confidence-associated Mark to an equivalent ObjectMask.

A ScaleFactor is also applied to scale the Mark before conversion.

Author:
Owen Feehan
  • Constructor Details

    • MarkToObjectConverter

      public MarkToObjectConverter(Dimensions dimensions)
      Create for particular Dimensions without a scaling-factor.
      Parameters:
      dimensions - the dimensions of the final scaled-up scene, to ensure the ObjectMask is contained within.
    • MarkToObjectConverter

      public MarkToObjectConverter(Optional<ScaleFactor> scaleFactor, Dimensions dimensions)
      Create for particular Dimensions with a scaling-factor.
      Parameters:
      scaleFactor - the scaling-factor.
      dimensions - the dimensions of the final scaled-up scene, to ensure the ObjectMask is contained within.
    • MarkToObjectConverter

      public MarkToObjectConverter(Optional<ScaleFactor> scaleFactor, Dimensions dimensions, RegionMembershipWithFlags regionMembership, BinaryValuesByte binaryValuesOut)
      Creates a new MarkToObjectConverter instance.
      Parameters:
      scaleFactor - An optional scaling factor to apply to the mark, before converting to an ObjectMask.
      dimensions - The dimensions of the final scaled-up scene, to ensure the ObjectMask is contained within.
      regionMembership - The region-membership to use when convering the mark.
      binaryValuesOut - The binary-values to use in the created ObjectMask's buffers.
  • Method Details

    • convert

      public ObjectMask convert(Mark mark)
      Converts a Mark to an equivalent ObjectMask.
      Parameters:
      mark - the Mark to convert (whose state will be internally modified if a scale-factor is applied).
      Returns:
      an ObjectMask with scaling applied.