cedalion.io.photogrammetry

Module for reading photogrammetry output file formats.

Functions

opt_fid_to_xr(fiducials, optodes[, units])

Convert OrderedDicts fiducials and optodes to cedalion LabeledPoints objects.

read_einstar(fn)

Read optodes and fiducials from einstar devices.

read_photogrammetry_einstar(fn[, units])

Read optodes and fiducials from photogrammetry pipeline.

cedalion.io.photogrammetry.read_photogrammetry_einstar(fn, units=<Unit('millimeter')>)[source]

Read optodes and fiducials from photogrammetry pipeline.

This method reads the output file as returned by the photogrammetry pipeline using an einstar device.

Parameters:
  • fn (str) – The filename of the einstar photogrammetry output file.

  • units – Units of the coordinates in the file. Defaults to millimetres (Einstar convention). Pass e.g. cedalion.units.m for exports in metres.

Returns:

A tuple containing:
  • fiducials (cedalion.LabeledPoints): The fiducials as a cedalion

    LabeledPoints object.

  • optodes (cedalion.LabeledPoints): The optodes as a cedalion LabeledPoints

    object.

Return type:

tuple

cedalion.io.photogrammetry.read_einstar(fn)[source]

Read optodes and fiducials from einstar devices.

Parameters:

fn (str) – The filename of the einstar photogrammetry output file.

Returns:

A tuple containing:
  • fiducials (OrderedDict): The fiducials as an OrderedDict.

  • optodes (OrderedDict): The optodes as an OrderedDict.

Return type:

tuple

cedalion.io.photogrammetry.opt_fid_to_xr(fiducials, optodes, units=<Unit('millimeter')>)[source]

Convert OrderedDicts fiducials and optodes to cedalion LabeledPoints objects.

Parameters:
  • fiducials (OrderedDict) – The fiducials as an OrderedDict.

  • optodes (OrderedDict) – The optodes as an OrderedDict.

  • units – Units to attach to the returned LabeledPoints. Defaults to mm.

Returns:

A tuple containing:
  • fiducials (cedalion.LabeledPoints): The fiducials as a cedalion

    LabeledPoints object.

  • optodes (cedalion.LabeledPoints): The optodes as a cedalion LabeledPoints

    object.

Return type:

tuple