reflectdetect.utils package

Submodules

reflectdetect.utils.apriltags module

reflectdetect.utils.debug module

reflectdetect.utils.exif module

reflectdetect.utils.iterators module

reflectdetect.utils.iterators.get_next(some_iterable: Iterable[Any], window: int = 1) Iterable[Any]

Get a value and the next value from an interable :param some_iterable: :param window: how many next values to get :return: an iterable containing the next value and the current value for each step

reflectdetect.utils.orthophoto module

reflectdetect.utils.panel module

reflectdetect.utils.paths module

reflectdetect.utils.paths.default(value: Any, default: Any) Any
Parameters:
  • value – some value

  • default – some default

Returns:

the value if it’s not none else the default

reflectdetect.utils.paths.get_output_path(dataset: Path, filepath: Path, new_ending: str, folder: str) Path

Gets the output path of a new file based on a filepath. It extracts the filename form the filepath and saves it with new ending to the specified folder in the dataset

Parameters:
  • dataset – The main folder

  • filepath – filepath the filename will be based on

  • new_ending – new file ending

  • folder – subfolder of the dataset to but the new file into

Returns:

a path of the new file

reflectdetect.utils.paths.is_tool_installed(name: str) bool
Parameters:

name – name of the executable tool

Returns:

whether it is on PATH and marked as executable

reflectdetect.utils.polygons module

reflectdetect.utils.thread module

reflectdetect.utils.thread.run_in_thread(func: Callable[[...], Any], throw_exceptions: bool = True, *args: Any, **kwargs: Any) Any | None

Runs a function in a separate thread, suppresses its output, and ignores any exceptions.

Parameters:
  • func – The function to run in a separate thread.

  • throw_exceptions – whether to throw an exception that might occur in the thread

  • args – Positional arguments to pass to the function.

  • kwargs – Keyword arguments to pass to the function.

Returns:

The result of the function, or None if an exception occurred.

Module contents