diff --git a/.github/workflows/build-docker-julia.yml b/.github/workflows/build-docker-julia.yml index cf9a072..b452e43 100644 --- a/.github/workflows/build-docker-julia.yml +++ b/.github/workflows/build-docker-julia.yml @@ -49,10 +49,18 @@ jobs: build-args: | JULIA_CPU_TARGET=generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1);x86-64-v4,-rdrnd,base(1) - - name: Test CLI + - name: Test Preprocessing (Lopez CLI) working-directory: ./test run: source ./test-IFTPipeline.jl-cli.sh && IFT="docker run -v `pwd`:/app -w /app --rm ${{ env.TEST_TAG }}" preprocess_lopez input_data/ne-greenland.20220914.terra.250m + - name: Test Preprocessing CLI (Lopez with Tiling) + working-directory: ./test + run: source ./test-IFTPipeline.jl-cli.sh && IFT="docker run -v `pwd`:/app -w /app --rm ${{ env.TEST_TAG }}" preprocess_lopez_tiling input_data/ne-greenland.20220914.terra.250m + + - name: Test Tracker CLI + working-directory: ./test + run: source ./test-IFTPipeline.jl-cli.sh && IFT="docker run -v `pwd`:/app -w /app --rm ${{ env.TEST_TAG }}" track_lopez input_data/ne-greenland.2022091{3,4}.terra.250m/ + - name: Build and push Docker image uses: docker/build-push-action@v6 with: diff --git a/IFTPipeline.jl/src/cli.jl b/IFTPipeline.jl/src/cli.jl index 481fed4..5d0fb06 100755 --- a/IFTPipeline.jl/src/cli.jl +++ b/IFTPipeline.jl/src/cli.jl @@ -51,6 +51,192 @@ function mkclipreprocess_single!(settings) "--output", "-o" help = "Path to output segmented image file (.tiff)" required = true + + end + return nothing +end + +function mkcli_preprocess_tiling_single!(settings) + @add_arg_table! settings["preprocess_tiling_single"] begin + "--truecolor", "-t" + help = "Truecolor image file (.tiff)" + required = true + + "--falsecolor", "-r" + help = "Falsecolor image file (.tiff)" + required = true + + "--landmask-dilated", "-d" + help = "Landmask image file (dilated, .tiff)" + required = true + + "--segmented", "-s" + help = "Path to output segmented image file (.tiff)" + required = true + + "--labeled", "-l" + help = "Path to output labeled image file (.tiff)" + required = true + + + # Tiling parameters + + "--tile-rblocks" + default = 8 + arg_type = Int + required = false + + "--tile-cblocks" + default = 8 + arg_type = Int + required = false + + + # Ice labels thresholds + + "--ice-labels-prelim-threshold" + default = 110.0 + arg_type = Float64 + required = false + + "--ice-labels-band-7-threshold" + default = 200.0 + arg_type = Float64 + required = false + + "--ice-labels-band-2-threshold" + default = 190.0 + arg_type = Float64 + required = false + + "--ice-labels-ratio-lower" + default = 0.0 + arg_type = Float64 + required = false + + "--ice-labels-ratio-upper" + default = 0.75 + arg_type = Float64 + required = false + + + # Adaptive histogram equalization parameters + + "--adapthisteq-white-threshold" + default = 25.5 + arg_type = Float64 + required = false + + "--adapthisteq-entropy-threshold" + default = 4 + arg_type = Float64 + required = false + + "--adapthisteq-white-fraction-threshold" + default = 0.4 + arg_type = Float64 + required = false + + + # Gamma parameters + + "--gamma" + default = 1 + arg_type = Float64 + required = false + + "--gamma-factor" + default = 1 + arg_type = Float64 + required = false + + "--gamma-threshold" + default = 220 + arg_type = Float64 + required = false + + + # Unsharp mask parameters + + "--unsharp-mask-radius" + default = 10 + arg_type = Int + required = false + + "--unsharp-mask-amount" + default = 2.0 + arg_type = Float64 + required = false + + "--unsharp-mask-factor" + default = 255.0 + arg_type = Float64 + required = false + + + # Brighten parameters + + "--brighten-factor" + default = 0.1 + arg_type = Float64 + required = false + + + # Preliminary ice mask parameters + + "--prelim-icemask-radius" + default = 10 + arg_type = Int + required = false + + "--prelim-icemask-amount" + default = 2 + arg_type = Int + required = false + + "--prelim-icemask-factor" + default = 0.5 + arg_type = Float64 + required = false + + + # Main ice mask parameters + + "--icemask-band-7-threshold" + default = 5 + arg_type = Int + required = false + + "--icemask-band-2-threshold" + default = 230 + arg_type = Int + required = false + + "--icemask-band-1-threshold" + default = 240 + arg_type = Int + required = false + + "--icemask-band-7-threshold-relaxed" + default = 10 + arg_type = Int + required = false + + "--icemask-band-1-threshold-relaxed" + default = 190 + arg_type = Int + required = false + + "--icemask-possible-ice-threshold" + default = 75 + arg_type = Int + required = false + + "--icemask-n-clusters" + default = 3 + arg_type = Int + required = false + end return nothing end @@ -456,6 +642,7 @@ function mkcli!(settings, common_args) "landmask_single" => mkclilandmask_single!, "preprocess" => mkclipreprocess!, "preprocess_single" => mkclipreprocess_single!, + "preprocess_tiling_single" => mkcli_preprocess_tiling_single!, "extractfeatures" => mkcliextract!, "extractfeatures_single" => mkcliextract_single!, "makeh5files" => mkclimakeh5!, @@ -486,11 +673,15 @@ function main() action = :command "preprocess" - help = "Preprocess truecolor/falsecolor images" + help = "Label ice in a directory of truecolor & falsecolor images using full-image-based processing" action = :command "preprocess_single" - help = "Preprocess truecolor/falsecolor images" + help = "Label ice in a single set of truecolor & falsecolor images using full-image-based processing" + action = :command + + "preprocess_tiling_single" + help = "Label ice in a single set of truecolor & falsecolor images using tile-based processing" action = :command "extractfeatures" diff --git a/IFTPipeline.jl/src/preprocess.jl b/IFTPipeline.jl/src/preprocess.jl index 0163901..4d2b815 100644 --- a/IFTPipeline.jl/src/preprocess.jl +++ b/IFTPipeline.jl/src/preprocess.jl @@ -296,5 +296,228 @@ function preprocess_single(; truecolor::T, falsecolor::T, landmask::T, landmask_ @info "Writing segmented floes to $output" save_labeled_img(labeled_floes_cast, output) + return nothing +end + +""" + preprocess_tiling_single(; truecolor::T, falsecolor::T, landmask::T, landmask_dilated::T, output::T, ) where {T<:AbstractString} + +Preprocess and segment floes in a single view. Save the segmented floes to `segmented` and the labeled floes to `labeled`. + +# Arguments +- `truecolor`: path to truecolor image +- `falsecolor`: path to falsecolor image +- `landmask`: path to landmask image +- `landmask_dilated`: path to dilated landmask image +- `segmented`: path to segmented output file +- `labeled`: path to labeled output file +- Ice label thresholds for IceFloeTracker.create_cloudmask, step 1 & 2 of IceFloeTracker.preprocess_tiling + - `ice_labels_prelim_threshold::Float64=110.0` + - `ice_labels_band_7_threshold::Float64=200.0` + - `ice_labels_band_2_threshold::Float64=190.0` + - `ice_labels_ratio_lower::Float64=0.0` + - `ice_labels_ratio_upper::Float64=0.75` +- Tile numbers and threshold values for IceFloeTracker.conditional_histeq, step 3 of IceFloeTracker.preprocess_tiling + - `tile_rblocks::Int=8` + - `tile_cblocks::Int=8` + - `adapthisteq_white_threshold::Float64=25.5` + - `adapthisteq_entropy_threshold::Float64=4` + - `adapthisteq_white_fraction_threshold::Float64=0.4````` +- Unsharp mask for step 5 of IceFloeTracker.preprocess_tiling + - `unsharp_mask_radius::Int=10` + - `unsharp_mask_amount::Float64=2.0` + - `unsharp_mask_factor::Float64=255.0` +- Brightening in step 7 of IceFloeTracker.preprocess_tiling + - `brighten_factor::Float64=0.1`: See step 7 in +- Gamma correction for step 8 of IceFloeTracker.preprocess_tiling + - `gamma::Float64=1` + - `gamma_factor::Float64=1` + - `gamma_threshold::Float64=220` +- Preliminary ice masking in step 12 of IceFloeTracker.preprocess_tiling + - `prelim_icemask_radius::Int=10` + - `prelim_icemask_amount::Int=2` + - `prelim_icemask_factor::Float64=0.5` +- Final ice masking in step 13 of IceFloeTracker.preprocess_tiling + - `icemask_band_7_threshold::Int=5` + - `icemask_band_2_threshold::Int=230` + - `icemask_band_1_threshold::Int=240` + - `icemask_band_7_threshold_relaxed::Int=10` + - `icemask_band_1_threshold_relaxed::Int=190` + - `icemask_possible_ice_threshold::Int=75` + - `icemask_n_clusters::Int=3` + +""" +function preprocess_tiling_single( + ; + truecolor::T, + falsecolor::T, + landmask_dilated::T, + segmented::T, + labeled::T, + + # Tiling parameters + tile_rblocks=8, + tile_cblocks=8, + + # Ice labels thresholds + ice_labels_prelim_threshold=110.0, + ice_labels_band_7_threshold=200.0, + ice_labels_band_2_threshold=190.0, + ice_labels_ratio_lower=0.0, + ice_labels_ratio_upper=0.75, + + # Adaptive histogram equalization parameters + adapthisteq_white_threshold=25.5, + adapthisteq_entropy_threshold=4, + adapthisteq_white_fraction_threshold=0.4, + + # Gamma parameters + gamma=1, + gamma_factor=1, + gamma_threshold=220, + + # Unsharp mask parameters + unsharp_mask_radius=10, + unsharp_mask_amount=2.0, + unsharp_mask_factor=255.0, + + # Brighten parameters + brighten_factor=0.1, + + # Preliminary ice mask parameters + prelim_icemask_radius=10, + prelim_icemask_amount=2, + prelim_icemask_factor=0.5, + + # Main ice mask parameters + icemask_band_7_threshold=5, + icemask_band_2_threshold=230, + icemask_band_1_threshold=240, + icemask_band_7_threshold_relaxed=10, + icemask_band_1_threshold_relaxed=190, + icemask_possible_ice_threshold=75, + icemask_n_clusters=3, + + ) where {T<:AbstractString} + + @info "Processing images: $truecolor, $falsecolor, $landmask_dilated" + truecolor_img = loadimg(; dir=dirname(truecolor), fname=basename(truecolor)) + falsecolor_img = loadimg(; dir=dirname(falsecolor), fname=basename(falsecolor)) + + # TODO: make symmetric landmask saving/loading functions + landmask_dilated=BitMatrix(FileIO.load(landmask_dilated)) + + # Invert the landmasks – in the tiling version of the code, + # the landmask is expected to be the other polarity compared with + # the non-tiling version. + landmask = ( + dilated=.!landmask_dilated, + ) + + @info "Remove alpha channel if it exists" + rgb_truecolor_img = RGB.(truecolor_img) + rgb_falsecolor_img = RGB.(falsecolor_img) + + @info "Get tile coordinates" + tiles = IceFloeTracker.get_tiles( + rgb_truecolor_img; + rblocks=tile_rblocks, + cblocks=tile_cblocks + ) + @debug tiles + + @info "Set ice labels thresholds" + ice_labels_thresholds = ( + prelim_threshold=ice_labels_prelim_threshold, + band_7_threshold=ice_labels_band_7_threshold, + band_2_threshold=ice_labels_band_2_threshold, + ratio_lower=ice_labels_ratio_lower, + ratio_upper=ice_labels_ratio_upper, + use_uint8=true, + ) + @debug ice_labels_thresholds + + @info "Set adaptive histogram parameters" + adapthisteq_params = ( + white_threshold=adapthisteq_white_threshold, + entropy_threshold=adapthisteq_entropy_threshold, + white_fraction_threshold=adapthisteq_white_fraction_threshold, + ) + @debug adapthisteq_params + + @info "Set gamma parameters" + adjust_gamma_params = ( + gamma=gamma, + gamma_factor=gamma_factor, + gamma_threshold=gamma_threshold, + ) + @debug adjust_gamma_params + + @info "Set structuring elements" + # This isn't tunable in the underlying code right now, + # so just use the defaults + structuring_elements = IceFloeTracker.structuring_elements + @debug structuring_elements + + @info "Set unsharp mask params" + unsharp_mask_params = ( + radius=unsharp_mask_radius, + amount=unsharp_mask_amount, + factor=unsharp_mask_factor + ) + @debug unsharp_mask_params + + @info "Set brighten factor" + @debug brighten_factor + + @info "Set preliminary ice masks params" + prelim_icemask_params = ( + radius=prelim_icemask_radius, + amount=prelim_icemask_amount, + factor=prelim_icemask_factor, + ) + @debug prelim_icemask_params + + @info "Set ice masks params" + ice_masks_params = ( + band_7_threshold=icemask_band_7_threshold, + band_2_threshold=icemask_band_2_threshold, + band_1_threshold=icemask_band_1_threshold, + band_7_threshold_relaxed=icemask_band_7_threshold_relaxed, + band_1_threshold_relaxed=icemask_band_1_threshold_relaxed, + possible_ice_threshold=icemask_possible_ice_threshold, + k=icemask_n_clusters, # number of clusters for kmeans segmentation + factor=255, # normalization factor to convert images to uint8 + ) + @debug ice_masks_params + + + @info "Segment floes" + segmented_floes = IceFloeTracker.preprocess_tiling( + n0f8.(rgb_falsecolor_img), + n0f8.(rgb_truecolor_img), + landmask, + tiles, + ice_labels_thresholds, + adapthisteq_params, + adjust_gamma_params, + structuring_elements, + unsharp_mask_params, + ice_masks_params, + prelim_icemask_params, + brighten_factor, + ) + + @info "Write segmented floes to $segmented" + FileIO.save(segmented, segmented_floes) + + @info "Label floes" + labeled_floes = label_components(segmented_floes) + _dtype = choose_dtype(maximum(labeled_floes)) + labeled_floes_cast = convert(Array{_dtype}, labeled_floes) + + @info "Write labeled floes to $labeled" + save_labeled_img(labeled_floes_cast, labeled) + return nothing end \ No newline at end of file diff --git a/test/test-IFTPipeline.jl-cli.sh b/test/test-IFTPipeline.jl-cli.sh index 0400c85..6a86f9e 100755 --- a/test/test-IFTPipeline.jl-cli.sh +++ b/test/test-IFTPipeline.jl-cli.sh @@ -82,6 +82,52 @@ preprocess_lopez () { --output ${HDF5FILE} } +preprocess_lopez_tiling () { + echo_CLI_tools + + DATA_SOURCE=$1 + DATA_TARGET=$2 + initialize_test_directory $1 $2 + + LANDMASK=${DATA_TARGET}/landmask.tiff + LANDMASK_NON_DILATED=${DATA_TARGET}/landmask.non-dilated.tiff + LANDMASK_DILATED=${DATA_TARGET}/landmask.dilated.tiff + TRUECOLOR=${DATA_TARGET}/truecolor.tiff + FALSECOLOR=${DATA_TARGET}/falsecolor.tiff + SEGMENTED=${DATA_TARGET}/segmented.tiff + LABELED=${DATA_TARGET}/labeled.tiff + COLORIZED=${DATA_TARGET}/labeled.colorized.tiff + FLOEPROPERTIES=${DATA_TARGET}/labeled.props.csv + HDF5FILE=${DATA_TARGET}/results.h5 + OVERPASS=${DATA_TARGET}/overpass.txt + + ${IFT} landmask_single \ + -i ${LANDMASK} \ + -o ${LANDMASK_NON_DILATED} \ + -d ${LANDMASK_DILATED} + + ${IFT} preprocess_tiling_single \ + --truecolor ${TRUECOLOR} \ + --falsecolor ${FALSECOLOR} \ + --landmask-dilated ${LANDMASK_DILATED} \ + --segmented ${SEGMENTED} \ + --labeled ${LABELED} + + ${IFT} extractfeatures_single \ + --input ${LABELED} \ + --output ${FLOEPROPERTIES} + + ${COLORIZE} ${LABELED} ${COLORIZED} + + ${IFT} makeh5files_single \ + --passtime `cat ${OVERPASS}` \ + --truecolor ${TRUECOLOR} \ + --falsecolor ${FALSECOLOR} \ + --labeled ${LABELED} \ + --props ${FLOEPROPERTIES} \ + --output ${HDF5FILE} +} + preprocess_buckley () { echo_CLI_tools @@ -146,6 +192,14 @@ track_original () { PREPROCESS=preprocess_lopez track $@ } +track_lopez () { + PREPROCESS=preprocess_lopez track $@ +} + +track_lopez_tiling () { + PREPROCESS=preprocess_lopez_tiling track $@ +} + track_buckley () { PREPROCESS=preprocess_buckley track $@ } diff --git a/workflow/example-cylc-calls.sh b/workflow/example-cylc-calls.sh index 29ee9ac..19e9290 100755 --- a/workflow/example-cylc-calls.sh +++ b/workflow/example-cylc-calls.sh @@ -2,6 +2,7 @@ mkdir -p ~/.cylc/flow && cp oscar.global.cylc ~/.cylc/flow/global.cylc cylc vip . --set-file example/iftpipeline-test-case.conf -n iftpipeline-test-case-lopez -s 'PREPROCESSING="Lopez"' +cylc vip . --set-file example/iftpipeline-test-case.conf -n iftpipeline-test-case-lopez-tiling -s 'PREPROCESSING="LopezTiling"' cylc vip . --set-file example/iftpipeline-test-case.conf -n iftpipeline-test-case-buckley -s 'PREPROCESSING="Buckley"' cylc vip . --set-file example/beaufort-sea-july.conf -n beaufort-sea-july-lopez -s 'PREPROCESSING="Lopez"' diff --git a/workflow/example/iftpipeline-test-case.conf b/workflow/example/iftpipeline-test-case.conf index dd7bfc6..f9853cf 100644 --- a/workflow/example/iftpipeline-test-case.conf +++ b/workflow/example/iftpipeline-test-case.conf @@ -1,6 +1,6 @@ # The test case from the IFTPipeline.jl/test directory START="2022-09-14" -END="2022-09-14" +END="2022-09-15" SATELLITES="aqua", "terra" LOCATION="ift-pipeline-test" CRS="EPSG:3413" diff --git a/workflow/flow.cylc b/workflow/flow.cylc index 472eb90..66d9a2e 100644 --- a/workflow/flow.cylc +++ b/workflow/flow.cylc @@ -133,6 +133,7 @@ truecolor_file = ${img_prefix}truecolor.tiff falsecolor_file = ${img_prefix}falsecolor.tiff cloud_file = ${img_prefix}cloud.tiff + segmented_file = ${img_prefix}segmented.tiff labeled_file = ${img_prefix}labeled.tiff colorized_labeled_file = ${img_prefix}labeled.colorized.tiff labeled_props_file = ${img_prefix}labeled.props.csv @@ -195,33 +196,74 @@ [[preprocess]] inherit = PREPROCESS, script = """ - {% if PREPROCESSING == "Lopez" %} + {% if PREPROCESSING == "Lopez" or PREPROCESSING == "LopezTiling" %} - ${IFT} landmask_single \ - -i ${landmask_file} \ - -o ${landmask_binarized_file} \ - -d ${landmask_binarized_dilated_file} + ${IFT} landmask_single \ + -i ${landmask_file} \ + -o ${landmask_binarized_file} \ + -d ${landmask_binarized_dilated_file} - ${IFT} preprocess_single \ - -t ${truecolor_file} \ - -r ${falsecolor_file} \ - -l ${landmask_binarized_file} \ - -d ${landmask_binarized_dilated_file} \ - -o ${labeled_file} + {% if PREPROCESSING == "Lopez" %} + + ${IFT} preprocess_single \ + -t ${truecolor_file} \ + -r ${falsecolor_file} \ + -l ${landmask_binarized_file} \ + -d ${landmask_binarized_dilated_file} \ + -o ${labeled_file} + + {% elif PREPROCESSING == "LopezTiling" %} + + ${IFT} preprocess_tiling_single \ + -t ${truecolor_file} \ + -r ${falsecolor_file} \ + -d ${landmask_binarized_dilated_file} \ + -l ${labeled_file} \ + -s ${segmented_file} \ + --tile-rblocks {{ TILE_RBLOCKS }} \ + --tile-cblocks {{ TILE_CBLOCKS }} \ + --ice-labels-prelim-threshold {{ ICE_LABELS_PRELIM_THRESHOLD }} \ + --ice-labels-band-7-threshold {{ ICE_LABELS_BAND_7_THRESHOLD }} \ + --ice-labels-band-2-threshold {{ ICE_LABELS_BAND_2_THRESHOLD }} \ + --ice-labels-ratio-lower {{ ICE_LABELS_RATIO_LOWER }} \ + --ice-labels-ratio-upper {{ ICE_LABELS_RATIO_UPPER }} \ + --adapthisteq-white-threshold {{ ADAPTHISTEQ_WHITE_THRESHOLD }} \ + --adapthisteq-entropy-threshold {{ ADAPTHISTEQ_ENTROPY_THRESHOLD }} \ + --adapthisteq-white-fraction-threshold {{ ADAPTHISTEQ_WHITE_FRACTION_THRESHOLD }} \ + --gamma {{ GAMMA }} \ + --gamma-factor {{ GAMMA_FACTOR }} \ + --gamma-threshold {{ GAMMA_THRESHOLD }} \ + --unsharp-mask-radius {{ UNSHARP_MASK_RADIUS }} \ + --unsharp-mask-amount {{ UNSHARP_MASK_AMOUNT }} \ + --unsharp-mask-factor {{ UNSHARP_MASK_FACTOR }} \ + --brighten-factor {{ BRIGHTEN_FACTOR }} \ + --prelim-icemask-radius {{ PRELIM_ICEMASK_RADIUS }} \ + --prelim-icemask-amount {{ PRELIM_ICEMASK_AMOUNT }} \ + --prelim-icemask-factor {{ PRELIM_ICEMASK_FACTOR }} \ + --icemask-band-7-threshold {{ ICEMASK_BAND_7_THRESHOLD }} \ + --icemask-band-2-threshold {{ ICEMASK_BAND_2_THRESHOLD }} \ + --icemask-band-1-threshold {{ ICEMASK_BAND_1_THRESHOLD }} \ + --icemask-band-7-threshold-relaxed {{ ICEMASK_BAND_7_THRESHOLD_RELAXED }} \ + --icemask-band-1-threshold-relaxed {{ ICEMASK_BAND_1_THRESHOLD_RELAXED }} \ + --icemask-possible-ice-threshold {{ ICEMASK_POSSIBLE_ICE_THRESHOLD }} \ + --icemask-n-clusters {{ ICEMASK_N_CLUSTERS }} + + {% endif %} + - ${IFT} extractfeatures_single \ - --input ${labeled_file} \ - --output ${labeled_props_file} \ - --minarea {{ MINFLOEAREA }} \ - --maxarea {{ MAXFLOEAREA }} + ${IFT} extractfeatures_single \ + --input ${labeled_file} \ + --output ${labeled_props_file} \ + --minarea {{ MINFLOEAREA }} \ + --maxarea {{ MAXFLOEAREA }} {% elif PREPROCESSING == "Buckley" %} - workdir="${labeled_file}.work" - mkdir -p "${workdir}" - ${FSDPROC} process ${truecolor_file} ${cloud_file} ${landmask_file} ${workdir} - cp ${workdir}/final.tif ${labeled_file} - cp ${workdir}/props.csv ${labeled_props_file} + workdir="${labeled_file}.work" + mkdir -p "${workdir}" + ${FSDPROC} process ${truecolor_file} ${cloud_file} ${landmask_file} ${workdir} + cp ${workdir}/final.tif ${labeled_file} + cp ${workdir}/props.csv ${labeled_props_file} {% else %} diff --git a/workflow/rose-suite.conf b/workflow/rose-suite.conf index aba57f1..2dba94b 100644 --- a/workflow/rose-suite.conf +++ b/workflow/rose-suite.conf @@ -1,6 +1,6 @@ [template variables] -START="2019-03-19" -END="2019-03-20" +START="2019-03-20" +END="2019-03-21" SATELLITES="aqua", "terra" LOCATION="beaufort_sea" CRS="EPSG:3413" @@ -10,7 +10,7 @@ CENTROID_LAT=71.02795656503653 CENTROID_LON=-129.11755440990464 MINFLOEAREA=350 MAXFLOEAREA=90000 -PREPROCESSING="Lopez" # "Lopez" or "Buckley" +PREPROCESSING="Lopez" # "Lopez" or "LopezTiling" or "Buckley" # Install locations: @@ -53,3 +53,33 @@ COLORIZE_INSTALL="Source" COLORIZE_VERSION="v2.0.0" # Command to run the Pass Time CLI if using "Inject" install mode COLORIZE_COMMAND="" + +# Preprocessing with tiling parameters +TILE_RBLOCKS=8 +TILE_CBLOCKS=8 +ICE_LABELS_PRELIM_THRESHOLD=110.0 +ICE_LABELS_BAND_7_THRESHOLD=200.0 +ICE_LABELS_BAND_2_THRESHOLD=190.0 +ICE_LABELS_RATIO_LOWER=0.0 +ICE_LABELS_RATIO_UPPER=0.75 +ADAPTHISTEQ_WHITE_THRESHOLD=25.5 +ADAPTHISTEQ_ENTROPY_THRESHOLD=4.0 +ADAPTHISTEQ_WHITE_FRACTION_THRESHOLD=0.4 +GAMMA=1.0 +GAMMA_FACTOR=1.0 +GAMMA_THRESHOLD=220.0 +UNSHARP_MASK_RADIUS=10 +UNSHARP_MASK_AMOUNT=2.0 +UNSHARP_MASK_FACTOR=255.0 +BRIGHTEN_FACTOR=0.1 +PRELIM_ICEMASK_RADIUS=10 +PRELIM_ICEMASK_AMOUNT=2 +PRELIM_ICEMASK_FACTOR=0.5 +ICEMASK_BAND_7_THRESHOLD=5 +ICEMASK_BAND_2_THRESHOLD=230 +ICEMASK_BAND_1_THRESHOLD=240 +ICEMASK_BAND_7_THRESHOLD_RELAXED=10 +ICEMASK_BAND_1_THRESHOLD_RELAXED=190 +ICEMASK_POSSIBLE_ICE_THRESHOLD=75 +ICEMASK_N_CLUSTERS=3 +