isofit.utils.segment
- 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:
starting position in image file lend: stopping position in image file labels: labeled image chunk
- Return type:
lstart
- segment(spectra, nodata_value, npca, segsize, nchunk, n_cores=1, ray_address=None, ray_redis_password=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
) – tuple of filepaths of image to segment and (optionally) output label filenodata_value (
float
) – data to ignore in radiance imagenpca (
int
) – number of pca components to usesegsize (
int
) – mean segmentation sizenchunk (
int
) – size of each image chunkn_cores (
int
) – number of cores to useray_address (
Optional
[str
]) – ray address to connect to (for multinode implementation)ray_redis_password (
Optional
[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