Skip to content

Utilities

Utility functions for logging and GPU/CPU operations.

Base Logger

Logging configuration for the Nellie package.

base_logger

Configures the base logger for the Nellie package.


GPU Functions

GPU/CPU-agnostic image thresholding functions.

gpu_functions

GPU/CPU-agnostic utility functions for image thresholding.

This module provides implementations of Otsu and triangle thresholding methods that work with both NumPy (CPU) and CuPy (GPU) backends.

otsu_threshold

otsu_threshold(matrix, nbins=256, xp=None)

GPU/CPU-agnostic implementation of Otsu's threshold. Operates on an n-d array using the current xp backend.

triangle_threshold

triangle_threshold(matrix, nbins=256, xp=None)

GPU/CPU-agnostic implementation of triangle threshold. Operates on an n-d array using the current xp backend.