isofit.utils.segment
Functions
|
Segment a small chunk of the image |
|
Segment an image using SLIC on a PCA. |
Module Contents
- segment_chunk(lstart, lend, in_file, nodata_value, npca, segsize, logfile=None, loglevel='INFO')[source]
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:
starting position in image file lend: stopping position in image file labels: labeled image chunk
- Return type:
lstart
- 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')[source]
Segment an image using SLIC on a PCA.
- Parameters:
spectra – tuple of filepaths of image to segment and (optionally) output label file
nodata_value – data to ignore in radiance image
npca – number of pca components to use
segsize – mean segmentation size
nchunk – size of each image chunk
n_cores – number of cores to use
ray_address – ray address to connect to (for multinode implementation)
ray_redis_password – 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