Vanishing point estimation
Instantiate a vanishing point detector
- limap.image.groups.vplib.get_vp_detector(method: str, vpoptions: DetectorOptions)
Get a vanishing point detector
- class limap.image.groups.vplib.DetectorOptions(base_options: limap._limap._image._groups._vplib.BaseVPDetectorOptions = <factory>, jlinkage_options: limap.image.groups.vplib.register_vp_detector.JLinkageOptions = <factory>)
- __init__(base_options: BaseVPDetectorOptions = <factory>, jlinkage_options: JLinkageOptions = <factory>) None
- base_options: BaseVPDetectorOptions
- jlinkage_options: JLinkageOptions
Base interface
- class limap.image.groups.vplib.base_vp_detector.BaseVPDetector(options=BaseVPDetectorOptions(min_length=40.0, inlier_threshold=1.0, min_num_supports=5, n_jobs=-1))
- __init__(options=BaseVPDetectorOptions(min_length=40.0, inlier_threshold=1.0, min_num_supports=5, n_jobs=-1))
- detect_vp(lines: list[Line2d], image_path: Path | None = None) VPResult
Virtual method (need to be implemented) - detect vanishing points
- detect_vp_all_images(all_lines: dict[int, list[Line2d]], image_paths: dict[int, Path] | None = None) dict[int, VPResult]
Detect vanishing points on multiple images with multiple processes
- get_module_name() str
Virtual method (need to be implemented) - return the name of the module
- visualize(fname, img, lines, vpresult, show_original=False, endpoints=False)
- class limap.image.groups.vplib.BaseVPDetectorOptions
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: limap._limap._image._groups._vplib.BaseVPDetectorOptions) -> None
__init__(self: limap._limap._image._groups._vplib.BaseVPDetectorOptions, kwargs: dict) -> None
__init__(self: limap._limap._image._groups._vplib.BaseVPDetectorOptions, **kwargs) -> None
- mergedict(self: object, kwargs: dict) None
- summary(self: limap._limap._image._groups._vplib.BaseVPDetectorOptions, write_type: bool = False) str
- todict(self: limap._limap._image._groups._vplib.BaseVPDetectorOptions, recursive: bool = True) dict
- property inlier_threshold
1.0)
- Type:
(float, default
- property min_length
40.0)
- Type:
(float, default
- property min_num_supports
- Type:
(int, default
- property n_jobs
-1)
- Type:
(int, default
Results
A detector returns a VPResult per image, which the frontend converts
into the 2D groups stored in the structure database.
- class limap.image.groups.vplib.VPResult
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: limap._limap._image._groups._vplib.VPResult) -> None
__init__(self: limap._limap._image._groups._vplib.VPResult, arg0: collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], arg1: collections.abc.Sequence[typing.Annotated[numpy.typing.ArrayLike, numpy.float64, “[3, 1]”]]) -> None
__init__(self: limap._limap._image._groups._vplib.VPResult, arg0: limap._limap._image._groups._vplib.VPResult) -> None
__init__(self: limap._limap._image._groups._vplib.VPResult, kwargs: dict) -> None
__init__(self: limap._limap._image._groups._vplib.VPResult, **kwargs) -> None
- count_lines(self: limap._limap._image._groups._vplib.VPResult) int
- count_vps(self: limap._limap._image._groups._vplib.VPResult) int
- get_vp(self: limap._limap._image._groups._vplib.VPResult, line_id: SupportsInt | SupportsIndex) Annotated[numpy.typing.NDArray[numpy.float64], '[3, 1]']
- get_vp_label(self: limap._limap._image._groups._vplib.VPResult, line_id: SupportsInt | SupportsIndex) int
- get_vp_params(self: limap._limap._image._groups._vplib.VPResult, vp_id: SupportsInt | SupportsIndex) Annotated[numpy.typing.NDArray[numpy.float64], '[3, 1]']
- has_vp(self: limap._limap._image._groups._vplib.VPResult, line_id: SupportsInt | SupportsIndex) bool
- mergedict(self: object, kwargs: dict) None
- summary(self: limap._limap._image._groups._vplib.VPResult, write_type: bool = False) str
- todict(self: limap._limap._image._groups._vplib.VPResult, recursive: bool = True) dict
- property labels
[])
- Type:
(list, default
- property vps
[])
- Type:
(list, default
- limap.image.groups.vplib.convert_vpresult_to_groups2d(vpresult: limap._limap._image._groups._vplib.VPResult) list[limap._limap._scene.Group2d]
- limap.image.groups.vplib.convert_vpresults_to_groups2d(vpresults: boost::unordered::unordered_flat_map<unsigned int, limap: :image::groups::vplib::VPResult, std: :hash<unsigned int>, std: :equal_to<unsigned int>, std: :allocator<std::pair<unsigned int const, limap: :image::groups::vplib::VPResult> > >) boost::unordered::unordered_flat_map<unsigned int, std::vector<limap::Group2d, std::allocator<limap::Group2d> >, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, std::vector<limap::Group2d, std::allocator<limap::Group2d> > > > >
JLinkage
The bundled J-Linkage implementation. Its parameters
(JLinkageOptions here) are distinct from the registry-level
JLinkageOptions above.
- class limap.image.groups.vplib.JLinkageOptions
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: limap._limap._image._groups._vplib.JLinkageOptions) -> None
__init__(self: limap._limap._image._groups._vplib.JLinkageOptions, kwargs: dict) -> None
__init__(self: limap._limap._image._groups._vplib.JLinkageOptions, **kwargs) -> None
- mergedict(self: object, kwargs: dict) None
- summary(self: limap._limap._image._groups._vplib.JLinkageOptions, write_type: bool = False) str
- todict(self: limap._limap._image._groups._vplib.JLinkageOptions, recursive: bool = True) dict
- property base_options
BaseVPDetectorOptions(min_length=40.0, inlier_threshold=1.0, min_num_supports=5, n_jobs=-1))
- Type:
(BaseVPDetectorOptions, default
- property th_perp_supports
3.0)
- Type:
(float, default
- class limap.image.groups.vplib.JLinkage
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: limap._limap._image._groups._vplib.JLinkage) -> None
__init__(self: limap._limap._image._groups._vplib.JLinkage, arg0: limap._limap._image._groups._vplib.JLinkageOptions) -> None
__init__(self: limap._limap._image._groups._vplib.JLinkage, kwargs: dict) -> None
__init__(self: limap._limap._image._groups._vplib.JLinkage, **kwargs) -> None
- associate_vps(self: limap._limap._image._groups._vplib.JLinkage, arg0: collections.abc.Sequence[limap._limap._geometry.Line2d]) limap._limap._image._groups._vplib.VPResult
- associate_vps_parallel(self: limap._limap._image._groups._vplib.JLinkage, arg0: collections.abc.Mapping[SupportsInt | SupportsIndex, collections.abc.Sequence[limap._limap._geometry.Line2d]]) dict[int, limap._limap._image._groups._vplib.VPResult]
- compute_vp_labels(self: limap._limap._image._groups._vplib.JLinkage, arg0: collections.abc.Sequence[limap._limap._geometry.Line2d]) list[int]
- mergedict(self: object, kwargs: dict) None
- summary(self: limap._limap._image._groups._vplib.JLinkage, write_type: bool = False) str
- todict(self: limap._limap._image._groups._vplib.JLinkage, recursive: bool = True) dict