From b28f0e85a67dce4273aeb2bbfb45e3ee7fee7ccc Mon Sep 17 00:00:00 2001 From: Carlos Paniagua Date: Wed, 20 Nov 2024 12:14:51 -0500 Subject: [PATCH] fix: add default k parameter to get_ice_masks function --- src/ice_masks.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ice_masks.jl b/src/ice_masks.jl index 1db1539e..5af6b004 100644 --- a/src/ice_masks.jl +++ b/src/ice_masks.jl @@ -135,6 +135,7 @@ function get_ice_masks( band_7_threshold_relaxed::T=10, band_1_threshold_relaxed::T=190, possible_ice_threshold::T=75, + k::T=3, factor::T=255, ) where {T<:Integer,S<:AbstractMatrix{Tuple{UnitRange{Int64},UnitRange{Int64}}}} @@ -149,7 +150,7 @@ function get_ice_masks( for tile in tiles @debug "Processing tile: $tile" mrt = morph_residue[tile...] - morph_residue_seglabels = kmeans_segmentation(Gray.(mrt / 255), k=3) + morph_residue_seglabels = kmeans_segmentation(Gray.(mrt / 255), k=k) # TODO: handle case where get_nlabel returns missing floes_label = get_nlabel(