Segment
source module isofit.utils.segment
Functions
-
segment_chunk — Segment a small chunk of the image
-
segment — Segment an image using SLIC on a PCA.
source segment_chunk(lstart, lend, in_file, nodata_value, npca, segsize, logfile=None, loglevel='INFO')
Segment a small chunk of the image
Parameters
-
lstart — starting position in image file
-
lend — stopping position in image file
-
in_file — file path to segment
-
nodata_value — value to ignore
-
npca — number of pca components to use
-
segsize — mean segmentation size
-
logfile — logging file name
-
loglevel — logging level
Returns
-
lstart — starting position in image file lend: stopping position in image file labels: labeled image chunk
source segment(spectra: tuple, nodata_value: float, npca: int, segsize: int, nchunk: int, n_cores: int = 1, ray_address: str = None, ray_redis_password: str = None, ray_temp_dir=None, ray_ip_head=None, logfile=None, loglevel='INFO')
Segment an image using SLIC on a PCA.
Parameters
-
spectra : tuple — tuple of filepaths of image to segment and (optionally) output label file
-
nodata_value : float — data to ignore in radiance image
-
npca : int — number of pca components to use
-
segsize : int — mean segmentation size
-
nchunk : int — size of each image chunk
-
n_cores : int — number of cores to use
-
ray_address : str — ray address to connect to (for multinode implementation)
-
ray_redis_password : str — ray password to use (for multinode implementation)
-
ray_temp_dir — ray temp directory to reference
-
ray_ip_head — ray ip head to reference (for multinode use)
-
logfile — logging file to output to
-
loglevel — logging level to use