Group primitives
“Groups” is the umbrella term for vanishing points, planes and parametric
primitives (sphere, cylinder, ellipsoid, cuboid, cone). Each type is
identified by a GroupType and parameterized by a
flat vector of parameters, whose layout and length depend on the type. The
helpers below query, initialize and normalize those parameters.
- class limap.geometry.GroupType
Members:
INVALID
VP
PLANE
SPHERE
CYLINDER
ELLIPSOID
CUBOID
CONE
- CONE = <GroupType.CONE: 6>
- CUBOID = <GroupType.CUBOID: 5>
- CYLINDER = <GroupType.CYLINDER: 3>
- ELLIPSOID = <GroupType.ELLIPSOID: 4>
- INVALID = <GroupType.INVALID: -1>
- PLANE = <GroupType.PLANE: 1>
- SPHERE = <GroupType.SPHERE: 2>
- VP = <GroupType.VP: 0>
- GroupType.name -> str
- property value
- limap.geometry.get_num_params_in_2d_by_group_type(type: limap._limap._geometry.GroupType) int
Get number of parameters for the corresponding group type in 2D
- limap.geometry.get_num_params_in_3d_by_group_type(type: limap._limap._geometry.GroupType) int
Get number of parameters for the corresponding group type in 3D
- limap.geometry.get_default_group_params_2d(type: limap._limap._geometry.GroupType) list[float]
Get default 2D parameters for a group type
- limap.geometry.get_default_group_params_3d(type: limap._limap._geometry.GroupType) list[float]
Get default 3D parameters for a group type
- limap.geometry.initialize_group_params(type: limap._limap._geometry.GroupType, points: collections.abc.Sequence[Annotated[numpy.typing.ArrayLike, numpy.float64, '[3, 1]']], lines: collections.abc.Sequence[limap::Line3d], init_ransac_thresh: SupportsFloat | SupportsIndex = -1.0) list[float] | None
Initialize group parameters from geometric features. Returns the parameter vector if successful, None otherwise. If init_ransac_thresh <= 0, uses the group’s default threshold.
- limap.geometry.normalize_group_params_3d(type: limap._limap._geometry.GroupType, params: collections.abc.Sequence[SupportsFloat | SupportsIndex]) list[float]
Normalize 3D group parameters to canonical form. Returns normalized params.
- limap.geometry.check_group_params_3d(type: limap._limap._geometry.GroupType, params: collections.abc.Sequence[SupportsFloat | SupportsIndex], tol: SupportsFloat | SupportsIndex = 1e-06) bool
Check if 3D group parameters are valid and normalized