Class SpatialLocator

java.lang.Object
org.apache.tika.inference.locator.SpatialLocator

public class SpatialLocator extends Object
Locator for a spatial region in an image or diagram.

The bounding box coordinates are normalized to [0, 1] relative to image dimensions. An optional label identifies the region (e.g. from object detection or VLM output).

  • Constructor Details

    • SpatialLocator

      public SpatialLocator(float[] bbox, String label)
      Parameters:
      bbox - normalized bounding box [x0, y0, x1, y1]
      label - optional label for the region, or null
    • SpatialLocator

      public SpatialLocator(float[] bbox)
  • Method Details

    • getBbox

      public float[] getBbox()
      Returns:
      normalized bbox [x0, y0, x1, y1]
    • getLabel

      public String getLabel()