Skip to content

keypoints

keypoints #

The keypoints scalar; a loaded Keypoints is the .npz path.

Keypoints #

Bases: NumpyScalar

The local features found in one image.

  • xy: pixel centres, expressed at the stored image's size whatever size the detector ran at.
  • scale: feature scales in pixels.
  • angle: orientations in degrees.
  • descriptors: 128-byte descriptors.
  • color: RGB sampled from the image at each centre.
  • width, height: the image size xy is expressed at.

Analysis-only: produced by a recipe, never captured, so it has no platform mirror and no place in a schema.

Source code in capturegraph-recipes/capturegraph_recipes/types/reconstruction/keypoints.py
class Keypoints(cg.NumpyScalar, name="edu.cornell.keypoints"):
    """The local features found in one image.

    - ``xy``: pixel centres, expressed at the stored image's size whatever
      size the detector ran at.
    - ``scale``: feature scales in pixels.
    - ``angle``: orientations in degrees.
    - ``descriptors``: 128-byte descriptors.
    - ``color``: RGB sampled from the image at each centre.
    - ``width``, ``height``: the image size ``xy`` is expressed at.

    Analysis-only: produced by a recipe, never captured, so it has no platform
    mirror and no place in a schema.
    """

    __slots__ = ()

    analysis_only = True

    layout = {
        "xy": ("float32", (-1, 2)),
        "scale": ("float32", (-1,)),
        "angle": ("float32", (-1,)),
        "descriptors": ("uint8", (-1, 128)),
        "color": ("uint8", (-1, 3)),
        "width": ("int32", ()),
        "height": ("int32", ()),
    }