cedalion.geometry.photogrammetry.processors

Vertex classifiers.

Functions

geo3d_from_scan(scalp_coords, landmarks)

Creates a geo3D with optode and landmark positions from photogrammetric scans.

pca(vertices)

Classes

ColoredStickerProcessor(colors, tuple[float, ...)

Searches for colored circular patches.

ColoredStickerProcessorDetails(...)

ScanProcessor()

Base class for all processors of photogrammetric scans.

cedalion.geometry.photogrammetry.processors.minEnclosingCircle(points) center, radius[source]

. @brief Finds a circle of the minimum area enclosing a 2D point set. . . The function finds the minimal enclosing circle of a 2D point set using an iterative algorithm. . . @param points Input vector of 2D points, stored in std::vector<> or Mat . @param center Output center of the circle. . @param radius Output radius of the circle.

class cedalion.geometry.photogrammetry.processors.ScanProcessor[source]

Bases: ABC

Base class for all processors of photogrammetric scans.

Initial Contributors:
abstract process(
surface: TrimeshSurface,
) DataArray[source]
cedalion.geometry.photogrammetry.processors.pca(vertices: ndarray)[source]
class cedalion.geometry.photogrammetry.processors.ColoredStickerProcessorDetails(
cluster_coords: list[numpy.ndarray],
cluster_circles: list[tuple[float, float, float]],
cluster_colors: list[numpy.ndarray],
vertex_colors: numpy.ndarray,
vertex_hue: numpy.ndarray,
vertex_value: numpy.ndarray,
cfg_colors: dict[str, float],
vertex_sat: numpy.ndarray,
)[source]

Bases: object

cluster_coords: list[ndarray][source]
cluster_circles: list[tuple[float, float, float]][source]
cluster_colors: list[ndarray][source]
vertex_colors: ndarray[source]
vertex_hue: ndarray[source]
vertex_value: ndarray[source]
cfg_colors: dict[str, float][source]
vertex_sat: ndarray[source]
plot_cluster_circles()[source]

Plot for each cluster the vertex coordinates in the sticker plan.

plot_vertex_colors1()[source]
plot_vertex_colors()[source]
class cedalion.geometry.photogrammetry.processors.ColoredStickerProcessor(colors: dict[str, tuple[float, float, float, float]], sticker_radius: ~pint.Quantity = <Quantity(6.5, 'millimeter')>, min_nvertices: int = 50, cluster_eps: float = 0.2, saturation_min: float = 0.6)[source]

Bases: ScanProcessor

Searches for colored circular patches.

process(
surface: TrimeshSurface,
details: bool = False,
) tuple[Annotated[DataArray, DataArraySchema(dims='label', coords='label', 'label', 'type')], DataArray] | tuple[Annotated[DataArray, DataArraySchema(dims='label', coords='label', 'label', 'type')], DataArray, ColoredStickerProcessorDetails][source]

Process a scanned surface.

Parameters:
  • surface – the textured scan

  • details – return additional information

Returns:

extracted sticker positions surface normal vectors aux. detail object if detail == True

cedalion.geometry.photogrammetry.processors.geo3d_from_scan(
scalp_coords: Annotated[DataArray, DataArraySchema(dims='label', coords='label', 'label', 'type')],
landmarks: Annotated[DataArray, DataArraySchema(dims='label', coords='label', 'label', 'type')],
)[source]

Creates a geo3D with optode and landmark positions from photogrammetric scans.

Parameters:
  • scalp_coords – 3D coordinates of optodes on the scalp from photogrammetric coregistration.

  • landmarks – 3D coordinates of landmarks on the scalp from photogrammetric coregistration.

Returns:

geo3D with optode and landmark positions

Initial Contributors: