Skip to content

Commit

Permalink
Update test-preprocess-tiling.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
cpaniaguam authored Nov 20, 2024
1 parent a0c7081 commit 0adb46f
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions test/test-preprocess-tiling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@ true_color_image, ref_image, landmask = [
landmask = (dilated=landmask,)
tiles = get_tiles(true_color_image, rblocks=2, cblocks=3)

foo = preprocess_tiling(
ref_image,
true_color_image,
landmask,
tiles,
ice_labels_thresholds,
adapthisteq_params,
adjust_gamma_params,
structuring_elements,
unsharp_mask_params,
ice_masks_params,
prelim_icemask_params,
brighten_factor,
)
# foo = preprocess_tiling(
# ref_image,
# true_color_image,
# landmask,
# tiles,
# ice_labels_thresholds,
# adapthisteq_params,
# adjust_gamma_params,
# structuring_elements,
# unsharp_mask_params,
# ice_masks_params,
# prelim_icemask_params,
# brighten_factor,
# )

@info "Step 1/2: Get masks"
begin
Expand Down Expand Up @@ -139,25 +139,25 @@ segment_mask = get_segment_mask(prelim_icemask, binarized_tiling)
local_maxima_mask, L0mask = watershed2(morphed_residue, segment_mask, prelim_icemask)

@info "Step 12: Build icemask from all others"
local_maxima_mask = to_uint8(local_maxima_mask * 255)
prelim_icemask2 = get_combined_new(
morphed_residue,
local_maxima_mask,
segment_mask,
L0mask,
structuring_elements.se_disk1;
prelim_icemask_params...,
)

@info "Step 13: Get improved icemask"
icemask, _ = get_ice_masks(
ref_image, prelim_icemask2, landmask.dilated, tiles, false; ice_masks_params...
)

@info "Step 14: Get final mask"
se = structuring_elements
se_erosion = se.se_disk1
se_dilation = se.se_disk2
final = get_final(icemask, segment_mask, se_erosion, se_dilation)

# return final
# local_maxima_mask = to_uint8(local_maxima_mask * 255)
# prelim_icemask2 = _regularize(
# morphed_residue,
# local_maxima_mask,
# segment_mask,
# L0mask,
# structuring_elements.se_disk1;
# prelim_icemask_params...,
# )

# @info "Step 13: Get improved icemask"
# icemask, _ = get_ice_masks(
# ref_image, prelim_icemask2, landmask.dilated, tiles, false; ice_masks_params...
# )

# @info "Step 14: Get final mask"
# se = structuring_elements
# se_erosion = se.se_disk1
# se_dilation = se.se_disk2
# final = get_final(icemask, segment_mask, se_erosion, se_dilation)

# return final

0 comments on commit 0adb46f

Please sign in to comment.