Skip to content

Commit

Permalink
fix: add default k parameter to get_ice_masks function
Browse files Browse the repository at this point in the history
  • Loading branch information
cpaniaguam committed Nov 20, 2024
1 parent 9ebc728 commit b28f0e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ice_masks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}}}

Expand All @@ -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(
Expand Down

0 comments on commit b28f0e8

Please sign in to comment.