feat(sampling): add adaptive sampling toggle + interactive sampling point viewer
This commit is contained in:
@ -26,6 +26,7 @@ class PredictionStep:
|
||||
glint_mask_path: Optional[str] = None,
|
||||
output_dir: Union[str, Path] = "./10_sampling",
|
||||
callback: Optional[Callable] = None,
|
||||
use_adaptive_sampling: bool = True,
|
||||
) -> str:
|
||||
"""生成水域掩膜内且耀斑掩膜外的采样点,统计平均光谱"""
|
||||
from pathlib import Path
|
||||
@ -83,10 +84,14 @@ class PredictionStep:
|
||||
if glint_mask_to_use is None:
|
||||
print("未检测到耀斑掩膜,将在采样点生成时不做耀斑区域剔除。")
|
||||
|
||||
# 传递极度安全的 deglint_img_str 进底层
|
||||
# 传递极度安全的 deglint_img_str 进底层(关键字传参,避免 positional 参数顺序陷阱)
|
||||
get_spectral_sampling_points_chunked(
|
||||
deglint_img_str, water_mask_path, glint_mask_to_use,
|
||||
output_path, interval, sample_radius, chunk_size
|
||||
output_path,
|
||||
interval=interval,
|
||||
sample_radius=sample_radius,
|
||||
chunk_size=chunk_size,
|
||||
use_adaptive_sampling=use_adaptive_sampling,
|
||||
)
|
||||
|
||||
notify("completed", f"采样点光谱数据已保存: {output_path}")
|
||||
|
||||
Reference in New Issue
Block a user