From c2b1f52d827d1ad7433d52398597290744226442 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 19 Dec 2024 19:54:23 +0000 Subject: [PATCH] build based on a7065e8 --- index.html | 48 ++++++++++++++++++++-------------------- preprocessing/index.html | 2 +- search/index.html | 2 +- search_index.js | 2 +- segmentation/index.html | 2 +- tracking/index.html | 2 +- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/index.html b/index.html index 35739718..c297fea5 100644 --- a/index.html +++ b/index.html @@ -1,12 +1,12 @@ -IceFloeTracker.jl · IceFloeTracker.jl

IceFloeTracker.jl

Overview

IceFloeTracker.jl is a collection of routines and tools for processing remote sensing imagery, identifying sea ice floes, and tracking the displacement and rotation of ice floes across multiple images. It can be used either standalone to create custom processing pathways or with the Ice Floe Tracker Pipeline.

Algorithm components

The Ice Floe Tracker (IFT) package includes the core functions for the three main steps of the algorithm. These functions can be used independently and can be customized for specific use cases.

Preprocessing

IFT operates on optical satellite imagery. The main functions are designed with "true color" and "false color" imagery in mind, and have thus far primarily been tested on imagery from the Moderate Resolution Imaging Spectroradiometer (MODIS) from the NASA Aqua and Terra satellites. The preprocessing routines mask land and cloud features, and aim to adjust and sharpen the remainder of the images to amplify the contrast along the edges of sea ice floes. (TBD: Link to main preprocessing page)

Segmentation

The IFT segmentation functions include functions for semantic segmentation (pixel-by-pixel assignment into predefined categories) and object-based segmentation (groupings of pixels into distinct objects). The semantic segmentation steps use $k$-means to group pixels into water and ice regions. A combination of watershed functions, morphological operations, and further applications of $k$-means are used to identify candidate ice floes. (TBD: Link to main segmentation page)

Tracking

Ice floe tracking is carried out by comparing the shapes produced in the segmentation step. Shapes with similar area are rotated until the difference in surface area is minimized, and then the edge shapes are compared using a Ѱ-s curve. If thresholds for correlation and area differences are met, then the floe with the best correlation and smallest area differences are considered matches and the objects are assigned the same label. In the end, trajectories for individual floes are recorded in a dataframe.

Developers

IceFloeTracker.jl is a product of the Wilhelmus Lab at Brown University, led by Monica M. Wilhelmus. The original algorithm was developed by Rosalinda Lopez-Acosta during her PhD work at University of California Riverside, advised by Dr. Wilhelmus. The translation of the original Matlab code into the current modular, open source Julia package has been carried out in conjunction with the Center for Computing and Visualization at Brown University. Contributors include Daniel Watkins, Maria Isabel Restrepo, Carlos Paniagua, Tim DiVoll, John Holland, and Bradford Roarr.

Citing

If you use IceFloeTracker.jl in research, teaching, or elsewhere, please mention the IceFloeTracker package and cite our journal article outlining the algorithm:

Lopez-Acosta et al., (2019). Ice Floe Tracker: An algorithm to automatically retrieve Lagrangian trajectories via feature matching from moderate-resolution visual imagery. Remote Sensing of Environment, 234(111406), doi:10.1016/j.rse.2019.111406.

Papers using Ice Floe Tracker

  1. Manucharyan, Lopez-Acosta, and Wilhelmus (2022)*. Spinning ice floes reveal intensification of mesoscale eddies in the western Arctic Ocean. Scientific Reports, 12(7070), doi:10.1038/s41598-022-10712-z
  2. Watkins, Bliss, Hutchings, and Wilhelmus (2023)*. Evidence of Abrupt Transitions Between Sea Ice Dynamical Regimes in the East Greenland Marginal Ice Zone. Geophysical Research Letters, 50(e2023GL103558), pp. 1-10, doi:10.1029/2023GL103558

*Papers using data from the Matlab implementation of Ice Floe Tracker.

Functions

Base.isequalMethod
isequal(matchedpairs1::MatchedPairs, matchedpairs2::MatchedPairs)

Return true if matchedpairs1 and matchedpairs2 are equal, false otherwise.

source
Base.sort!Method
sort!(tracked::Tracked)

Sort the floes in tracked by area in descending order.

source
IceFloeTracker._adjust_histogramMethod
_adjust_histogram(masked_view, nbins, rblocks, cblocks, clip)

Perform adaptive histogram equalization to a masked image. To be invoked within imsharpen.

Arguments

  • masked_view: input image in truecolor

See imsharpen for a description of the remaining arguments

source
IceFloeTracker._bin9todecMethod
_bin9todec(v)

Get decimal representation of a bit vector v with the leading bit at its leftmost posistion.

Example

julia> _bin9todec([0 0 0 0 0 0 0 0 0])
+IceFloeTracker.jl · IceFloeTracker.jl

IceFloeTracker.jl

Overview

IceFloeTracker.jl is a collection of routines and tools for processing remote sensing imagery, identifying sea ice floes, and tracking the displacement and rotation of ice floes across multiple images. It can be used either standalone to create custom processing pathways or with the Ice Floe Tracker Pipeline.

Algorithm components

The Ice Floe Tracker (IFT) package includes the core functions for the three main steps of the algorithm. These functions can be used independently and can be customized for specific use cases.

Preprocessing

IFT operates on optical satellite imagery. The main functions are designed with "true color" and "false color" imagery in mind, and have thus far primarily been tested on imagery from the Moderate Resolution Imaging Spectroradiometer (MODIS) from the NASA Aqua and Terra satellites. The preprocessing routines mask land and cloud features, and aim to adjust and sharpen the remainder of the images to amplify the contrast along the edges of sea ice floes. (TBD: Link to main preprocessing page)

Segmentation

The IFT segmentation functions include functions for semantic segmentation (pixel-by-pixel assignment into predefined categories) and object-based segmentation (groupings of pixels into distinct objects). The semantic segmentation steps use $k$-means to group pixels into water and ice regions. A combination of watershed functions, morphological operations, and further applications of $k$-means are used to identify candidate ice floes. (TBD: Link to main segmentation page)

Tracking

Ice floe tracking is carried out by comparing the shapes produced in the segmentation step. Shapes with similar area are rotated until the difference in surface area is minimized, and then the edge shapes are compared using a Ѱ-s curve. If thresholds for correlation and area differences are met, then the floe with the best correlation and smallest area differences are considered matches and the objects are assigned the same label. In the end, trajectories for individual floes are recorded in a dataframe.

Developers

IceFloeTracker.jl is a product of the Wilhelmus Lab at Brown University, led by Monica M. Wilhelmus. The original algorithm was developed by Rosalinda Lopez-Acosta during her PhD work at University of California Riverside, advised by Dr. Wilhelmus. The translation of the original Matlab code into the current modular, open source Julia package has been carried out in conjunction with the Center for Computing and Visualization at Brown University. Contributors include Daniel Watkins, Maria Isabel Restrepo, Carlos Paniagua, Tim DiVoll, John Holland, and Bradford Roarr.

Citing

If you use IceFloeTracker.jl in research, teaching, or elsewhere, please mention the IceFloeTracker package and cite our journal article outlining the algorithm:

Lopez-Acosta et al., (2019). Ice Floe Tracker: An algorithm to automatically retrieve Lagrangian trajectories via feature matching from moderate-resolution visual imagery. Remote Sensing of Environment, 234(111406), doi:10.1016/j.rse.2019.111406.

Papers using Ice Floe Tracker

  1. Manucharyan, Lopez-Acosta, and Wilhelmus (2022)*. Spinning ice floes reveal intensification of mesoscale eddies in the western Arctic Ocean. Scientific Reports, 12(7070), doi:10.1038/s41598-022-10712-z
  2. Watkins, Bliss, Hutchings, and Wilhelmus (2023)*. Evidence of Abrupt Transitions Between Sea Ice Dynamical Regimes in the East Greenland Marginal Ice Zone. Geophysical Research Letters, 50(e2023GL103558), pp. 1-10, doi:10.1029/2023GL103558

*Papers using data from the Matlab implementation of Ice Floe Tracker.

Functions

Base.isequalMethod
isequal(matchedpairs1::MatchedPairs, matchedpairs2::MatchedPairs)

Return true if matchedpairs1 and matchedpairs2 are equal, false otherwise.

source
Base.sort!Method
sort!(tracked::Tracked)

Sort the floes in tracked by area in descending order.

source
IceFloeTracker._adjust_histogramMethod
_adjust_histogram(masked_view, nbins, rblocks, cblocks, clip)

Perform adaptive histogram equalization to a masked image. To be invoked within imsharpen.

Arguments

  • masked_view: input image in truecolor

See imsharpen for a description of the remaining arguments

source
IceFloeTracker._bin9todecMethod
_bin9todec(v)

Get decimal representation of a bit vector v with the leading bit at its leftmost posistion.

Example

julia> _bin9todec([0 0 0 0 0 0 0 0 0])
 0
 
 julia> _bin9todec([1 1 1 1 1 1 1 1 1])
-511
source
IceFloeTracker._branch_filterFunction
_branch_filter(
 img::AbstractArray{Bool},
 func1::Function=branch_candidates_func,
-func2::Function=connected_background_count,)

Filter img with _operator_lut using lut1 and lut2.

source
IceFloeTracker._generate_se!Method
_generate_se!(se)

Generate a structuring element by leveraging symmetry (mirroring and inverting) a given initial structuring element.

source
IceFloeTracker._operator_lutMethod
_operator_lut(I, img, nhood, lut1, lut2)

Look up the neighborhood nhood in lookup tables lut1 and lut2.

Handles cases when the center of nhood is on the edge of img using data in I.

source
IceFloeTracker._swap_last_values!Method
_swap_last_values!(df)

Swap the last two values of the area_mismatch and corr columns for each group in df. For bookkeeping purposes for goodness of fit data during the tracking process.

source
IceFloeTracker.add_paddingMethod
add_padding(img, style)

Extrapolate the image img according to the style specifications type. Returns the extrapolated image.

Arguments

  • img: Image to be padded.
  • style: A supported type (such as Pad or Fill) representing the extrapolation style. See the relevant documentation for details.

See also remove_padding

source
IceFloeTracker.add_passtimes!Method
add_passtimes!(props, passtimes)

Add a column passtime to each DataFrame in props containing the time of the image in which the floes were captured.

Arguments

  • props: array of DataFrames containing floe properties.
  • passtimes: array of DateTime objects containing the time of the image in which the floes were captured.
source
IceFloeTracker.addfloemasks!Method
addfloearrays(props::DataFrame, floeimg::BitMatrix)

Add a column to props called floearray containing the cropped floe masks from floeimg.

source
IceFloeTracker.addlatlon!Method
addlatlon(pairedfloesdf::DataFrame, refimage::AbstractString)

Add columns latitude, longitude, and pixel coordinates x, y to pairedfloesdf.

Arguments

  • pairedfloesdf: dataframe containing floe tracking data.
  • refimage: path to reference image.
source
IceFloeTracker.appendrows!Method
appendrows!(df::MatchingProps, props::T, ratios, idx::Int64, dist::Float64) where {T<:DataFrameRow}

Append a row to df.props and df.ratios with the values of props and ratios respectively.

source
IceFloeTracker.apply_cloudmaskMethod
apply_cloudmask(false_color_image, cloudmask)

Zero out pixels containing clouds where clouds and ice are not discernable. Arguments should be of the same size.

Arguments

  • false_color_image: reference image, e.g. corrected reflectance false color image bands [7,2,1] or grayscale
  • cloudmask: binary cloudmask with clouds = 0, else = 1
source
IceFloeTracker.apply_landmaskMethod
apply_landmask(input_image, landmask_binary)

Zero out pixels in all channels of the input image using the binary landmask.

Arguments

  • input_image: truecolor RGB image
  • landmask_binary: binary landmask with 1=land, 0=water/ice
source
IceFloeTracker.binarize_landmaskMethod
binarize_landmask(landmask_image)

Convert a 3-channel RGB land mask image to a 1-channel binary matrix; land = 0, ocean = 1.

Arguments

  • landmask_image: RGB land mask image from fetchdata
source
IceFloeTracker.branchMethod
branch(img::AbstractArray{Bool})

Find branch points in skeletonized image img according to Definition 3 of [1].

[1] Arcelli, Carlo, and Gabriella Sanniti di Baja. "Skeletons of planar patterns." Machine Intelligence and Pattern Recognition. Vol. 19. North-Holland, 1996. 99-143.

source
IceFloeTracker.bridgeMethod
bridge(bw)

Set 0-valued pixels to 1 if they have two nonzero neighbors that are not connected. Note the following exceptions:

0 0 0 0 0 0 1 0 1 becomes 1 1 1 0 0 0 0 0 0

1 0 1 1 1 1 0 0 0 becomes 0 0 0 0 0 0 0 0 0

The same applies to all their corresponding rotations.

Examples

julia> bw = [0 0 0; 0 0 0; 1 0 1]
+func2::Function=connected_background_count,)

Filter img with _operator_lut using lut1 and lut2.

source
IceFloeTracker._generate_se!Method
_generate_se!(se)

Generate a structuring element by leveraging symmetry (mirroring and inverting) a given initial structuring element.

source
IceFloeTracker._operator_lutMethod
_operator_lut(I, img, nhood, lut1, lut2)

Look up the neighborhood nhood in lookup tables lut1 and lut2.

Handles cases when the center of nhood is on the edge of img using data in I.

source
IceFloeTracker._swap_last_values!Method
_swap_last_values!(df)

Swap the last two values of the area_mismatch and corr columns for each group in df. For bookkeeping purposes for goodness of fit data during the tracking process.

source
IceFloeTracker.add_paddingMethod
add_padding(img, style)

Extrapolate the image img according to the style specifications type. Returns the extrapolated image.

Arguments

  • img: Image to be padded.
  • style: A supported type (such as Pad or Fill) representing the extrapolation style. See the relevant documentation for details.

See also remove_padding

source
IceFloeTracker.add_passtimes!Method
add_passtimes!(props, passtimes)

Add a column passtime to each DataFrame in props containing the time of the image in which the floes were captured.

Arguments

  • props: array of DataFrames containing floe properties.
  • passtimes: array of DateTime objects containing the time of the image in which the floes were captured.
source
IceFloeTracker.addfloemasks!Method
addfloearrays(props::DataFrame, floeimg::BitMatrix)

Add a column to props called floearray containing the cropped floe masks from floeimg.

source
IceFloeTracker.addlatlon!Method
addlatlon(pairedfloesdf::DataFrame, refimage::AbstractString)

Add columns latitude, longitude, and pixel coordinates x, y to pairedfloesdf.

Arguments

  • pairedfloesdf: dataframe containing floe tracking data.
  • refimage: path to reference image.
source
IceFloeTracker.appendrows!Method
appendrows!(df::MatchingProps, props::T, ratios, idx::Int64, dist::Float64) where {T<:DataFrameRow}

Append a row to df.props and df.ratios with the values of props and ratios respectively.

source
IceFloeTracker.apply_cloudmaskMethod
apply_cloudmask(false_color_image, cloudmask)

Zero out pixels containing clouds where clouds and ice are not discernable. Arguments should be of the same size.

Arguments

  • false_color_image: reference image, e.g. corrected reflectance false color image bands [7,2,1] or grayscale
  • cloudmask: binary cloudmask with clouds = 0, else = 1
source
IceFloeTracker.apply_landmaskMethod
apply_landmask(input_image, landmask_binary)

Zero out pixels in all channels of the input image using the binary landmask.

Arguments

  • input_image: truecolor RGB image
  • landmask_binary: binary landmask with 1=land, 0=water/ice
source
IceFloeTracker.binarize_landmaskMethod
binarize_landmask(landmask_image)

Convert a 3-channel RGB land mask image to a 1-channel binary matrix; land = 0, ocean = 1.

Arguments

  • landmask_image: RGB land mask image from fetchdata
source
IceFloeTracker.branchMethod
branch(img::AbstractArray{Bool})

Find branch points in skeletonized image img according to Definition 3 of [1].

[1] Arcelli, Carlo, and Gabriella Sanniti di Baja. "Skeletons of planar patterns." Machine Intelligence and Pattern Recognition. Vol. 19. North-Holland, 1996. 99-143.

source
IceFloeTracker.bridgeMethod
bridge(bw)

Set 0-valued pixels to 1 if they have two nonzero neighbors that are not connected. Note the following exceptions:

0 0 0 0 0 0 1 0 1 becomes 1 1 1 0 0 0 0 0 0

1 0 1 1 1 1 0 0 0 becomes 0 0 0 0 0 0 0 0 0

The same applies to all their corresponding rotations.

Examples

julia> bw = [0 0 0; 0 0 0; 1 0 1]
 3×3 Matrix{Int64}:
  0  0  0
  0  0  0
@@ -40,7 +40,7 @@
 3×3 BitMatrix:
  1  1  1
  1  1  1
- 1  1  1
source
IceFloeTracker.bump_tileMethod
bump_tile(tile::Tuple{UnitRange{Int64}, UnitRange{Int64}}, dims::Tuple{Int,Int})::Tuple{UnitRange{Int}, UnitRange{Int}}

Adjust the tile dimensions by adding extra rows and columns.

Arguments

  • tile::Tuple{Int,Int,Int,Int}: A tuple representing the tile dimensions (a, b, c, d).
  • dims::Tuple{Int,Int}: A tuple representing the extra rows and columns to add (extrarows, extracols).

Returns

  • Tuple{UnitRange{Int}, UnitRange{Int}}: A tuple of ranges representing the new tile dimensions.

Examples

```julia julia> bump_tile((1:3, 1:4), (1, 1)) (1:4, 1:5)

source
IceFloeTracker.bwareamaxfiltFunction
bwareamaxfilt(bwimg::AbstractArray{Bool}, conn)

Filter the smaller (by area) connected components in bwimg keeping the (assumed unique) largest.

Uses 8-pixel connectivity by default (conn=8). Use conn=4 for 4-pixel connectivity.

source
IceFloeTracker.bwperimMethod
bwperim(bwimg)

Locate the pixels at the boundary of objects in an binary image bwimg using 8-pixel connectivity.

Arguments

  • bwimg: Binary (black/white – 1/0) image

Examples

julia> A = zeros(Bool, 13, 16); A[2:6, 2:6] .= 1; A[4:8, 7:10] .= 1; A[10:12,13:15] .= 1; A[10:12,3:6] .= 1;
+ 1  1  1
source
IceFloeTracker.bump_tileMethod
bump_tile(tile::Tuple{UnitRange{Int64}, UnitRange{Int64}}, dims::Tuple{Int,Int})::Tuple{UnitRange{Int}, UnitRange{Int}}

Adjust the tile dimensions by adding extra rows and columns.

Arguments

  • tile::Tuple{Int,Int,Int,Int}: A tuple representing the tile dimensions (a, b, c, d).
  • dims::Tuple{Int,Int}: A tuple representing the extra rows and columns to add (extrarows, extracols).

Returns

  • Tuple{UnitRange{Int}, UnitRange{Int}}: A tuple of ranges representing the new tile dimensions.

Examples

```julia julia> bump_tile((1:3, 1:4), (1, 1)) (1:4, 1:5)

source
IceFloeTracker.bwareamaxfiltFunction
bwareamaxfilt(bwimg::AbstractArray{Bool}, conn)

Filter the smaller (by area) connected components in bwimg keeping the (assumed unique) largest.

Uses 8-pixel connectivity by default (conn=8). Use conn=4 for 4-pixel connectivity.

source
IceFloeTracker.bwperimMethod
bwperim(bwimg)

Locate the pixels at the boundary of objects in an binary image bwimg using 8-pixel connectivity.

Arguments

  • bwimg: Binary (black/white – 1/0) image

Examples

julia> A = zeros(Bool, 13, 16); A[2:6, 2:6] .= 1; A[4:8, 7:10] .= 1; A[10:12,13:15] .= 1; A[10:12,3:6] .= 1;
 
 julia> A
 13×16 Matrix{Bool}:
@@ -72,7 +72,7 @@
  0  0  1  1  1  1  0  0  0  0  0  0  1  1  1  0
  0  0  1  0  0  1  0  0  0  0  0  0  1  0  1  0
  0  0  1  1  1  1  0  0  0  0  0  0  1  1  1  0
- 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
source
IceFloeTracker.bwtraceboundaryMethod
bwtraceboundary(image::Union{Matrix{Int64},Matrix{Float64},T};
                 P0::Union{Tuple{Int,Int},CartesianIndex{2},Nothing}=nothing,
                 closed::Bool=true) where T<:AbstractMatrix{Bool}

Trace the boundary of objects in image

Background pixels are represented as zero. The algorithm traces the boundary counterclockwise and an initial point P0 can be specified. If more than one boundary is detected and an initial point is provided, the boundary that contains this point is returned as a vector of CartesianIndex types. Otherwise an array of vectors is returned with all the detected boundaries in image.

Arguments

  • image: image, preferably binary with one single object, whose objects' boundaries are to be traced.
  • P0: initial point of a target boundary.
  • closed: if true (default) makes the inital point of a boundary equal to the last point.

Example

julia> A = zeros(Int, 13, 16); A[2:6, 2:6] .= 1; A[4:8, 7:10] .= 1; A[10:12,13:15] .= 1; A[10:12,3:6] .= 1;
 
@@ -104,20 +104,20 @@
  CartesianIndex(11, 15)
  CartesianIndex(10, 15)
  CartesianIndex(10, 14)
- CartesianIndex(10, 13)
source
IceFloeTracker.check_fnameFunction
check_fname(fname)

Checks fname does not exist in current directory; throws an assertion if this condition is false.

Arguments

  • fname: String object or Symbol to a reference to a String representing a path.
source
IceFloeTracker.compute_ratiosMethod
compute_ratios((props_day1, r), (props_day2,s))

Compute the ratios of the floe properties between the rth floe in props_day1 and the sth floe in props_day2. Return a tuple of the ratios.

Arguments

  • props_day1: floe properties for day 1
  • r: index of floe in props_day1
  • props_day2: floe properties for day 2
  • s: index of floe in props_day2
source
IceFloeTracker.compute_ratios_conditionsMethod
compute_ratios_conditions((props_day1, r), (props_day2, s), delta_time, t)

Compute the conditions for a match between the rth floe in props_day1 and the sth floe in props_day2. Return a tuple of the conditions.

Arguments

  • props_day1: floe properties for day 1
  • r: index of floe in props_day1
  • props_day2: floe properties for day 2
  • s: index of floe in props_day2
  • delta_time: time elapsed from image day 1 to image day 2
  • t: tuple of thresholds for elapsed time and distance. See pair_floes for details.
source
IceFloeTracker.check_fnameFunction
check_fname(fname)

Checks fname does not exist in current directory; throws an assertion if this condition is false.

Arguments

  • fname: String object or Symbol to a reference to a String representing a path.
source
IceFloeTracker.compute_ratiosMethod
compute_ratios((props_day1, r), (props_day2,s))

Compute the ratios of the floe properties between the rth floe in props_day1 and the sth floe in props_day2. Return a tuple of the ratios.

Arguments

  • props_day1: floe properties for day 1
  • r: index of floe in props_day1
  • props_day2: floe properties for day 2
  • s: index of floe in props_day2
source
IceFloeTracker.compute_ratios_conditionsMethod
compute_ratios_conditions((props_day1, r), (props_day2, s), delta_time, t)

Compute the conditions for a match between the rth floe in props_day1 and the sth floe in props_day2. Return a tuple of the conditions.

Arguments

  • props_day1: floe properties for day 1
  • r: index of floe in props_day1
  • props_day2: floe properties for day 2
  • s: index of floe in props_day2
  • delta_time: time elapsed from image day 1 to image day 2
  • t: tuple of thresholds for elapsed time and distance. See pair_floes for details.
source
IceFloeTracker.conditional_histeqFunction
conditional_histeq(
 true_color_image,
 clouds_red,
 side_length::Int,
 entropy_threshold::AbstractFloat=4.0,
 white_threshold::AbstractFloat=25.5,
-white_fraction_threshold::AbstractFloat=0.4,

)

Performs conditional histogram equalization on a true color image using tiles of approximately sidelength size side_length. If a perfect tiling is not possible, the tiling on the egde of the image is adjusted to ensure that the tiles are as close to side_length as possible. See get_tiles(array, side_length) for more details.

source
IceFloeTracker.conditional_histeqFunction
conditional_histeq(
+white_fraction_threshold::AbstractFloat=0.4,

)

Performs conditional histogram equalization on a true color image using tiles of approximately sidelength size side_length. If a perfect tiling is not possible, the tiling on the egde of the image is adjusted to ensure that the tiles are as close to side_length as possible. See get_tiles(array, side_length) for more details.

source
IceFloeTracker.conditional_histeqFunction
conditional_histeq(
 true_color_image,
 clouds_red,
 rblocks::Int,
 cblocks::Int,
 entropy_threshold::AbstractFloat=4.0,
 white_threshold::AbstractFloat=25.5,
-white_fraction_threshold::AbstractFloat=0.4,

)

Performs conditional histogram equalization on a true color image.

Arguments

  • true_color_image: The true color image to be equalized.
  • clouds_red: The land/cloud masked red channel of the false color image.
  • rblocks: The number of row-blocks to divide the image into for histogram equalization. Default is 8.
  • cblocks: The number of column-blocks to divide the image into for histogram equalization. Default is 6.
  • entropy_threshold: The entropy threshold used to determine if a block should be equalized. Default is 4.0.
  • white_threshold: The white threshold used to determine if a pixel should be considered white. Default is 25.5.
  • white_fraction_threshold: The white fraction threshold used to determine if a block should be equalized. Default is 0.4.

Returns

The equalized true color image.

source
IceFloeTracker.consolidate_matched_pairsMethod
consolidate_matched_pairs(matched_pairs::MatchedPairs)

Consolidate the floe properties and similarity ratios of the matched pairs in matched_pairs into a single dataframe. Return the consolidated dataframe. Used in iteration 0.

source
IceFloeTracker.convertcentroid!Method
convertcentroid!(propdf, latlondata, colstodrop)

Convert the centroid coordinates from row and column to latitude and longitude dropping unwanted columns specified in colstodrop for the output data structure. Addionally, add columns x and y with the pixel coordinates of the centroid.

source
IceFloeTracker.converttounits!Method
converttounits!(propdf, latlondata, colstodrop)

Convert the floe properties from pixels to kilometers and square kilometers where appropiate. Also drop the columns specified in colstodrop.

source
IceFloeTracker.create_cloudmaskMethod
create_cloudmask(false_color_image; prelim_threshold, band_7_threshold, band_2_threshold, ratio_lower, ratio_upper)

Convert a 3-channel false color reflectance image to a 1-channel binary matrix; clouds = 0, else = 1. Default thresholds are defined in the published Ice Floe Tracker article: Remote Sensing of the Environment 234 (2019) 111406.

Arguments

  • false_color_image: corrected reflectance false color image - bands [7,2,1]
  • prelim_threshold: threshold value used to identify clouds in band 7, N0f8(RGB intensity/255)
  • band_7_threshold: threshold value used to identify cloud-ice in band 7, N0f8(RGB intensity/255)
  • band_2_threshold: threshold value used to identify cloud-ice in band 2, N0f8(RGB intensity/255)
  • ratio_lower: threshold value used to set lower ratio of cloud-ice in bands 7 and 2
  • ratio_upper: threshold value used to set upper ratio of cloud-ice in bands 7 and 2
source
IceFloeTracker.create_landmaskMethod
create_landmask(landmask_image, struct_elem, fill_value_lower, fill_value_upper)

Convert a 3-channel RGB land mask image to a 1-channel binary matrix, and use a structuring element to extend a buffer to mask complex coastal features. In the resulting mask, land = 0 and ocean = 1. Returns a named tuple with the dilated and non-dilated landmask.

Arguments

  • landmask_image: RGB land mask image from fetchdata
  • struct_elem: structuring element for dilation (optional)
  • fill_value_lower: fill holes having at least these many pixels (optional)
  • fill_value_upper: fill holes having at most these many pixels (optional)
source
IceFloeTracker.cropfloeMethod
cropfloe(floesimg, props, i)

Crops the floe delimited by the bounding box data in props at index i from the floe image floesimg.

If the dataframe has bounding box data min_row, min_col, max_row, max_col, but no label, then returns the largest contiguous component.

If the dataframe has bounding box data min_row, min_col, max_row, max_col, and a label, then returns the component with the label. In this case, floesimg must be an Array{Int}.

If the dataframe has only a label and no bounding box data, then returns the component with the label, padded by one cell of zeroes on all sides. In this case, floesimg must be an Array{Int}.

source
IceFloeTracker.cropfloeMethod
cropfloe(floesimg, min_row, min_col, max_row, max_col)

Crops the floe delimited by min_row, min_col, max_row, max_col, from the floe image floesimg.

source
IceFloeTracker.cropfloeMethod
cropfloe(floesimg, min_row, min_col, max_row, max_col, label)

Crops the floe from floesimg with the label label, returning the region bounded by min_row, min_col, max_row, max_col, and converting to a BitMatrix.

source
IceFloeTracker.crosscorrMethod
r, lags = crosscorr(u::Vector{T},
+white_fraction_threshold::AbstractFloat=0.4,

)

Performs conditional histogram equalization on a true color image.

Arguments

  • true_color_image: The true color image to be equalized.
  • clouds_red: The land/cloud masked red channel of the false color image.
  • rblocks: The number of row-blocks to divide the image into for histogram equalization. Default is 8.
  • cblocks: The number of column-blocks to divide the image into for histogram equalization. Default is 6.
  • entropy_threshold: The entropy threshold used to determine if a block should be equalized. Default is 4.0.
  • white_threshold: The white threshold used to determine if a pixel should be considered white. Default is 25.5.
  • white_fraction_threshold: The white fraction threshold used to determine if a block should be equalized. Default is 0.4.

Returns

The equalized true color image.

source
IceFloeTracker.consolidate_matched_pairsMethod
consolidate_matched_pairs(matched_pairs::MatchedPairs)

Consolidate the floe properties and similarity ratios of the matched pairs in matched_pairs into a single dataframe. Return the consolidated dataframe. Used in iteration 0.

source
IceFloeTracker.convertcentroid!Method
convertcentroid!(propdf, latlondata, colstodrop)

Convert the centroid coordinates from row and column to latitude and longitude dropping unwanted columns specified in colstodrop for the output data structure. Addionally, add columns x and y with the pixel coordinates of the centroid.

source
IceFloeTracker.converttounits!Method
converttounits!(propdf, latlondata, colstodrop)

Convert the floe properties from pixels to kilometers and square kilometers where appropiate. Also drop the columns specified in colstodrop.

source
IceFloeTracker.create_cloudmaskMethod
create_cloudmask(false_color_image; prelim_threshold, band_7_threshold, band_2_threshold, ratio_lower, ratio_upper)

Convert a 3-channel false color reflectance image to a 1-channel binary matrix; clouds = 0, else = 1. Default thresholds are defined in the published Ice Floe Tracker article: Remote Sensing of the Environment 234 (2019) 111406.

Arguments

  • false_color_image: corrected reflectance false color image - bands [7,2,1]
  • prelim_threshold: threshold value used to identify clouds in band 7, N0f8(RGB intensity/255)
  • band_7_threshold: threshold value used to identify cloud-ice in band 7, N0f8(RGB intensity/255)
  • band_2_threshold: threshold value used to identify cloud-ice in band 2, N0f8(RGB intensity/255)
  • ratio_lower: threshold value used to set lower ratio of cloud-ice in bands 7 and 2
  • ratio_upper: threshold value used to set upper ratio of cloud-ice in bands 7 and 2
source
IceFloeTracker.create_landmaskMethod
create_landmask(landmask_image, struct_elem, fill_value_lower, fill_value_upper)

Convert a 3-channel RGB land mask image to a 1-channel binary matrix, and use a structuring element to extend a buffer to mask complex coastal features. In the resulting mask, land = 0 and ocean = 1. Returns a named tuple with the dilated and non-dilated landmask.

Arguments

  • landmask_image: RGB land mask image from fetchdata
  • struct_elem: structuring element for dilation (optional)
  • fill_value_lower: fill holes having at least these many pixels (optional)
  • fill_value_upper: fill holes having at most these many pixels (optional)
source
IceFloeTracker.cropfloeMethod
cropfloe(floesimg, props, i)

Crops the floe delimited by the bounding box data in props at index i from the floe image floesimg.

If the dataframe has bounding box data min_row, min_col, max_row, max_col, but no label, then returns the largest contiguous component.

If the dataframe has bounding box data min_row, min_col, max_row, max_col, and a label, then returns the component with the label. In this case, floesimg must be an Array{Int}.

If the dataframe has only a label and no bounding box data, then returns the component with the label, padded by one cell of zeroes on all sides. In this case, floesimg must be an Array{Int}.

source
IceFloeTracker.cropfloeMethod
cropfloe(floesimg, min_row, min_col, max_row, max_col)

Crops the floe delimited by min_row, min_col, max_row, max_col, from the floe image floesimg.

source
IceFloeTracker.cropfloeMethod
cropfloe(floesimg, min_row, min_col, max_row, max_col, label)

Crops the floe from floesimg with the label label, returning the region bounded by min_row, min_col, max_row, max_col, and converting to a BitMatrix.

source
IceFloeTracker.crosscorrMethod
r, lags = crosscorr(u::Vector{T},
                     v::Vector{T};
                     normalize::Bool=false,
                     padmode::Symbol=:longest)

Wrapper of DSP.xcorr with normalization (see https://docs.juliadsp.org/stable/convolutions/#DSP.xcorr)

Returns the pair (r, lags) with the cross correlation scores r and corresponding lags according to padmode.

Arguments

  • u,v: real vectors which could have unequal length.
  • normalize: return normalized correlation scores (false by default).
  • padmode: either :longest (default) or :none to control padding of shorter vector with zeros.

Examples

The example below builds two vectors, one a shifted version of the other, and computes various cross correlation scores.

julia> n = 1:5;
@@ -180,7 +180,7 @@
 0.477211   4.0
 0.229061   5.0
 0.105402   6.0
-0.0411191  7.0
source
IceFloeTracker.discriminate_ice_waterMethod
discriminate_ice_water(
 falsecolor_image::Matrix{RGB{Float64}},
 normalized_image::Matrix{Gray{Float64}},
 landmask_bitmatrix::T,
@@ -195,11 +195,11 @@
 st_dev_thresh_upper::Float64=Float64(98.9 / 255),
 clouds_ratio_threshold::Float64=0.02,
 differ_threshold::Float64=0.6,
-nbins::Real=155

)

Generates an image with ice floes apparent after filtering and combining previously processed versions of falsecolor and truecolor images from the same region of interest. Returns an image ready for segmentation to isolate floes.

Note: This function mutates the landmask object to avoid unnecessary memory allocation. If you need the original landmask, make a copy before passing it to this function. Example: discriminate_ice_water(falsecolor_image, normalized_image, copy(landmask_bitmatrix), cloudmask_bitmatrix)

Arguments

  • falsecolor_image: input image in false color reflectance
  • normalized_image: normalized version of true color image
  • landmask_bitmatrix: landmask for region of interest
  • cloudmask_bitmatrix: cloudmask for region of interest
  • floes_threshold: heuristic applied to original false color image
  • mask_clouds_lower: lower heuristic applied to mask out clouds
  • mask_clouds_upper: upper heuristic applied to mask out clouds
  • kurt_thresh_lower: lower heuristic used to set pixel value threshold based on kurtosis in histogram
  • kurt_thresh_upper: upper heuristic used to set pixel value threshold based on kurtosis in histogram
  • skew_thresh: heuristic used to set pixel value threshold based on skewness in histogram
  • st_dev_thresh_lower: lower heuristic used to set pixel value threshold based on standard deviation in histogram
  • st_dev_thresh_upper: upper heuristic used to set pixel value threshold based on standard deviation in histogram
  • clouds2_threshold: heuristic used to set pixel value threshold based on ratio of clouds
  • differ_threshold: heuristic used to calculate proportional intensity in histogram
  • nbins: number of bins during histogram build
source
IceFloeTracker.find_floe_matchesMethod
find_floe_matches(
+nbins::Real=155

)

Generates an image with ice floes apparent after filtering and combining previously processed versions of falsecolor and truecolor images from the same region of interest. Returns an image ready for segmentation to isolate floes.

Note: This function mutates the landmask object to avoid unnecessary memory allocation. If you need the original landmask, make a copy before passing it to this function. Example: discriminate_ice_water(falsecolor_image, normalized_image, copy(landmask_bitmatrix), cloudmask_bitmatrix)

Arguments

  • falsecolor_image: input image in false color reflectance
  • normalized_image: normalized version of true color image
  • landmask_bitmatrix: landmask for region of interest
  • cloudmask_bitmatrix: cloudmask for region of interest
  • floes_threshold: heuristic applied to original false color image
  • mask_clouds_lower: lower heuristic applied to mask out clouds
  • mask_clouds_upper: upper heuristic applied to mask out clouds
  • kurt_thresh_lower: lower heuristic used to set pixel value threshold based on kurtosis in histogram
  • kurt_thresh_upper: upper heuristic used to set pixel value threshold based on kurtosis in histogram
  • skew_thresh: heuristic used to set pixel value threshold based on skewness in histogram
  • st_dev_thresh_lower: lower heuristic used to set pixel value threshold based on standard deviation in histogram
  • st_dev_thresh_upper: upper heuristic used to set pixel value threshold based on standard deviation in histogram
  • clouds2_threshold: heuristic used to set pixel value threshold based on ratio of clouds
  • differ_threshold: heuristic used to calculate proportional intensity in histogram
  • nbins: number of bins during histogram build
source
IceFloeTracker.find_floe_matchesMethod
find_floe_matches(
 tracked,
 candidate_props,
 condition_thresholds,
-mc_thresholds

)

Find matches for floes in tracked from floes in candidate_props.

Arguments

  • tracked: dataframe containing floe trajectories.
  • candidate_props: dataframe containing floe candidate properties.
  • condition_thresholds: thresholds for deciding whether to match floe i from tracked to floe j from candidate_props
  • mc_thresholds: thresholds for area mismatch and psi-s shape correlation
source
IceFloeTracker.find_ice_labelsMethod
find_ice_labels(falsecolor_image, landmask; band_7_threshold, band_2_threshold, band_1_threshold, band_7_relaxed_threshold, band_1_relaxed_threshold, possible_ice_threshold)

Locate the pixels of likely ice from false color reflectance image. Returns a binary mask with ice floes contrasted from background. Default thresholds are defined in the published Ice Floe Tracker article: Remote Sensing of the Environment 234 (2019) 111406.

Arguments

  • falsecolor_image: corrected reflectance false color image - bands [7,2,1]
  • landmask: bitmatrix landmask for region of interest
  • band_7_threshold: threshold value used to identify ice in band 7, N0f8(RGB intensity/255)
  • band_2_threshold: threshold value used to identify ice in band 2, N0f8(RGB intensity/255)
  • band_1_threshold: threshold value used to identify ice in band 2, N0f8(RGB intensity/255)
  • band_7_relaxed_threshold: threshold value used to identify ice in band 7 if not found on first pass, N0f8(RGB intensity/255)
  • band_1_relaxed_threshold: threshold value used to identify ice in band 1 if not found on first pass, N0f8(RGB intensity/255)
source
IceFloeTracker.find_reflectance_peaksMethod
find_reflectance_peaks(reflectance_channel, possible_ice_threshold;)

Find histogram peaks in single channels of a reflectance image and return the second greatest peak. If needed, edges can be returned as the first object from build_histogram. Similarly, peak values can be returned as the second object from findmaxima.

Arguments

  • reflectance_channel: either band 2 or band 1 of false-color reflectance image
  • possible_ice_threshold: threshold value used to identify ice if not found on first or second pass
source
IceFloeTracker.fixzeroindexing!Method
fixzeroindexing!(props::DataFrame, props_to_fix::Vector{T}) where T<:Union{Symbol,String}

Fix the zero-indexing of the props_to_fix columns in props by adding 1 to each element.

source
IceFloeTracker.from_toMethod

Get index in Moore neigborhood representing the direction from the from pixel coords to the to pixel coords (see definition of dir_delta below).

Clockwise Moore neighborhood.

dir_delta = [CartesianIndex(-1, 0), CartesianIndex(-1, 1), CartesianIndex(0, 1), CartesianIndex(1, 1), CartesianIndex(1, 0), CartesianIndex(1, -1), CartesianIndex(0, -1), CartesianIndex(-1,-1)]

source
IceFloeTracker.get_area_missedMethod
get_area_missed(side_length::Int, dims::Tuple{Int,Int})::Float64

Calculate the proportion of the area that is not covered by tiles of a given side length.

Arguments

  • side_length::Int: The side length of the tile.
  • dims::Tuple{Int,Int}: A tuple representing the dimensions (width, height).

Returns

  • Float64: The proportion of the area that is not covered by the tiles.

Examples

``` julia> getareamissed(5, (10, 20)) 0.0

julia> getareamissed(7, (10, 20)) 0.51

source
IceFloeTracker.get_areasMethod
get_areas(labeled_arr::Array{T, 2})::Dict{T, Int} where T

Get the "areas" (count of pixels of a given label) of the connected components in labeled_arr.

Return a dictionary with the frequency distribution: label => countoflabel.

source
IceFloeTracker.get_brighten_maskMethod
get_brighten_mask(equalized_gray_reconstructed_img, gamma_green)

Arguments

  • equalized_gray_reconstructed_img: The equalized gray reconstructed image (uint8 in Matlab).
  • gamma_green: The gamma value for the green channel (also uint8).

Returns

Difference equalizedgrayreconstructedimg - gammagreen clamped between 0 and 255.

source
IceFloeTracker.get_dtMethod
get_dt(props1, r, props2, s)

Return the time difference between the rth floe in props1 and the sth floe in props2 in minutes.

source
IceFloeTracker.get_finalFunction
get_final(img, label, segment_mask, se_erosion, se_dilation)

Final processing following the tiling workflow.

Arguments

  • img: The input image.
  • label: Mode of most common label in the findicelabels workflow.
  • segment_mask: The segment mask.
  • se_erosion: structuring element for erosion.
  • se_dilation: structuring element for dilation.
  • apply_segment_mask=true: Whether to filter img the segment mask.
source
IceFloeTracker.get_ice_masksMethod
get_ice_masks(
+mc_thresholds

)

Find matches for floes in tracked from floes in candidate_props.

Arguments

  • tracked: dataframe containing floe trajectories.
  • candidate_props: dataframe containing floe candidate properties.
  • condition_thresholds: thresholds for deciding whether to match floe i from tracked to floe j from candidate_props
  • mc_thresholds: thresholds for area mismatch and psi-s shape correlation
source
IceFloeTracker.find_ice_labelsMethod
find_ice_labels(falsecolor_image, landmask; band_7_threshold, band_2_threshold, band_1_threshold, band_7_relaxed_threshold, band_1_relaxed_threshold, possible_ice_threshold)

Locate the pixels of likely ice from false color reflectance image. Returns a binary mask with ice floes contrasted from background. Default thresholds are defined in the published Ice Floe Tracker article: Remote Sensing of the Environment 234 (2019) 111406.

Arguments

  • falsecolor_image: corrected reflectance false color image - bands [7,2,1]
  • landmask: bitmatrix landmask for region of interest
  • band_7_threshold: threshold value used to identify ice in band 7, N0f8(RGB intensity/255)
  • band_2_threshold: threshold value used to identify ice in band 2, N0f8(RGB intensity/255)
  • band_1_threshold: threshold value used to identify ice in band 2, N0f8(RGB intensity/255)
  • band_7_relaxed_threshold: threshold value used to identify ice in band 7 if not found on first pass, N0f8(RGB intensity/255)
  • band_1_relaxed_threshold: threshold value used to identify ice in band 1 if not found on first pass, N0f8(RGB intensity/255)
source
IceFloeTracker.find_reflectance_peaksMethod
find_reflectance_peaks(reflectance_channel, possible_ice_threshold;)

Find histogram peaks in single channels of a reflectance image and return the second greatest peak. If needed, edges can be returned as the first object from build_histogram. Similarly, peak values can be returned as the second object from findmaxima.

Arguments

  • reflectance_channel: either band 2 or band 1 of false-color reflectance image
  • possible_ice_threshold: threshold value used to identify ice if not found on first or second pass
source
IceFloeTracker.fixzeroindexing!Method
fixzeroindexing!(props::DataFrame, props_to_fix::Vector{T}) where T<:Union{Symbol,String}

Fix the zero-indexing of the props_to_fix columns in props by adding 1 to each element.

source
IceFloeTracker.from_toMethod

Get index in Moore neigborhood representing the direction from the from pixel coords to the to pixel coords (see definition of dir_delta below).

Clockwise Moore neighborhood.

dir_delta = [CartesianIndex(-1, 0), CartesianIndex(-1, 1), CartesianIndex(0, 1), CartesianIndex(1, 1), CartesianIndex(1, 0), CartesianIndex(1, -1), CartesianIndex(0, -1), CartesianIndex(-1,-1)]

source
IceFloeTracker.get_area_missedMethod
get_area_missed(side_length::Int, dims::Tuple{Int,Int})::Float64

Calculate the proportion of the area that is not covered by tiles of a given side length.

Arguments

  • side_length::Int: The side length of the tile.
  • dims::Tuple{Int,Int}: A tuple representing the dimensions (width, height).

Returns

  • Float64: The proportion of the area that is not covered by the tiles.

Examples

``` julia> getareamissed(5, (10, 20)) 0.0

julia> getareamissed(7, (10, 20)) 0.51

source
IceFloeTracker.get_areasMethod
get_areas(labeled_arr::Array{T, 2})::Dict{T, Int} where T

Get the "areas" (count of pixels of a given label) of the connected components in labeled_arr.

Return a dictionary with the frequency distribution: label => countoflabel.

source
IceFloeTracker.get_brighten_maskMethod
get_brighten_mask(equalized_gray_reconstructed_img, gamma_green)

Arguments

  • equalized_gray_reconstructed_img: The equalized gray reconstructed image (uint8 in Matlab).
  • gamma_green: The gamma value for the green channel (also uint8).

Returns

Difference equalizedgrayreconstructedimg - gammagreen clamped between 0 and 255.

source
IceFloeTracker.get_dtMethod
get_dt(props1, r, props2, s)

Return the time difference between the rth floe in props1 and the sth floe in props2 in minutes.

source
IceFloeTracker.get_finalFunction
get_final(img, label, segment_mask, se_erosion, se_dilation)

Final processing following the tiling workflow.

Arguments

  • img: The input image.
  • label: Mode of most common label in the findicelabels workflow.
  • segment_mask: The segment mask.
  • se_erosion: structuring element for erosion.
  • se_dilation: structuring element for dilation.
  • apply_segment_mask=true: Whether to filter img the segment mask.
source
IceFloeTracker.get_ice_masksMethod
get_ice_masks(
     falsecolor_image,
     morph_residue,
     landmask,
@@ -213,10 +213,10 @@
     possible_ice_threshold,
     k,
     factor
-)

Get the ice masks from the falsecolor image and morphological residue given a particular tiling configuration.

Arguments

  • falsecolor_image: The falsecolor image.
  • morph_residue: The morphological residue image.
  • landmask: The landmask.
  • tiles: The tiles.
  • binarize::Bool=true: Whether to binarize the tiling.
  • band_7_threshold=5: The threshold for band 7.
  • band_2_threshold=230: The threshold for band 2.
  • band_1_threshold=240: The threshold for band 1.
  • band_7_threshold_relaxed=10: The relaxed threshold for band 7.
  • band_1_threshold_relaxed=190: The relaxed threshold for band 1.
  • possible_ice_threshold=75: The threshold for possible ice.
  • k=3: The number of clusters to use for k-means segmentation.
  • factor=255: normalization factor to convert images to uint8.

Returns

  • A named tuple (icemask, bin) where:
    • icemask: The ice mask.
    • bin: The binarized tiling.
source
IceFloeTracker.get_matchesMethod
get_matches(matched_pairs)

Return a dataframe with the properties and goodness ratios of the matched pairs (right-hand matches) in matched_pairs. Used in iterations 1:end.

source
IceFloeTracker.get_optimal_tile_sizeMethod
get_optimal_tile_size(l0::Int, dims::Tuple{Int,Int}) -> Int

Calculate the optimal tile size in the range [l0-1, l0+1] for the given size l0 and image dimensions dims.

Description

This function computes the optimal tile size for tiling an area with given dimensions. It ensures that the initial tile size l0 is at least 2 and not larger than any of the given dimensions. The function evaluates candidate tile sizes and selects the one that minimizes the area missed by its corresponding tiling. In case of a tie, it prefers the larger tile size.

Example

julia> get_optimal_tile_size(3, (10, 7))
-2
source
IceFloeTracker.get_rgb_channelsMethod
get_rgb_channels(img)

Get the RBC (Red, Blue, and Green) channels of an image.

Arguments

  • img: The input image.

Returns

An m x n x 3 array the Red, Blue, and Green channels of the input image.

source
IceFloeTracker.get_tile_dimsMethod
get_tile_dims(tile)

Calculate the dimensions of a tile.

Arguments

  • tile::Tuple{UnitRange{Int},UnitRange{Int}}: A tuple representing the tile dimensions.

Returns

  • Tuple{Int,Int}: A tuple representing the width and height of the tile.

Examples

```julia julia> gettiledims((1:3, 1:4)) (4, 3)

source
IceFloeTracker.get_tile_metaMethod
get_tile_meta(tile)

Extracts metadata from a given tile.

Arguments

  • tile: A collection of tuples, where each tuple represents a coordinate pair.

Returns

  • A tuple (a, b, c, d) where:
    • a: The first element of the first tuple in tile.
    • b: The last element of the first tuple in tile.
    • c: The first element of the last tuple in tile.
    • d: The last element of the last tuple in tile.
source
IceFloeTracker.get_tilesMethod
get_tiles(array, side_length)

Generate a collection of tiles from an array.

Unlike TileIterator, the function adjusts the bottom and right edges of the tile matrix if they are smaller than half the tile size side_length.

source
IceFloeTracker.get_tilesMethod
get_tiles(array, t::Tuple{Int,Int})

Generate a collection of tiles from an array.

The function adjusts the bottom and right edges of the tile matrix if they are smaller than half the tile sizes in t.

source
IceFloeTracker.get_trajectory_headsMethod
get_trajectory_heads(pairs)

Return the last row (most recent member) of each group (trajectory) in pairs as a dataframe.

This is used for getting the initial floe properties for the next day in search for new pairs.

source
IceFloeTracker.getbestmatchdataMethod
getbestmatchdata(idx, r, props_day1, matching_floes)

Collect the data for the best match between the rth floe in props_day1 and the idxth floe in matching_floes. Return a tuple of the floe properties for day 1 and day 2 and the ratios.

source
IceFloeTracker.getfitMethod
getfit(dims::Tuple{Int,Int}, side_length::Int)::Tuple{Int,Int}

Calculate how many tiles of a given side length fit into the given dimensions.

Arguments

  • dims::Tuple{Int,Int}: A tuple representing the dimensions (width, height).
  • side_length::Int: The side length of the tile.

Returns

  • Tuple{Int,Int}: A tuple representing the number of tiles that fit along each dimension.

Examples

``` julia> getfit((10, 20), 5) (2, 4)

julia> getfit((15, 25), 5) (3, 5)

source
IceFloeTracker.getfloemasksMethod
getfloemasks(props::DataFrame, floeimg::BitMatrix)

Return a vector of cropped floe masks from floeimg using the bounding box data in props.

source
IceFloeTracker.getidxmostminimumeverythingMethod
getidxmostminimumeverything(ratiosdf)

Return the index of the row in ratiosdf with the most minima across its columns. If there are multiple columns with the same minimum value, return the index of the first column with the minimum value. If ratiosdf is empty, return NaN.

source
IceFloeTracker.getsizecomparabilityMethod
getsizecomparability(s1, s2)

Check if the size of two floes s1 and s2 are comparable. The size is defined as the product of the floe dimensions.

Arguments

  • s1: size of floe 1
  • s2: size of floe 2
source
IceFloeTracker.gradMethod
dx, dy = grad(A::Matrix{<:Number})

Make gradient vector field for the set of points with coordinates in the rows of the matrix A with x-coordinates down column 1 and y-coordinates down column 2. Return a tuple with dx and dy in that order.

source
IceFloeTracker.gradMethod
dx, dy = grad(x::Vector{<:Number}, y::Vector{<:Number})

Make gradient vector field for the set of points with coordinates in vectors x and y. Return a tuple with dx and dy in that order.

source
IceFloeTracker.hbreakMethod
hbreak(img::AbstractArray{Bool})

Remove H-connected pixels in the binary image img. See also hbreak! for an inplace version of this function.

Examples

```jldoctest; setup = :(using IceFloeTracker)

julia> h1 = trues(3,3); h1[[1 3], 2] .= false; h1 3×3 BitMatrix: 1 0 1 1 1 1 1 0 1

julia> h2 = trues(3,3); h2[2, [1 3]] .= false; h2 3×3 BitMatrix: 1 1 1 0 1 0 1 1 1

julia> hbreak!(h1); h1 # modify h1 inplace 3×3 BitMatrix: 1 0 1 1 0 1 1 0 1

julia> hbreak(h2) 3×3 BitMatrix: 1 1 1 0 0 0 1 1 1

source
IceFloeTracker.imadjustMethod
imadjust(img; low, high)

Adjust the contrast of an image using linear stretching. The image is normalized to [0, 1] and then stretched to the range [low, high].

Arguments

  • img: The input image.
  • low: The lower bound of the stretched image. Default is 0.01.
  • high: The upper bound of the stretched image. Default is 0.99.

Returns

The contrast-adjusted image in the range [0, 255].

source
IceFloeTracker.imbrightenMethod
imbrighten(img, brighten_mask, bright_factor)

Brighten the image using a mask and a brightening factor.

Arguments

  • img: The input image.
  • brighten_mask: A mask indicating the pixels to brighten.
  • bright_factor: The factor by which to brighten the pixels.

Returns

  • The brightened image.
source
IceFloeTracker.imextendedminFunction
imextendedmin(img)

Mimics MATLAB's imextendedmin function that computes the extended-minima transform, which is the regional minima of the H-minima transform. Regional minima are connected components of pixels with a constant intensity value. This function returns a transformed bitmatrix.

Arguments

  • img: image object
  • h: suppress minima below this depth threshold
  • conn: neighborhood connectivity; in 2D 1 = 4-neighborhood and 2 = 8-neighborhood
source
IceFloeTracker.imhistFunction
imhist(img, imgtype::AbstractString="uint8")

Compute the histogram of an image where each possible value is represented in the histogram. The function returns a tuple with the bins and counts of each bin.

Example

```jldoctest; setup = :(using IceFloeTracker) julia> img = [ 4 4 4 4 4 3 4 5 4 3 3 5 5 5 3 3 4 5 4 3 4 4 4 4 4 ]

julia> bins, heights = imhist(img);

julia> [bins[heights .> 0] heights[heights .>0]] # display only non-zero bins and heights 3×2 Matrix{Int64}: 3 6 4 14 5 5

source
IceFloeTracker.impose_minimaMethod
impose_minima(I::AbstractArray{T}, BW::AbstractArray{Bool}) where {T<:Integer}

Use morphological reconstruction to enforce minima on the input image I at the positions where the binary mask BW is non-zero.

It supports both integer and grayscale images using different implementations for each.

source
IceFloeTracker.imregionalminFunction
imregionalmin(img, conn=2)

Compute the regional minima of the image img using the connectivity conn.

Returns a bitmatrix of the same size as img with the regional minima.

Arguments

  • img: Image object
  • conn: Neighborhood connectivity; in 2D, 1 = 4-neighborhood and 2 = 8-neighborhood
source
IceFloeTracker.imsharpenFunction
imsharpen(truecolor_image, landmask_no_dilate, lambda, kappa, niters, nbins, rblocks, cblocks, clip, smoothing_param, intensity)

Sharpen truecolor_image.

Arguments

  • truecolor_image: input image in truecolor
  • landmask_no_dilate: landmask for region of interest
  • lambda: speed of diffusion (0–0.25)
  • kappa: conduction coefficient for diffusion (25–100)
  • niters: number of iterations of diffusion
  • nbins: number of bins during histogram equalization
  • rblocks: number of row blocks to divide input image during equalization
  • cblocks: number of column blocks to divide input image during equalization
  • clip: Thresholds for clipping histogram bins (0–1); values closer to one minimize contrast enhancement, values closer to zero maximize contrast enhancement
  • smoothing_param: pixel radius for gaussian blurring (1–10)
  • intensity: amount of sharpening to perform
source
IceFloeTracker.isfloegoodmatchMethod
isfloegoodmatch(conditions, mct, area_mismatch, corr)

Return true if the floes are a good match as per the set thresholds. Return false otherwise.

Arguments

  • conditions: tuple of booleans for evaluating the conditions
  • mct: tuple of thresholds for the match correlation test
  • area_mismatch and corr: values returned by match_corr
source
IceFloeTracker.kmeans_segmentationFunction
kmeans_segmentation(gray_image, ice_labels;)

Apply k-means segmentation to a gray image to isolate a cluster group representing sea ice. Returns a binary image with ice segmented from background.

Arguments

  • gray_image: output image from ice-water-discrimination.jl or gray ice floe leads image in segmentation_f.jl
  • ice_labels: vector if pixel coordinates output from find_ice_labels.jl
source
IceFloeTracker.loadimgMethod
loadimg(; dir::String, fname::String)

Load an image from dir with filename fname into a matrix of Float64 values. Returns the loaded image.

source
IceFloeTracker.long_trackerMethod
long_tracker(props, condition_thresholds, mc_thresholds)

Track ice floes over multiple days.

Trajectories are built in two steps:

  1. Get pairs of floes in day 1 and day 2. Any unmatched floes, in both day 1 and day 2, become the "heads" of their respective trajectories.
  2. For each subsequent day, find pairs of floes for the current trajectory heads. Again, any unmatched floe in the new prop table starts a new trajectory.

Arguments

  • props::Vector{DataFrame}: A vector of DataFrames, each containing ice floe properties for a single day. Each DataFrame must have the following columns:
    • "area"
    • "min_row"
    • "min_col"
    • "max_row"
    • "max_col"
    • "row_centroid"
    • "col_centroid"
    • "convex_area"
    • "majoraxislength"
    • "minoraxislength"
    • "orientation"
    • "perimeter"
    • "mask": 2D array of booleans
    • "passtime": A timestamp for the floe
    • "psi": the psi-s curve for the floe
    • "uuid": a universally unique identifier for each segmented floe
  • condition_thresholds: 3-tuple of thresholds (each a named tuple) for deciding whether to match floe i from day k to floe j from day k+1
  • mc_thresholds: thresholds for area mismatch and psi-s shape correlation

Returns

A DataFrame with the above columns, plus two extra columns, "area_mismatch" and "corr", which are the area mismatch and correlation between a floe and the one that follows it in the trajectory. Trajectories are identified by a unique identifier, "uuid".

source
IceFloeTracker.make_hbreak_dictMethod
make_hbreak_dict()

Build dict with the two versions of an H-connected 3x3 neighboorhood.

h1 = [1 0 1 1 1 1 1 0 1]

h2 = [1 1 1 0 1 0 1 1 1]

source
IceFloeTracker.make_psi_sMethod
make_psi_s(XY::Matrix{<:Number};rangeout::Bool=true,
-unwrap::Bool=true)

Alternate method of make_psi_s accepting input vectors x and y as a 2-column matrix [x y] in order to facillitate workflow (output from resample_boundary).

source
IceFloeTracker.make_psi_sMethod
make_psi_s(x::Vector{<:Number},
+)

Get the ice masks from the falsecolor image and morphological residue given a particular tiling configuration.

Arguments

  • falsecolor_image: The falsecolor image.
  • morph_residue: The morphological residue image.
  • landmask: The landmask.
  • tiles: The tiles.
  • binarize::Bool=true: Whether to binarize the tiling.
  • band_7_threshold=5: The threshold for band 7.
  • band_2_threshold=230: The threshold for band 2.
  • band_1_threshold=240: The threshold for band 1.
  • band_7_threshold_relaxed=10: The relaxed threshold for band 7.
  • band_1_threshold_relaxed=190: The relaxed threshold for band 1.
  • possible_ice_threshold=75: The threshold for possible ice.
  • k=3: The number of clusters to use for k-means segmentation.
  • factor=255: normalization factor to convert images to uint8.

Returns

  • A named tuple (icemask, bin) where:
    • icemask: The ice mask.
    • bin: The binarized tiling.
source
IceFloeTracker.get_matchesMethod
get_matches(matched_pairs)

Return a dataframe with the properties and goodness ratios of the matched pairs (right-hand matches) in matched_pairs. Used in iterations 1:end.

source
IceFloeTracker.get_optimal_tile_sizeMethod
get_optimal_tile_size(l0::Int, dims::Tuple{Int,Int}) -> Int

Calculate the optimal tile size in the range [l0-1, l0+1] for the given size l0 and image dimensions dims.

Description

This function computes the optimal tile size for tiling an area with given dimensions. It ensures that the initial tile size l0 is at least 2 and not larger than any of the given dimensions. The function evaluates candidate tile sizes and selects the one that minimizes the area missed by its corresponding tiling. In case of a tie, it prefers the larger tile size.

Example

julia> get_optimal_tile_size(3, (10, 7))
+2
source
IceFloeTracker.get_rgb_channelsMethod
get_rgb_channels(img)

Get the RBC (Red, Blue, and Green) channels of an image.

Arguments

  • img: The input image.

Returns

An m x n x 3 array the Red, Blue, and Green channels of the input image.

source
IceFloeTracker.get_tile_dimsMethod
get_tile_dims(tile)

Calculate the dimensions of a tile.

Arguments

  • tile::Tuple{UnitRange{Int},UnitRange{Int}}: A tuple representing the tile dimensions.

Returns

  • Tuple{Int,Int}: A tuple representing the width and height of the tile.

Examples

```julia julia> gettiledims((1:3, 1:4)) (4, 3)

source
IceFloeTracker.get_tile_metaMethod
get_tile_meta(tile)

Extracts metadata from a given tile.

Arguments

  • tile: A collection of tuples, where each tuple represents a coordinate pair.

Returns

  • A tuple (a, b, c, d) where:
    • a: The first element of the first tuple in tile.
    • b: The last element of the first tuple in tile.
    • c: The first element of the last tuple in tile.
    • d: The last element of the last tuple in tile.
source
IceFloeTracker.get_tilesMethod
get_tiles(array, side_length)

Generate a collection of tiles from an array.

Unlike TileIterator, the function adjusts the bottom and right edges of the tile matrix if they are smaller than half the tile size side_length.

source
IceFloeTracker.get_tilesMethod
get_tiles(array, t::Tuple{Int,Int})

Generate a collection of tiles from an array.

The function adjusts the bottom and right edges of the tile matrix if they are smaller than half the tile sizes in t.

source
IceFloeTracker.get_trajectory_headsMethod
get_trajectory_heads(pairs)

Return the last row (most recent member) of each group (trajectory) in pairs as a dataframe.

This is used for getting the initial floe properties for the next day in search for new pairs.

source
IceFloeTracker.getbestmatchdataMethod
getbestmatchdata(idx, r, props_day1, matching_floes)

Collect the data for the best match between the rth floe in props_day1 and the idxth floe in matching_floes. Return a tuple of the floe properties for day 1 and day 2 and the ratios.

source
IceFloeTracker.getfitMethod
getfit(dims::Tuple{Int,Int}, side_length::Int)::Tuple{Int,Int}

Calculate how many tiles of a given side length fit into the given dimensions.

Arguments

  • dims::Tuple{Int,Int}: A tuple representing the dimensions (width, height).
  • side_length::Int: The side length of the tile.

Returns

  • Tuple{Int,Int}: A tuple representing the number of tiles that fit along each dimension.

Examples

``` julia> getfit((10, 20), 5) (2, 4)

julia> getfit((15, 25), 5) (3, 5)

source
IceFloeTracker.getfloemasksMethod
getfloemasks(props::DataFrame, floeimg::BitMatrix)

Return a vector of cropped floe masks from floeimg using the bounding box data in props.

source
IceFloeTracker.getidxmostminimumeverythingMethod
getidxmostminimumeverything(ratiosdf)

Return the index of the row in ratiosdf with the most minima across its columns. If there are multiple columns with the same minimum value, return the index of the first column with the minimum value. If ratiosdf is empty, return NaN.

source
IceFloeTracker.getsizecomparabilityMethod
getsizecomparability(s1, s2)

Check if the size of two floes s1 and s2 are comparable. The size is defined as the product of the floe dimensions.

Arguments

  • s1: size of floe 1
  • s2: size of floe 2
source
IceFloeTracker.gradMethod
dx, dy = grad(A::Matrix{<:Number})

Make gradient vector field for the set of points with coordinates in the rows of the matrix A with x-coordinates down column 1 and y-coordinates down column 2. Return a tuple with dx and dy in that order.

source
IceFloeTracker.gradMethod
dx, dy = grad(x::Vector{<:Number}, y::Vector{<:Number})

Make gradient vector field for the set of points with coordinates in vectors x and y. Return a tuple with dx and dy in that order.

source
IceFloeTracker.hbreakMethod
hbreak(img::AbstractArray{Bool})

Remove H-connected pixels in the binary image img. See also hbreak! for an inplace version of this function.

Examples

```jldoctest; setup = :(using IceFloeTracker)

julia> h1 = trues(3,3); h1[[1 3], 2] .= false; h1 3×3 BitMatrix: 1 0 1 1 1 1 1 0 1

julia> h2 = trues(3,3); h2[2, [1 3]] .= false; h2 3×3 BitMatrix: 1 1 1 0 1 0 1 1 1

julia> hbreak!(h1); h1 # modify h1 inplace 3×3 BitMatrix: 1 0 1 1 0 1 1 0 1

julia> hbreak(h2) 3×3 BitMatrix: 1 1 1 0 0 0 1 1 1

source
IceFloeTracker.imadjustMethod
imadjust(img; low, high)

Adjust the contrast of an image using linear stretching. The image is normalized to [0, 1] and then stretched to the range [low, high].

Arguments

  • img: The input image.
  • low: The lower bound of the stretched image. Default is 0.01.
  • high: The upper bound of the stretched image. Default is 0.99.

Returns

The contrast-adjusted image in the range [0, 255].

source
IceFloeTracker.imbrightenMethod
imbrighten(img, brighten_mask, bright_factor)

Brighten the image using a mask and a brightening factor.

Arguments

  • img: The input image.
  • brighten_mask: A mask indicating the pixels to brighten.
  • bright_factor: The factor by which to brighten the pixels.

Returns

  • The brightened image.
source
IceFloeTracker.imextendedminFunction
imextendedmin(img)

Mimics MATLAB's imextendedmin function that computes the extended-minima transform, which is the regional minima of the H-minima transform. Regional minima are connected components of pixels with a constant intensity value. This function returns a transformed bitmatrix.

Arguments

  • img: image object
  • h: suppress minima below this depth threshold
  • conn: neighborhood connectivity; in 2D 1 = 4-neighborhood and 2 = 8-neighborhood
source
IceFloeTracker.imhistFunction
imhist(img, imgtype::AbstractString="uint8")

Compute the histogram of an image where each possible value is represented in the histogram. The function returns a tuple with the bins and counts of each bin.

Example

```jldoctest; setup = :(using IceFloeTracker) julia> img = [ 4 4 4 4 4 3 4 5 4 3 3 5 5 5 3 3 4 5 4 3 4 4 4 4 4 ]

julia> bins, heights = imhist(img);

julia> [bins[heights .> 0] heights[heights .>0]] # display only non-zero bins and heights 3×2 Matrix{Int64}: 3 6 4 14 5 5

source
IceFloeTracker.impose_minimaMethod
impose_minima(I::AbstractArray{T}, BW::AbstractArray{Bool}) where {T<:Integer}

Use morphological reconstruction to enforce minima on the input image I at the positions where the binary mask BW is non-zero.

It supports both integer and grayscale images using different implementations for each.

source
IceFloeTracker.imregionalminFunction
imregionalmin(img, conn=2)

Compute the regional minima of the image img using the connectivity conn.

Returns a bitmatrix of the same size as img with the regional minima.

Arguments

  • img: Image object
  • conn: Neighborhood connectivity; in 2D, 1 = 4-neighborhood and 2 = 8-neighborhood
source
IceFloeTracker.imsharpenFunction
imsharpen(truecolor_image, landmask_no_dilate, lambda, kappa, niters, nbins, rblocks, cblocks, clip, smoothing_param, intensity)

Sharpen truecolor_image.

Arguments

  • truecolor_image: input image in truecolor
  • landmask_no_dilate: landmask for region of interest
  • lambda: speed of diffusion (0–0.25)
  • kappa: conduction coefficient for diffusion (25–100)
  • niters: number of iterations of diffusion
  • nbins: number of bins during histogram equalization
  • rblocks: number of row blocks to divide input image during equalization
  • cblocks: number of column blocks to divide input image during equalization
  • clip: Thresholds for clipping histogram bins (0–1); values closer to one minimize contrast enhancement, values closer to zero maximize contrast enhancement
  • smoothing_param: pixel radius for gaussian blurring (1–10)
  • intensity: amount of sharpening to perform
source
IceFloeTracker.isfloegoodmatchMethod
isfloegoodmatch(conditions, mct, area_mismatch, corr)

Return true if the floes are a good match as per the set thresholds. Return false otherwise.

Arguments

  • conditions: tuple of booleans for evaluating the conditions
  • mct: tuple of thresholds for the match correlation test
  • area_mismatch and corr: values returned by match_corr
source
IceFloeTracker.kmeans_segmentationFunction
kmeans_segmentation(gray_image, ice_labels;)

Apply k-means segmentation to a gray image to isolate a cluster group representing sea ice. Returns a binary image with ice segmented from background.

Arguments

  • gray_image: output image from ice-water-discrimination.jl or gray ice floe leads image in segmentation_f.jl
  • ice_labels: vector if pixel coordinates output from find_ice_labels.jl
source
IceFloeTracker.loadimgMethod
loadimg(; dir::String, fname::String)

Load an image from dir with filename fname into a matrix of Float64 values. Returns the loaded image.

source
IceFloeTracker.long_trackerMethod
long_tracker(props, condition_thresholds, mc_thresholds)

Track ice floes over multiple days.

Trajectories are built in two steps:

  1. Get pairs of floes in day 1 and day 2. Any unmatched floes, in both day 1 and day 2, become the "heads" of their respective trajectories.
  2. For each subsequent day, find pairs of floes for the current trajectory heads. Again, any unmatched floe in the new prop table starts a new trajectory.

Arguments

  • props::Vector{DataFrame}: A vector of DataFrames, each containing ice floe properties for a single day. Each DataFrame must have the following columns:
    • "area"
    • "min_row"
    • "min_col"
    • "max_row"
    • "max_col"
    • "row_centroid"
    • "col_centroid"
    • "convex_area"
    • "majoraxislength"
    • "minoraxislength"
    • "orientation"
    • "perimeter"
    • "mask": 2D array of booleans
    • "passtime": A timestamp for the floe
    • "psi": the psi-s curve for the floe
    • "uuid": a universally unique identifier for each segmented floe
  • condition_thresholds: 3-tuple of thresholds (each a named tuple) for deciding whether to match floe i from day k to floe j from day k+1
  • mc_thresholds: thresholds for area mismatch and psi-s shape correlation

Returns

A DataFrame with the above columns, plus two extra columns, "area_mismatch" and "corr", which are the area mismatch and correlation between a floe and the one that follows it in the trajectory. Trajectories are identified by a unique identifier, "uuid".

source
IceFloeTracker.make_hbreak_dictMethod
make_hbreak_dict()

Build dict with the two versions of an H-connected 3x3 neighboorhood.

h1 = [1 0 1 1 1 1 1 0 1]

h2 = [1 1 1 0 1 0 1 1 1]

source
IceFloeTracker.make_psi_sMethod
make_psi_s(XY::Matrix{<:Number};rangeout::Bool=true,
+unwrap::Bool=true)

Alternate method of make_psi_s accepting input vectors x and y as a 2-column matrix [x y] in order to facillitate workflow (output from resample_boundary).

source
IceFloeTracker.make_psi_sMethod
make_psi_s(x::Vector{<:Number},
            y::Vector{<:Number};
            rangeout::Bool=true,
            unwrap::Bool=true)::Tuple{Vector{Float64}, Vector{Float64}}

Builds the ψ-s curve defined by vectors x and y.

Returns a tuple of vectors with the phases ψ in the first component and the traversed arclength in the second component.

Following the convention in [1], the wrapped ψ-s curve has values in [0, 2π) by default; use rangeout to control this behavior.

See also bwtraceboundary, resample_boundary

Arguments

  • x: Vector of x-coordinates
  • y: corresponding vector of y-coordinates
  • rangeout: true (default) for phase values in [0, 2π); false for phase values in (-π, π].
  • unwrap: set to true to get "unwrapped" phases (default).

Reference

[1] McConnell, Ross, et al. "psi-s correlation and dynamic time warping: two methods for tracking ice floes in SAR images." IEEE Transactions on Geoscience and Remote sensing 29.6 (1991): 1004-1012.

Example

The example below builds a cardioid and obtains its ψ-s curve.

julia> t = range(0,2pi,201);
@@ -252,7 +252,7 @@
  7.99877     9.35147
  7.99926     9.39336
 
- julia> plot(s, psi) # inspect psi-s curve -- should be a straight line from (0, 0) to (8, 3π)
source
IceFloeTracker.makeemptydffromMethod
makeemptydffrom(df::DataFrame)

Return an object with an empty dataframe with the same column names as df and an empty dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios.

source
IceFloeTracker.makeemptyratiosdfMethod
makeemptyratiosdf()

Return an empty dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios.

source
IceFloeTracker.makeemptydffromMethod
makeemptydffrom(df::DataFrame)

Return an object with an empty dataframe with the same column names as df and an empty dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios.

source
IceFloeTracker.makeemptyratiosdfMethod
makeemptyratiosdf()

Return an empty dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios.

source
IceFloeTracker.matchcorrMethod
matchcorr(
 f1::T,
 f2::T,
 Δt::F,
@@ -262,18 +262,18 @@
 comp::F=0.25,
 mm::F=0.22
 )
-where {T<:AbstractArray{Bool,2},S<:Int64,F<:Float64}

Compute the mismatch mm and psi-s-correlation c for floes with masks f1 and f2.

The criteria for floes to be considered equivalent is as follows: - c greater than mm - _mm is less than mm

A pair of NaN is returned for cases for which one of their mask dimension is too small or their sizes are not comparable.

Arguments

  • f1: mask of floe 1
  • f2: mask of floe 2
  • Δt: time difference between floes
  • mxrot: maximum rotation (in degrees) allowed between floesn (default: 10)
  • psi: psi-s-correlation threshold (default: 0.95)
  • sz: size threshold (default: 16)
  • comp: size comparability threshold (default: 0.25)
  • mm: mismatch threshold (default: 0.22)
source
IceFloeTracker.mismatchFunction
mismatch(fixed::AbstractArray,
+where {T<:AbstractArray{Bool,2},S<:Int64,F<:Float64}

Compute the mismatch mm and psi-s-correlation c for floes with masks f1 and f2.

The criteria for floes to be considered equivalent is as follows: - c greater than mm - _mm is less than mm

A pair of NaN is returned for cases for which one of their mask dimension is too small or their sizes are not comparable.

Arguments

  • f1: mask of floe 1
  • f2: mask of floe 2
  • Δt: time difference between floes
  • mxrot: maximum rotation (in degrees) allowed between floesn (default: 10)
  • psi: psi-s-correlation threshold (default: 0.95)
  • sz: size threshold (default: 16)
  • comp: size comparability threshold (default: 0.25)
  • mm: mismatch threshold (default: 0.22)
source
IceFloeTracker.mismatchFunction
mismatch(fixed::AbstractArray,
               moving::AbstractArray,
               mxshift::Tuple{Int64, Int64}=(10,10),
               mxrot::Float64=pi/4;
               kwargs...
-              )

Estimate a rigid transformation (translation + rotation) that minimizes the 'mismatch' of aligning moving with fixed using the QuadDIRECT algorithm.

Returns a pair with the mismatch score mm and the associated registration angle rot.

Arguments

  • fixed,moving: images to align via a rigid transformation
  • mxshift: maximum allowed translation in units of array indices (default set to (10,10))
  • mxrot: maximum allowed rotation in radians (default set to π/4)
  • thresh: minimum sum-of-squared-intensity overlap between the images (default is 10% of the sum-of-squared-intensity of fixed)
  • kwargs: other arguments such as tol, ftol, and fvalue (see QuadDIRECT.analyze for details)

```

source
IceFloeTracker.morph_fillMethod
morph_fill(bw::T)::T where {T<:AbstractArray{Bool}}

Fill holes in binary image bw by setting 0-valued pixels to 1 if they are surrounded by 1-valued pixels.

Examples

```jldoctest; setup = :(using IceFloeTracker) julia> bw = Bool[ 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 1 1 1 0 0 0 0 0 0 ];

julia> morph_fill(bw) 5×5 Matrix{Bool}: 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0

source
IceFloeTracker.normalize_imageMethod
normalize_image(image_sharpened, image_sharpened_gray, landmask, struct_elem;)

Adjusts sharpened land-masked image to highlight ice floe features.

Does reconstruction and landmasking to image_sharpened.

Arguments

  • image_sharpened: sharpened image (output of imsharpen)
  • image_sharpened_gray: grayscale, landmasked sharpened image (output of imsharpen_gray(image_sharpened))
  • landmask: landmask for region of interest
  • struct_elem: structuring element for dilation
source
IceFloeTracker.padnhoodMethod
padnhood(img, I, nhood)

Pad the matrix img[nhood] with zeros according to the position of I within the edgesimg.

Returns img[nhood] if I is not an edge index.

source
IceFloeTracker.pairfloesMethod
pairfloes(
+              )

Estimate a rigid transformation (translation + rotation) that minimizes the 'mismatch' of aligning moving with fixed using the QuadDIRECT algorithm.

Returns a pair with the mismatch score mm and the associated registration angle rot.

Arguments

  • fixed,moving: images to align via a rigid transformation
  • mxshift: maximum allowed translation in units of array indices (default set to (10,10))
  • mxrot: maximum allowed rotation in radians (default set to π/4)
  • thresh: minimum sum-of-squared-intensity overlap between the images (default is 10% of the sum-of-squared-intensity of fixed)
  • kwargs: other arguments such as tol, ftol, and fvalue (see QuadDIRECT.analyze for details)

```

source
IceFloeTracker.morph_fillMethod
morph_fill(bw::T)::T where {T<:AbstractArray{Bool}}

Fill holes in binary image bw by setting 0-valued pixels to 1 if they are surrounded by 1-valued pixels.

Examples

```jldoctest; setup = :(using IceFloeTracker) julia> bw = Bool[ 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 1 1 1 0 0 0 0 0 0 ];

julia> morph_fill(bw) 5×5 Matrix{Bool}: 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0

source
IceFloeTracker.normalize_imageMethod
normalize_image(image_sharpened, image_sharpened_gray, landmask, struct_elem;)

Adjusts sharpened land-masked image to highlight ice floe features.

Does reconstruction and landmasking to image_sharpened.

Arguments

  • image_sharpened: sharpened image (output of imsharpen)
  • image_sharpened_gray: grayscale, landmasked sharpened image (output of imsharpen_gray(image_sharpened))
  • landmask: landmask for region of interest
  • struct_elem: structuring element for dilation
source
IceFloeTracker.padnhoodMethod
padnhood(img, I, nhood)

Pad the matrix img[nhood] with zeros according to the position of I within the edgesimg.

Returns img[nhood] if I is not an edge index.

source
IceFloeTracker.pairfloesMethod
pairfloes(
 segmented_imgs::Vector{BitMatrix},
 props::Vector{DataFrame},
 passtimes::Vector{DateTime},
 latlonrefimage::AbstractString,
 condition_thresholds,
-mc_thresholds,

)

Pair floes in props[k] to floes in props[k+1] for k=1:length(props)-1.

The main steps of the algorithm are as follows:

  1. Crop floes from segmented_imgs using bounding box data in props. Floes in the edges are removed.
  2. For each floekr in props[k], compare to floek+1s in props[k+1] by computing similarity ratios, set of conditions, and drift distance dist. If the conditions are met, compute the area mismatch mm and psi-s correlation c for this pair of floes. Pair these two floes if mm and c satisfy the thresholds in mc_thresholds.
  3. If there are collisions (i.e. floe s in props[k+1] is paired to more than one floe in props[k]), then the floe in props[k] with the best match is paired to floe s in props[k+1].
  4. Drop paired floes from props[k] and props[k+1] and repeat steps 2 and 3 until there are no more floes to match in props[k].
  5. Repeat steps 2-4 for k=2:length(props)-1.

Arguments

  • segmented_imgs: array of images with segmented floes
  • props: array of dataframes containing floe properties
  • passtimes: array of DateTime objects containing the time of the image in which the floes were captured
  • latlonrefimage: path to geotiff reference image for getting latitude and longitude of floe centroids
  • condition_thresholds: 3-tuple of thresholds (each a named tuple) for deciding whether to match floe i from day k to floe j from day k+1
  • mc_thresholds: thresholds for area mismatch and psi-s shape correlation

Returns a dataframe containing the following columns:

  • ID: unique ID for each floe pairing.
  • passtime: time of the image in which the floes were captured.
  • area: area of the floe in sq. kilometers
  • convex_area: area of the convex hull of the floe in sq. kilometers
  • major_axis_length: length of the major axis of the floe in kilometers
  • minor_axis_length: length of the minor axis of the floe in kilometers
  • orientation: angle between the major axis and the x-axis in radians
  • perimeter: perimeter of the floe in kilometers
  • latitude: latitude of the floe centroid
  • longitude: longitude of the floe centroid
  • x: x-coordinate of the floe centroid
  • y: y-coordinate of the floe centroid
  • area_mismatch: area mismatch between the two floes in rowi and rowi+1 after registration
  • corr: psi-s shape correlation between the two floes in rowi and rowi+1
source
IceFloeTracker.reconstructFunction
reconstruct(img, se, type, invert)

Perform closing/opening by reconstruction on img.

Arguments

  • img::AbstractArray: The input image.
  • se::AbstractArray: The structuring element.
  • type::String: The type of morphological operation to perform. Must be either "dilation" (close by reconstruction) or "erosion" (open by reconstruction).
  • invert::Bool=true: Invert marker and mask before reconstruction.
source
IceFloeTracker.regionpropsFunction
regionprops(label_img, ; properties, connectivity)

A wrapper of the regionprops function from the skimage python library.

See its full documentation at https://scikit-image.org/docs/stable/api/skimage.measure.html#skimage.measure.regionprops.

Arguments

  • label_img: Image with the labeled objects of interest
  • intensity_img: (Optional) Used for generating extra_properties, integer/float array from which (presumably) label_img was generated
  • extra_properties: (Optional) not yet implemented. It will be set to nothing

See also regionprops_table

Examples

julia> Random.seed!(123);
+mc_thresholds,

)

Pair floes in props[k] to floes in props[k+1] for k=1:length(props)-1.

The main steps of the algorithm are as follows:

  1. Crop floes from segmented_imgs using bounding box data in props. Floes in the edges are removed.
  2. For each floekr in props[k], compare to floek+1s in props[k+1] by computing similarity ratios, set of conditions, and drift distance dist. If the conditions are met, compute the area mismatch mm and psi-s correlation c for this pair of floes. Pair these two floes if mm and c satisfy the thresholds in mc_thresholds.
  3. If there are collisions (i.e. floe s in props[k+1] is paired to more than one floe in props[k]), then the floe in props[k] with the best match is paired to floe s in props[k+1].
  4. Drop paired floes from props[k] and props[k+1] and repeat steps 2 and 3 until there are no more floes to match in props[k].
  5. Repeat steps 2-4 for k=2:length(props)-1.

Arguments

  • segmented_imgs: array of images with segmented floes
  • props: array of dataframes containing floe properties
  • passtimes: array of DateTime objects containing the time of the image in which the floes were captured
  • latlonrefimage: path to geotiff reference image for getting latitude and longitude of floe centroids
  • condition_thresholds: 3-tuple of thresholds (each a named tuple) for deciding whether to match floe i from day k to floe j from day k+1
  • mc_thresholds: thresholds for area mismatch and psi-s shape correlation

Returns a dataframe containing the following columns:

  • ID: unique ID for each floe pairing.
  • passtime: time of the image in which the floes were captured.
  • area: area of the floe in sq. kilometers
  • convex_area: area of the convex hull of the floe in sq. kilometers
  • major_axis_length: length of the major axis of the floe in kilometers
  • minor_axis_length: length of the minor axis of the floe in kilometers
  • orientation: angle between the major axis and the x-axis in radians
  • perimeter: perimeter of the floe in kilometers
  • latitude: latitude of the floe centroid
  • longitude: longitude of the floe centroid
  • x: x-coordinate of the floe centroid
  • y: y-coordinate of the floe centroid
  • area_mismatch: area mismatch between the two floes in rowi and rowi+1 after registration
  • corr: psi-s shape correlation between the two floes in rowi and rowi+1
source
IceFloeTracker.reconstructFunction
reconstruct(img, se, type, invert)

Perform closing/opening by reconstruction on img.

Arguments

  • img::AbstractArray: The input image.
  • se::AbstractArray: The structuring element.
  • type::String: The type of morphological operation to perform. Must be either "dilation" (close by reconstruction) or "erosion" (open by reconstruction).
  • invert::Bool=true: Invert marker and mask before reconstruction.
source
IceFloeTracker.regionpropsFunction
regionprops(label_img, ; properties, connectivity)

A wrapper of the regionprops function from the skimage python library.

See its full documentation at https://scikit-image.org/docs/stable/api/skimage.measure.html#skimage.measure.regionprops.

Arguments

  • label_img: Image with the labeled objects of interest
  • intensity_img: (Optional) Used for generating extra_properties, integer/float array from which (presumably) label_img was generated
  • extra_properties: (Optional) not yet implemented. It will be set to nothing

See also regionprops_table

Examples

julia> Random.seed!(123);
 
 julia> bw_img = rand([0, 1], 5, 10)
 5×10 Matrix{Int64}:
@@ -299,7 +299,7 @@
 13      11.621320343559642
 1       0.0
 1       0.0
-7       4.621320343559642
source
IceFloeTracker.regionprops_tableFunction
regionprops_table(label_img, intensity_img; properties, connectivity, extra_properties)

A wrapper of the regionprops_table function from the skimage python library.

See its full documentation at https://scikit-image.org/docs/stable/api/skimage.measure.html#regionprops-table.

Arguments

  • label_img: Image with the labeled objects of interest
  • intensity_img: (Optional) Used for generating extra_properties, integer/float array from which (presumably) label_img was generated
  • properties: List (Vector or Tuple) of properties to be generated for each connected component in label_img
  • extra_properties: (Optional) not yet implemented. It will be set to nothing

Notes

  • Zero indexing has been corrected for the bbox and centroid properties
  • bbox data (max_col and max_row) are inclusive
  • centroid data are rounded to the nearest integer

See also regionprops

Examples

julia> using IceFloeTracker, Random
+7       4.621320343559642
source
IceFloeTracker.regionprops_tableFunction
regionprops_table(label_img, intensity_img; properties, connectivity, extra_properties)

A wrapper of the regionprops_table function from the skimage python library.

See its full documentation at https://scikit-image.org/docs/stable/api/skimage.measure.html#regionprops-table.

Arguments

  • label_img: Image with the labeled objects of interest
  • intensity_img: (Optional) Used for generating extra_properties, integer/float array from which (presumably) label_img was generated
  • properties: List (Vector or Tuple) of properties to be generated for each connected component in label_img
  • extra_properties: (Optional) not yet implemented. It will be set to nothing

Notes

  • Zero indexing has been corrected for the bbox and centroid properties
  • bbox data (max_col and max_row) are inclusive
  • centroid data are rounded to the nearest integer

See also regionprops

Examples

julia> using IceFloeTracker, Random
 
 julia> Random.seed!(123);
 
@@ -332,17 +332,17 @@
     1 │    13   11.6213
     2 │     1    0.0
     3 │     1    0.0
-    4 │     7    4.62132
source
IceFloeTracker.regularize_fill_holesMethod
regularize_fill_holes(img, local_maxima_mask, factor, segment_mask, L0mask)

Regularize img by: 1. increasing the maxima of img by a factor of factor 2. filtering img at positions where either segment_mask or L0mask are true 3. filling holes

Arguments

  • img: The morphological residue image.
  • local_maxima_mask: The local maxima mask.
  • factor: The factor to apply to the local maxima mask.
  • segment_mask: The segment mask – intersection of bw1 and bw2 in first tiled workflow of master.m.
  • L0mask: zero-labeled pixels from watershed.
source
IceFloeTracker.regularize_sharpeningMethod
regularize_sharpening(img, L0mask, radius, amount, local_maxima_mask, factor, segment_mask, se)

Regularize img via sharpening, filtering, reconstruction, and maxima elevating.

Arguments

  • img: The input image.
  • L0mask: zero-labeled pixels from watershed.
  • radius: The radius of the unsharp mask.
  • amount: The amount of unsharp mask.
  • local_maxima_mask: The local maxima mask.
  • factor: The factor to apply to the local maxima mask.
  • segment_mask: The segment mask – intersection of bw1 and bw2 in first tiled workflow of master.m.
source
IceFloeTracker.remove_paddingMethod
remove_padding(paddedimg, border_spec)

Removes padding from the boundary of padded image paddedimg according to the border specification border_spec type. Returns the cropped image.

Arguments

  • paddedimg: Pre-padded image.
  • border_spec: Type representing the style of padding (such as Pad or Fill) with which paddedimg is assumend to be pre-padded. Example: Pad((1,2), (3,4)) specifies 1 row on the top, 2 columns on the left, 3 rows on the bottom, and 4 columns on the right boundary.

See also add_padding

source
IceFloeTracker.renamecols!Method
renamecols!(props::DataFrame, oldnames::Vector{T}, newnames::Vector{T}) where T<:Union{Symbol,String}

Rename the oldnames columns in props to newnames.

source
IceFloeTracker.resample_boundaryFunction
resample_boundary(bd_points::Vector{<:CartesianIndex}, reduc_factor::Int64=2, bd::String="natural")

Get a uniform set of resampled boundary points from bd_points using cubic splines with specified boundary conditions

The resampled set of points is obtained using parametric interpolation of the points in bd_points. It is assumed that the separation between a pair of adjacent points is 1.

Arguments

  • bd_points: Sequetial set of boundary points for the object of interest
  • reduc_factor: Factor by which to reduce the number of points in bd_points (2 by default)

-bd: Boundary condition, either 'natural' (default) or 'periodic'

See also bwtraceboundary

Example

```jldoctest; setup = :(using IceFloeTracker) julia> A = zeros(Int, 13, 16); A[2:6, 2:6] .= 1; A[4:8, 7:10] .= 1; A[10:12,13:15] .= 1; A[10:12,3:6] .= 1; julia> A 13×16 Matrix{Int64}: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

julia> boundary = bwtraceboundary(A);

julia> boundary[3] 9-element Vector{CartesianIndex}: CartesianIndex(10, 13) CartesianIndex(11, 13) CartesianIndex(12, 13) CartesianIndex(12, 14) CartesianIndex(12, 15) CartesianIndex(11, 15) CartesianIndex(10, 15) CartesianIndex(10, 14) CartesianIndex(10, 13)

julia> resample_boundary(boundary[3]) 4×2 Matrix{Float64}: 10.0 13.0 12.0357 13.5859 10.5859 15.0357 10.0 13.0

source
IceFloeTracker.reset_id!Function
reset_id!(df, col)

Reset the distinct values in the column col of df to be consecutive integers starting from 1.

source
IceFloeTracker.rgb2grayMethod
rgb2gray(rgbchannels::Array{Float64, 3})

Convert an array of RGB channel data to grayscale in the range [0, 255].

Identical to MATLAB rgb2gray (https://www.mathworks.com/help/matlab/ref/rgb2gray.html).

source
IceFloeTracker.roundtoint!Method
roundtoint!(props::DataFrame, colnames::Vector{T}) where T<:Union{Symbol,String}

Round the colnames columns in props to Int.

source
IceFloeTracker.segmentation_AMethod
segmentation_A(segmented_ice_cloudmasked; min_opening_area)

Apply k-means segmentation to a gray image to isolate a cluster group representing sea ice. Returns an image segmented and processed as well as an intermediate files needed for downstream functions.

Arguments

  • segmented_ice_cloudmask: bitmatrix with open water/clouds = 0, ice = 1, output from segmented_ice_cloudmasking()
  • min_opening_area: minimum size of pixels to use during morphological opening
  • fill_range: range of values dictating the size of holes to fill
source
IceFloeTracker.segmentation_BFunction
segmentation_B(sharpened_image, cloudmask, segmented_a_ice_mask, struct_elem; fill_range, isolation_threshold, alpha_level, adjusted_ice_threshold)

Performs image processing and morphological filtering with intermediate files from normalization.jl and segmentation_A to further isolate ice floes, returning a mask of potential ice.

Arguments

  • sharpened_image: non-cloudmasked but sharpened image, output from normalization.jl
  • cloudmask: bitmatrix cloudmask for region of interest
  • segmented_a_ice_mask: binary cloudmasked ice mask from segmentation_a_direct.jl
  • struct_elem: structuring element for dilation
  • fill_range: range of values dictating the size of holes to fill
  • isolation_threshold: threshold used to isolated pixels from sharpened_image; between 0-1
  • alpha_level: alpha threshold used to adjust contrast
  • gamma_factor: amount of gamma adjustment
  • adjusted_ice_threshold: threshold used to set ice equal to one after gamma adjustment
source
IceFloeTracker.regularize_fill_holesMethod
regularize_fill_holes(img, local_maxima_mask, factor, segment_mask, L0mask)

Regularize img by: 1. increasing the maxima of img by a factor of factor 2. filtering img at positions where either segment_mask or L0mask are true 3. filling holes

Arguments

  • img: The morphological residue image.
  • local_maxima_mask: The local maxima mask.
  • factor: The factor to apply to the local maxima mask.
  • segment_mask: The segment mask – intersection of bw1 and bw2 in first tiled workflow of master.m.
  • L0mask: zero-labeled pixels from watershed.
source
IceFloeTracker.regularize_sharpeningMethod
regularize_sharpening(img, L0mask, radius, amount, local_maxima_mask, factor, segment_mask, se)

Regularize img via sharpening, filtering, reconstruction, and maxima elevating.

Arguments

  • img: The input image.
  • L0mask: zero-labeled pixels from watershed.
  • radius: The radius of the unsharp mask.
  • amount: The amount of unsharp mask.
  • local_maxima_mask: The local maxima mask.
  • factor: The factor to apply to the local maxima mask.
  • segment_mask: The segment mask – intersection of bw1 and bw2 in first tiled workflow of master.m.
source
IceFloeTracker.remove_paddingMethod
remove_padding(paddedimg, border_spec)

Removes padding from the boundary of padded image paddedimg according to the border specification border_spec type. Returns the cropped image.

Arguments

  • paddedimg: Pre-padded image.
  • border_spec: Type representing the style of padding (such as Pad or Fill) with which paddedimg is assumend to be pre-padded. Example: Pad((1,2), (3,4)) specifies 1 row on the top, 2 columns on the left, 3 rows on the bottom, and 4 columns on the right boundary.

See also add_padding

source
IceFloeTracker.renamecols!Method
renamecols!(props::DataFrame, oldnames::Vector{T}, newnames::Vector{T}) where T<:Union{Symbol,String}

Rename the oldnames columns in props to newnames.

source
IceFloeTracker.resample_boundaryFunction
resample_boundary(bd_points::Vector{<:CartesianIndex}, reduc_factor::Int64=2, bd::String="natural")

Get a uniform set of resampled boundary points from bd_points using cubic splines with specified boundary conditions

The resampled set of points is obtained using parametric interpolation of the points in bd_points. It is assumed that the separation between a pair of adjacent points is 1.

Arguments

  • bd_points: Sequetial set of boundary points for the object of interest
  • reduc_factor: Factor by which to reduce the number of points in bd_points (2 by default)

-bd: Boundary condition, either 'natural' (default) or 'periodic'

See also bwtraceboundary

Example

```jldoctest; setup = :(using IceFloeTracker) julia> A = zeros(Int, 13, 16); A[2:6, 2:6] .= 1; A[4:8, 7:10] .= 1; A[10:12,13:15] .= 1; A[10:12,3:6] .= 1; julia> A 13×16 Matrix{Int64}: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

julia> boundary = bwtraceboundary(A);

julia> boundary[3] 9-element Vector{CartesianIndex}: CartesianIndex(10, 13) CartesianIndex(11, 13) CartesianIndex(12, 13) CartesianIndex(12, 14) CartesianIndex(12, 15) CartesianIndex(11, 15) CartesianIndex(10, 15) CartesianIndex(10, 14) CartesianIndex(10, 13)

julia> resample_boundary(boundary[3]) 4×2 Matrix{Float64}: 10.0 13.0 12.0357 13.5859 10.5859 15.0357 10.0 13.0

source
IceFloeTracker.reset_id!Function
reset_id!(df, col)

Reset the distinct values in the column col of df to be consecutive integers starting from 1.

source
IceFloeTracker.rgb2grayMethod
rgb2gray(rgbchannels::Array{Float64, 3})

Convert an array of RGB channel data to grayscale in the range [0, 255].

Identical to MATLAB rgb2gray (https://www.mathworks.com/help/matlab/ref/rgb2gray.html).

source
IceFloeTracker.roundtoint!Method
roundtoint!(props::DataFrame, colnames::Vector{T}) where T<:Union{Symbol,String}

Round the colnames columns in props to Int.

source
IceFloeTracker.segmentation_AMethod
segmentation_A(segmented_ice_cloudmasked; min_opening_area)

Apply k-means segmentation to a gray image to isolate a cluster group representing sea ice. Returns an image segmented and processed as well as an intermediate files needed for downstream functions.

Arguments

  • segmented_ice_cloudmask: bitmatrix with open water/clouds = 0, ice = 1, output from segmented_ice_cloudmasking()
  • min_opening_area: minimum size of pixels to use during morphological opening
  • fill_range: range of values dictating the size of holes to fill
source
IceFloeTracker.segmentation_BFunction
segmentation_B(sharpened_image, cloudmask, segmented_a_ice_mask, struct_elem; fill_range, isolation_threshold, alpha_level, adjusted_ice_threshold)

Performs image processing and morphological filtering with intermediate files from normalization.jl and segmentation_A to further isolate ice floes, returning a mask of potential ice.

Arguments

  • sharpened_image: non-cloudmasked but sharpened image, output from normalization.jl
  • cloudmask: bitmatrix cloudmask for region of interest
  • segmented_a_ice_mask: binary cloudmasked ice mask from segmentation_a_direct.jl
  • struct_elem: structuring element for dilation
  • fill_range: range of values dictating the size of holes to fill
  • isolation_threshold: threshold used to isolated pixels from sharpened_image; between 0-1
  • alpha_level: alpha threshold used to adjust contrast
  • gamma_factor: amount of gamma adjustment
  • adjusted_ice_threshold: threshold used to set ice equal to one after gamma adjustment
source
IceFloeTracker.segmentation_FMethod
segmentation_F(
 segmentation_B_not_ice_mask::Matrix{Gray{Float64}},
 segmentation_B_ice_intersect::BitMatrix,
 segmentation_B_watershed_intersect::BitMatrix,
 ice_labels::Vector{Int64},
 cloudmask::BitMatrix,
 landmask::BitMatrix;
-min_area_opening::Int64=20

)

Cleans up past segmentation images with morphological operations, and applies the results of prior watershed segmentation, returning the final cleaned image for tracking with ice floes segmented and isolated.

Arguments

  • segmentation_B_not_ice_mask: gray image output from segmentation_b.jl
  • segmentation_B_ice_intersect: binary mask output from segmentation_b.jl
  • segmentation_B_watershed_intersect: ice pixels, output from segmentation_b.jl
  • ice_labels: vector of pixel coordinates output from find_ice_labels.jl
  • cloudmask.jl: bitmatrix cloudmask for region of interest
  • landmask.jl: bitmatrix landmask for region of interest
  • min_area_opening: threshold used for area opening; pixel groups greater than threshold are retained
source
IceFloeTracker.segmented_ice_cloudmaskingMethod
segmented_ice_cloudmasking(gray_image, cloudmask, ice_labels;)

Apply cloudmask to a bitmatrix of segmented ice after kmeans clustering. Returns a bitmatrix with open water/clouds = 0, ice = 1).

Arguments

  • gray_image: output image from ice-water-discrimination.jl or gray ice floe leads image in segmentation_f.jl
  • cloudmask: bitmatrix cloudmask for region of interest
  • ice_labels: vector if pixel coordinates output from find_ice_labels.jl
source
IceFloeTracker.trackercond1Function
trackercond1(p1, p2, delta_time, t1=(dt = (30, 100, 1300), dist=(15, 30, 120)))

Return true if the floe at p1 and the floe at p2 are within a certain distance of each other and the displacement time is within a certain range. Return false otherwise.

Arguments

  • p1: coordinates of floe 1
  • p2: coordinates of floe 2
  • delta_time: time elapsed from image day 1 to image day 2
  • t: tuple of thresholds for elapsed time and distance
source
IceFloeTracker.trackercond2Function
trackercond2(area1, ratios, t2=(area=1200, arearatio=0.28, majaxisratio=0.10, minaxisratio=0.12, convex_area=0.14))

Set of conditions for "big" floes. Return true if the area of the floe is greater than t2.area and the similarity ratios are less than the corresponding thresholds in t2. Return false otherwise.

source
IceFloeTracker.trackercond3Function
trackercond3(area1, ratios, t3=(area=1200, arearatio=0.18, majaxisratio=0.07, minaxisratio=0.08, convex_area=0.09))

Set of conditions for "small" floes. Return true if the area of the floe is less than t3.area and the similarity ratios are less than the corresponding thresholds in t3. Return false otherwise

source
IceFloeTracker.unsharp_maskMethod
unsharp_mask(image_gray, smoothing_param, intensity, clampmax)

Apply unsharp masking on (equalized) grayscale ([0, clampmax]) image to enhance its sharpness.

Arguments

  • image_gray: The input grayscale image, typically already equalized.
  • smoothing_param::Int: The pixel radius for Gaussian blurring (typically between 1 and 10).
  • intensity: The amount of sharpening to apply. Higher values result in more pronounced sharpening.
  • clampmax: upper limit of intensity values in the returned image.`

Returns

The sharpened grayscale image with values clipped between 0 and clapmax.

source
IceFloeTracker.unsharp_maskMethod
(Deprecated)
-unsharp_mask(image_gray, smoothing_param, intensity)

Apply unsharp masking on (equalized) grayscale image to enhance its sharpness.

Does not perform clamping after the smoothing step. Kept for legacy tests of IceFloeTracker.jl.

Arguments

  • image_gray: The input grayscale image, typically already equalized.
  • smoothing_param::Int: The pixel radius for Gaussian blurring (typically between 1 and 10).
  • intensity: The amount of sharpening to apply. Higher values result in more pronounced sharpening.

Returns

The sharpened grayscale image with values clipped between 0 and clapmax.

source
IceFloeTracker.update!Method
update!(match_total::MatchedPairs, matched_pairs::MatchedPairs)

Update match_total with the data from matched_pairs.

source
IceFloeTracker.watershed_ice_floesMethod
watershed_ice_floes(intermediate_segmentation_image;)

Performs image processing and watershed segmentation with intermediate files from segmentation_b.jl to further isolate ice floes, returning a binary segmentation mask indicating potential sparse boundaries of ice floes.

Arguments

-intermediate_segmentation_image: binary cloudmasked and landmasked intermediate file from segmentation B, either SegB.not_ice_bit or SegB.ice_intersect

source
IceFloeTracker.watershed_productMethod
watershed_product(watershed_B_ice_intersect, watershed_B_not_ice;)

Intersects the outputs of watershed segmentation on intermediate files from segmentation B, indicating potential sparse boundaries of ice floes.

Arguments

  • watershed_B_ice_intersect: binary segmentation mask from watershed_ice_floes
  • watershed_B_not_ice: binary segmentation mask from watershed_ice_floes
source
IceFloeTracker.@persistMacro
@persist img fname
+min_area_opening::Int64=20

)

Cleans up past segmentation images with morphological operations, and applies the results of prior watershed segmentation, returning the final cleaned image for tracking with ice floes segmented and isolated.

Arguments

  • segmentation_B_not_ice_mask: gray image output from segmentation_b.jl
  • segmentation_B_ice_intersect: binary mask output from segmentation_b.jl
  • segmentation_B_watershed_intersect: ice pixels, output from segmentation_b.jl
  • ice_labels: vector of pixel coordinates output from find_ice_labels.jl
  • cloudmask.jl: bitmatrix cloudmask for region of interest
  • landmask.jl: bitmatrix landmask for region of interest
  • min_area_opening: threshold used for area opening; pixel groups greater than threshold are retained
source
IceFloeTracker.segmented_ice_cloudmaskingMethod
segmented_ice_cloudmasking(gray_image, cloudmask, ice_labels;)

Apply cloudmask to a bitmatrix of segmented ice after kmeans clustering. Returns a bitmatrix with open water/clouds = 0, ice = 1).

Arguments

  • gray_image: output image from ice-water-discrimination.jl or gray ice floe leads image in segmentation_f.jl
  • cloudmask: bitmatrix cloudmask for region of interest
  • ice_labels: vector if pixel coordinates output from find_ice_labels.jl
source
IceFloeTracker.trackercond1Function
trackercond1(p1, p2, delta_time, t1=(dt = (30, 100, 1300), dist=(15, 30, 120)))

Return true if the floe at p1 and the floe at p2 are within a certain distance of each other and the displacement time is within a certain range. Return false otherwise.

Arguments

  • p1: coordinates of floe 1
  • p2: coordinates of floe 2
  • delta_time: time elapsed from image day 1 to image day 2
  • t: tuple of thresholds for elapsed time and distance
source
IceFloeTracker.trackercond2Function
trackercond2(area1, ratios, t2=(area=1200, arearatio=0.28, majaxisratio=0.10, minaxisratio=0.12, convex_area=0.14))

Set of conditions for "big" floes. Return true if the area of the floe is greater than t2.area and the similarity ratios are less than the corresponding thresholds in t2. Return false otherwise.

source
IceFloeTracker.trackercond3Function
trackercond3(area1, ratios, t3=(area=1200, arearatio=0.18, majaxisratio=0.07, minaxisratio=0.08, convex_area=0.09))

Set of conditions for "small" floes. Return true if the area of the floe is less than t3.area and the similarity ratios are less than the corresponding thresholds in t3. Return false otherwise

source
IceFloeTracker.unsharp_maskMethod
unsharp_mask(image_gray, smoothing_param, intensity, clampmax)

Apply unsharp masking on (equalized) grayscale ([0, clampmax]) image to enhance its sharpness.

Arguments

  • image_gray: The input grayscale image, typically already equalized.
  • smoothing_param::Int: The pixel radius for Gaussian blurring (typically between 1 and 10).
  • intensity: The amount of sharpening to apply. Higher values result in more pronounced sharpening.
  • clampmax: upper limit of intensity values in the returned image.`

Returns

The sharpened grayscale image with values clipped between 0 and clapmax.

source
IceFloeTracker.unsharp_maskMethod
(Deprecated)
+unsharp_mask(image_gray, smoothing_param, intensity)

Apply unsharp masking on (equalized) grayscale image to enhance its sharpness.

Does not perform clamping after the smoothing step. Kept for legacy tests of IceFloeTracker.jl.

Arguments

  • image_gray: The input grayscale image, typically already equalized.
  • smoothing_param::Int: The pixel radius for Gaussian blurring (typically between 1 and 10).
  • intensity: The amount of sharpening to apply. Higher values result in more pronounced sharpening.

Returns

The sharpened grayscale image with values clipped between 0 and clapmax.

source
IceFloeTracker.update!Method
update!(match_total::MatchedPairs, matched_pairs::MatchedPairs)

Update match_total with the data from matched_pairs.

source
IceFloeTracker.watershed_ice_floesMethod
watershed_ice_floes(intermediate_segmentation_image;)

Performs image processing and watershed segmentation with intermediate files from segmentation_b.jl to further isolate ice floes, returning a binary segmentation mask indicating potential sparse boundaries of ice floes.

Arguments

-intermediate_segmentation_image: binary cloudmasked and landmasked intermediate file from segmentation B, either SegB.not_ice_bit or SegB.ice_intersect

source
IceFloeTracker.watershed_productMethod
watershed_product(watershed_B_ice_intersect, watershed_B_not_ice;)

Intersects the outputs of watershed segmentation on intermediate files from segmentation B, indicating potential sparse boundaries of ice floes.

Arguments

  • watershed_B_ice_intersect: binary segmentation mask from watershed_ice_floes
  • watershed_B_not_ice: binary segmentation mask from watershed_ice_floes
source
IceFloeTracker.@persistMacro
@persist img fname
 @persist(img,fname)
 @persist img
 @persist(img)
 @persist img fname ts
-@persist(img, fname, ts)

Given a reference to an image object img, the macro persists (saves to a file) img to the current working directory using fname as filename. Returns img.

Arguments

  • img: Symbol expression representing an image object loaded in memory.
  • fname: Optional filename for the persisted image.
  • ts: Optional boolean to attach timestamp to fname.
source
IceFloeTracker.MatchedPairsType

Container for matched pairs of floes. props1 and props2 are dataframes with the same column names as the input dataframes. ratios is a dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios. dist is a vector of (pixel) distances between paired floes.

source
IceFloeTracker.MatchedPairsMethod
MatchedPairs(df)

Return an object of type MatchedPairs with an empty dataframe with the same column names as df, an empty dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios, and an empty vector for distances.

source

Index

+@persist(img, fname, ts)

Given a reference to an image object img, the macro persists (saves to a file) img to the current working directory using fname as filename. Returns img.

Arguments

  • img: Symbol expression representing an image object loaded in memory.
  • fname: Optional filename for the persisted image.
  • ts: Optional boolean to attach timestamp to fname.
source
IceFloeTracker.MatchedPairsType

Container for matched pairs of floes. props1 and props2 are dataframes with the same column names as the input dataframes. ratios is a dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios. dist is a vector of (pixel) distances between paired floes.

source
IceFloeTracker.MatchedPairsMethod
MatchedPairs(df)

Return an object of type MatchedPairs with an empty dataframe with the same column names as df, an empty dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios, and an empty vector for distances.

source

Index

diff --git a/preprocessing/index.html b/preprocessing/index.html index 18c5b100..c864e157 100644 --- a/preprocessing/index.html +++ b/preprocessing/index.html @@ -2,4 +2,4 @@ Preprocessing · IceFloeTracker.jl

Preprocessing

IFT operates on optical satellite imagery. The main functions are designed with "true color" and "false color" imagery in mind, and have thus far primarily been tested on imagery from the Moderate Resolution Imaging Spectroradiometer (MODIS) from the NASA Aqua and Terra satellites. The preprocessing routines mask land and cloud features, and aim to adjust and sharpen the remainder of the images to amplify the contrast along the edges of sea ice floes. The functions use three different images: a land mask, a true color image, and a false color image. Examples are based on the NASA MODIS dataset.

Land masks

Landmask generation and dilation is handled by the function create_landmask. Landmask images from file are loaded as RGB matrices. This example uses an image from NASA EarthData landmask for Beaufort Sea.

using IceFloeTracker
 
 rgb_landmask = IceFloeTracker.load(<landmask_path>);
-landmask_imgs = IceFloeTracker.create_landmask(rgb_landmask);

The landmask_imgs object includes a binary version of the original landmask and a dilated version, which helps to cover the complicated near-coastal regions.

At the top, we have the original landmask TIFF, which has black and gray values. The middle image is the binary image, with land set to 0. At the bottom, we can see the dilated image using the default value of the structuring element. The default has radius 50, which results in a coastal mask of 12.5 km based on the 250 m pixel size of default MODIS imagery.

Cloud masks

Setting thresholds for cloud mask

Image regularization

+landmask_imgs = IceFloeTracker.create_landmask(rgb_landmask);

The landmask_imgs object includes a binary version of the original landmask and a dilated version, which helps to cover the complicated near-coastal regions.

At the top, we have the original landmask TIFF, which has black and gray values. The middle image is the binary image, with land set to 0. At the bottom, we can see the dilated image using the default value of the structuring element. The default has radius 50, which results in a coastal mask of 12.5 km based on the 250 m pixel size of default MODIS imagery.

Cloud masks

Setting thresholds for cloud mask

Image regularization

diff --git a/search/index.html b/search/index.html index 8b555020..cbd6d1a6 100644 --- a/search/index.html +++ b/search/index.html @@ -1,2 +1,2 @@ -Search · IceFloeTracker.jl

Loading search...

    +Search · IceFloeTracker.jl

    Loading search...

      diff --git a/search_index.js b/search_index.js index b7007323..ce749d17 100644 --- a/search_index.js +++ b/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"tracking/#Tracking","page":"Tracking","title":"Tracking","text":"","category":"section"},{"location":"tracking/","page":"Tracking","title":"Tracking","text":"Ice floe tracking links objects in images pairwise.","category":"page"},{"location":"segmentation/#Segmentation","page":"Segmentation","title":"Segmentation","text":"","category":"section"},{"location":"segmentation/","page":"Segmentation","title":"Segmentation","text":"The segmentation functions are intended for use on the preprocessed imagery.","category":"page"},{"location":"segmentation/#Ice/Water-Discrimination","page":"Segmentation","title":"Ice/Water Discrimination","text":"","category":"section"},{"location":"segmentation/#Feature-Identification","page":"Segmentation","title":"Feature Identification","text":"","category":"section"},{"location":"preprocessing/#Preprocessing","page":"Preprocessing","title":"Preprocessing","text":"","category":"section"},{"location":"preprocessing/","page":"Preprocessing","title":"Preprocessing","text":"IFT operates on optical satellite imagery. The main functions are designed with \"true color\" and \"false color\" imagery in mind, and have thus far primarily been tested on imagery from the Moderate Resolution Imaging Spectroradiometer (MODIS) from the NASA Aqua and Terra satellites. The preprocessing routines mask land and cloud features, and aim to adjust and sharpen the remainder of the images to amplify the contrast along the edges of sea ice floes. The functions use three different images: a land mask, a true color image, and a false color image. Examples are based on the NASA MODIS dataset.","category":"page"},{"location":"preprocessing/#Land-masks","page":"Preprocessing","title":"Land masks","text":"","category":"section"},{"location":"preprocessing/","page":"Preprocessing","title":"Preprocessing","text":"Landmask generation and dilation is handled by the function create_landmask. Landmask images from file are loaded as RGB matrices. This example uses an image from NASA EarthData landmask for Beaufort Sea.","category":"page"},{"location":"preprocessing/","page":"Preprocessing","title":"Preprocessing","text":"using IceFloeTracker\n\nrgb_landmask = IceFloeTracker.load();\nlandmask_imgs = IceFloeTracker.create_landmask(rgb_landmask);","category":"page"},{"location":"preprocessing/","page":"Preprocessing","title":"Preprocessing","text":"The landmask_imgs object includes a binary version of the original landmask and a dilated version, which helps to cover the complicated near-coastal regions.","category":"page"},{"location":"preprocessing/","page":"Preprocessing","title":"Preprocessing","text":"","category":"page"},{"location":"preprocessing/","page":"Preprocessing","title":"Preprocessing","text":"At the top, we have the original landmask TIFF, which has black and gray values. The middle image is the binary image, with land set to 0. At the bottom, we can see the dilated image using the default value of the structuring element. The default has radius 50, which results in a coastal mask of 12.5 km based on the 250 m pixel size of default MODIS imagery.","category":"page"},{"location":"preprocessing/#Cloud-masks","page":"Preprocessing","title":"Cloud masks","text":"","category":"section"},{"location":"preprocessing/","page":"Preprocessing","title":"Preprocessing","text":"Setting thresholds for cloud mask","category":"page"},{"location":"preprocessing/#Image-regularization","page":"Preprocessing","title":"Image regularization","text":"","category":"section"},{"location":"#IceFloeTracker.jl","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"","category":"section"},{"location":"#Overview","page":"IceFloeTracker.jl","title":"Overview","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"IceFloeTracker.jl is a collection of routines and tools for processing remote sensing imagery, identifying sea ice floes, and tracking the displacement and rotation of ice floes across multiple images. It can be used either standalone to create custom processing pathways or with the Ice Floe Tracker Pipeline.","category":"page"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"","category":"page"},{"location":"#Algorithm-components","page":"IceFloeTracker.jl","title":"Algorithm components","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"The Ice Floe Tracker (IFT) package includes the core functions for the three main steps of the algorithm. These functions can be used independently and can be customized for specific use cases. ","category":"page"},{"location":"#Preprocessing","page":"IceFloeTracker.jl","title":"Preprocessing","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"IFT operates on optical satellite imagery. The main functions are designed with \"true color\" and \"false color\" imagery in mind, and have thus far primarily been tested on imagery from the Moderate Resolution Imaging Spectroradiometer (MODIS) from the NASA Aqua and Terra satellites. The preprocessing routines mask land and cloud features, and aim to adjust and sharpen the remainder of the images to amplify the contrast along the edges of sea ice floes. (TBD: Link to main preprocessing page)","category":"page"},{"location":"#Segmentation","page":"IceFloeTracker.jl","title":"Segmentation","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"The IFT segmentation functions include functions for semantic segmentation (pixel-by-pixel assignment into predefined categories) and object-based segmentation (groupings of pixels into distinct objects). The semantic segmentation steps use k-means to group pixels into water and ice regions. A combination of watershed functions, morphological operations, and further applications of k-means are used to identify candidate ice floes. (TBD: Link to main segmentation page)","category":"page"},{"location":"#Tracking","page":"IceFloeTracker.jl","title":"Tracking","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"Ice floe tracking is carried out by comparing the shapes produced in the segmentation step. Shapes with similar area are rotated until the difference in surface area is minimized, and then the edge shapes are compared using a Ѱ-s curve. If thresholds for correlation and area differences are met, then the floe with the best correlation and smallest area differences are considered matches and the objects are assigned the same label. In the end, trajectories for individual floes are recorded in a dataframe.","category":"page"},{"location":"#Developers","page":"IceFloeTracker.jl","title":"Developers","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"IceFloeTracker.jl is a product of the Wilhelmus Lab at Brown University, led by Monica M. Wilhelmus. The original algorithm was developed by Rosalinda Lopez-Acosta during her PhD work at University of California Riverside, advised by Dr. Wilhelmus. The translation of the original Matlab code into the current modular, open source Julia package has been carried out in conjunction with the Center for Computing and Visualization at Brown University. Contributors include Daniel Watkins, Maria Isabel Restrepo, Carlos Paniagua, Tim DiVoll, John Holland, and Bradford Roarr.","category":"page"},{"location":"#Citing","page":"IceFloeTracker.jl","title":"Citing","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"If you use IceFloeTracker.jl in research, teaching, or elsewhere, please mention the IceFloeTracker package and cite our journal article outlining the algorithm:","category":"page"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"Lopez-Acosta et al., (2019). Ice Floe Tracker: An algorithm to automatically retrieve Lagrangian trajectories via feature matching from moderate-resolution visual imagery. Remote Sensing of Environment, 234(111406), doi:10.1016/j.rse.2019.111406.","category":"page"},{"location":"#Papers-using-Ice-Floe-Tracker","page":"IceFloeTracker.jl","title":"Papers using Ice Floe Tracker","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"Manucharyan, Lopez-Acosta, and Wilhelmus (2022)*. Spinning ice floes reveal intensification of mesoscale eddies in the western Arctic Ocean. Scientific Reports, 12(7070), doi:10.1038/s41598-022-10712-z\nWatkins, Bliss, Hutchings, and Wilhelmus (2023)*. Evidence of Abrupt Transitions Between Sea Ice Dynamical Regimes in the East Greenland Marginal Ice Zone. Geophysical Research Letters, 50(e2023GL103558), pp. 1-10, doi:10.1029/2023GL103558","category":"page"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"*Papers using data from the Matlab implementation of Ice Floe Tracker.","category":"page"},{"location":"#Functions","page":"IceFloeTracker.jl","title":"Functions","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"Modules = [IceFloeTracker]\nOrder = [:function, :macro, :type]","category":"page"},{"location":"#Base.isequal-Tuple{IceFloeTracker.MatchedPairs, IceFloeTracker.MatchedPairs}","page":"IceFloeTracker.jl","title":"Base.isequal","text":"isequal(matchedpairs1::MatchedPairs, matchedpairs2::MatchedPairs)\n\nReturn true if matchedpairs1 and matchedpairs2 are equal, false otherwise.\n\n\n\n\n\n","category":"method"},{"location":"#Base.sort!-Tuple{IceFloeTracker.Tracked}","page":"IceFloeTracker.jl","title":"Base.sort!","text":"sort!(tracked::Tracked)\n\nSort the floes in tracked by area in descending order.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker._adjust_histogram-NTuple{5, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker._adjust_histogram","text":"_adjust_histogram(masked_view, nbins, rblocks, cblocks, clip)\n\nPerform adaptive histogram equalization to a masked image. To be invoked within imsharpen.\n\nArguments\n\nmasked_view: input image in truecolor\n\nSee imsharpen for a description of the remaining arguments\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker._bin9todec-Tuple{AbstractArray}","page":"IceFloeTracker.jl","title":"IceFloeTracker._bin9todec","text":"_bin9todec(v)\n\nGet decimal representation of a bit vector v with the leading bit at its leftmost posistion.\n\nExample\n\njulia> _bin9todec([0 0 0 0 0 0 0 0 0])\n0\n\njulia> _bin9todec([1 1 1 1 1 1 1 1 1])\n511\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker._branch_filter","page":"IceFloeTracker.jl","title":"IceFloeTracker._branch_filter","text":"_branch_filter(\nimg::AbstractArray{Bool},\nfunc1::Function=branch_candidates_func,\nfunc2::Function=connected_background_count,)\n\nFilter img with _operator_lut using lut1 and lut2.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker._generate_se!-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker._generate_se!","text":"_generate_se!(se)\n\nGenerate a structuring element by leveraging symmetry (mirroring and inverting) a given initial structuring element.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker._operator_lut-Tuple{CartesianIndex{2}, AbstractArray{Bool}, CartesianIndices{2, Tuple{UnitRange{Int64}, UnitRange{Int64}}}, Vector{Int64}, Vector{Int64}}","page":"IceFloeTracker.jl","title":"IceFloeTracker._operator_lut","text":"_operator_lut(I, img, nhood, lut1, lut2)\n\nLook up the neighborhood nhood in lookup tables lut1 and lut2.\n\nHandles cases when the center of nhood is on the edge of img using data in I.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker._swap_last_values!-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker._swap_last_values!","text":"_swap_last_values!(df)\n\nSwap the last two values of the area_mismatch and corr columns for each group in df. For bookkeeping purposes for goodness of fit data during the tracking process.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.absdiffmeanratio-Union{Tuple{T}, Tuple{T, T}} where T<:Real","page":"IceFloeTracker.jl","title":"IceFloeTracker.absdiffmeanratio","text":"absdiffmeanratio(x, y)\n\nCalculate the absolute difference between x and y divided by the mean of x and y.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.add_padding-Tuple{Any, Union{ImageFiltering.Fill, ImageFiltering.Pad}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.add_padding","text":"add_padding(img, style)\n\nExtrapolate the image img according to the style specifications type. Returns the extrapolated image.\n\nArguments\n\nimg: Image to be padded.\nstyle: A supported type (such as Pad or Fill) representing the extrapolation style. See the relevant documentation for details.\n\nSee also remove_padding\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.add_passtimes!-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.add_passtimes!","text":"add_passtimes!(props, passtimes)\n\nAdd a column passtime to each DataFrame in props containing the time of the image in which the floes were captured.\n\nArguments\n\nprops: array of DataFrames containing floe properties.\npasstimes: array of DateTime objects containing the time of the image in which the floes were captured.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.addfloemasks!-Tuple{DataFrame, Union{BitMatrix, Matrix{<:Integer}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.addfloemasks!","text":"addfloearrays(props::DataFrame, floeimg::BitMatrix)\n\nAdd a column to props called floearray containing the cropped floe masks from floeimg.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.addlatlon!-Tuple{DataFrame, AbstractString}","page":"IceFloeTracker.jl","title":"IceFloeTracker.addlatlon!","text":"addlatlon(pairedfloesdf::DataFrame, refimage::AbstractString)\n\nAdd columns latitude, longitude, and pixel coordinates x, y to pairedfloesdf.\n\nArguments\n\npairedfloesdf: dataframe containing floe tracking data.\nrefimage: path to reference image.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.addmatch!-Tuple{IceFloeTracker.MatchedPairs, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.addmatch!","text":"addmatch!(matched_pairs, newmatch)\n\nAdd newmatch to matched_pairs.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.adduuid!-Tuple{Vector{DataFrame}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.adduuid!","text":"adduuid!(props)\n\nAssign a unique ID to each floe in each table of floe properties.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.appendrows!-Union{Tuple{T}, Tuple{IceFloeTracker.MatchingProps, T, Any, Int64, Float64}} where T<:DataFrames.DataFrameRow","page":"IceFloeTracker.jl","title":"IceFloeTracker.appendrows!","text":"appendrows!(df::MatchingProps, props::T, ratios, idx::Int64, dist::Float64) where {T<:DataFrameRow}\n\nAppend a row to df.props and df.ratios with the values of props and ratios respectively.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.apply_cloudmask-Tuple{Matrix{RGB{Float64}}, AbstractArray{Bool}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.apply_cloudmask","text":"apply_cloudmask(false_color_image, cloudmask)\n\nZero out pixels containing clouds where clouds and ice are not discernable. Arguments should be of the same size.\n\nArguments\n\nfalse_color_image: reference image, e.g. corrected reflectance false color image bands [7,2,1] or grayscale\ncloudmask: binary cloudmask with clouds = 0, else = 1\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.apply_landmask-Tuple{AbstractMatrix, BitMatrix}","page":"IceFloeTracker.jl","title":"IceFloeTracker.apply_landmask","text":"apply_landmask(input_image, landmask_binary)\n\nZero out pixels in all channels of the input image using the binary landmask.\n\nArguments\n\ninput_image: truecolor RGB image\nlandmask_binary: binary landmask with 1=land, 0=water/ice \n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.atan2-Tuple{Number, Number}","page":"IceFloeTracker.jl","title":"IceFloeTracker.atan2","text":"atan2(y,x)\n\nWrapper of Base.atan that returns the angle of vector (x,y) in the range [0, 2π).\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.binarize_landmask-Tuple{T} where T<:(AbstractMatrix)","page":"IceFloeTracker.jl","title":"IceFloeTracker.binarize_landmask","text":"binarize_landmask(landmask_image)\n\nConvert a 3-channel RGB land mask image to a 1-channel binary matrix; land = 0, ocean = 1.\n\nArguments\n\nlandmask_image: RGB land mask image from fetchdata\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.branch-Tuple{T} where T<:(AbstractArray{Bool})","page":"IceFloeTracker.jl","title":"IceFloeTracker.branch","text":"branch(img::AbstractArray{Bool})\n\nFind branch points in skeletonized image img according to Definition 3 of [1].\n\n[1] Arcelli, Carlo, and Gabriella Sanniti di Baja. \"Skeletons of planar patterns.\" Machine Intelligence and Pattern Recognition. Vol. 19. North-Holland, 1996. 99-143.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.branch_candidates_func-Tuple{AbstractArray}","page":"IceFloeTracker.jl","title":"IceFloeTracker.branch_candidates_func","text":"branch_candidates_func(nhood)\n\nFilter nhood as candidate for branch point.\n\nTo be passed to the make_lut function.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.bridge-Tuple{T} where T<:(AbstractArray{Bool})","page":"IceFloeTracker.jl","title":"IceFloeTracker.bridge","text":"bridge(bw)\n\nSet 0-valued pixels to 1 if they have two nonzero neighbors that are not connected. Note the following exceptions:\n\n0 0 0 0 0 0 1 0 1 becomes 1 1 1 0 0 0 0 0 0\n\n1 0 1 1 1 1 0 0 0 becomes 0 0 0 0 0 0 0 0 0\n\nThe same applies to all their corresponding rotations.\n\nExamples\n\njulia> bw = [0 0 0; 0 0 0; 1 0 1]\n3×3 Matrix{Int64}:\n 0 0 0\n 0 0 0\n 1 0 1\n\njulia> bridge(bw)\n3×3 BitMatrix:\n 0 0 0\n 0 0 0\n 1 1 1\n\njulia> bw = [1 0 0; 1 0 1; 0 0 1]\n3×3 Matrix{Int64}:\n 1 0 0\n 1 0 1\n 0 0 1\n\njulia> bridge(bw)\n3×3 BitMatrix:\n 1 1 0\n 1 1 1\n 0 1 1\n\n julia> bw = [1 0 1; 0 0 0; 1 0 1]\n3×3 Matrix{Int64}:\n 1 0 1\n 0 0 0\n 1 0 1\n\njulia> bridge(bw)\n3×3 BitMatrix:\n 1 1 1\n 1 1 1\n 1 1 1\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.bump_tile-Union{Tuple{S}, Tuple{Tuple{UnitRange{S}, UnitRange{S}}, Tuple{S, S}}} where S<:Int64","page":"IceFloeTracker.jl","title":"IceFloeTracker.bump_tile","text":"bump_tile(tile::Tuple{UnitRange{Int64}, UnitRange{Int64}}, dims::Tuple{Int,Int})::Tuple{UnitRange{Int}, UnitRange{Int}}\n\nAdjust the tile dimensions by adding extra rows and columns.\n\nArguments\n\ntile::Tuple{Int,Int,Int,Int}: A tuple representing the tile dimensions (a, b, c, d).\ndims::Tuple{Int,Int}: A tuple representing the extra rows and columns to add (extrarows, extracols).\n\nReturns\n\nTuple{UnitRange{Int}, UnitRange{Int}}: A tuple of ranges representing the new tile dimensions.\n\nExamples\n\n```julia julia> bump_tile((1:3, 1:4), (1, 1)) (1:4, 1:5)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.bwareamaxfilt","page":"IceFloeTracker.jl","title":"IceFloeTracker.bwareamaxfilt","text":"bwareamaxfilt(bwimg::AbstractArray{Bool}, conn)\n\nFilter the smaller (by area) connected components in bwimg keeping the (assumed unique) largest.\n\nUses 8-pixel connectivity by default (conn=8). Use conn=4 for 4-pixel connectivity.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.bwareamaxfilt!","page":"IceFloeTracker.jl","title":"IceFloeTracker.bwareamaxfilt!","text":"bwareamaxfilt!(bwimg::AbstractArray)\n\nIn-place version of bwareamaxfilt.\n\nSee also bwareamaxfilt \n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.bwdist-Tuple{AbstractArray{Bool}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.bwdist","text":"bwdist(bwimg)\n\nDistance transform for binary image bwdist.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.bwperim-Tuple{T} where T<:AbstractMatrix{Bool}","page":"IceFloeTracker.jl","title":"IceFloeTracker.bwperim","text":"bwperim(bwimg)\n\nLocate the pixels at the boundary of objects in an binary image bwimg using 8-pixel connectivity.\n\nArguments\n\nbwimg: Binary (black/white – 1/0) image\n\nExamples\n\njulia> A = zeros(Bool, 13, 16); A[2:6, 2:6] .= 1; A[4:8, 7:10] .= 1; A[10:12,13:15] .= 1; A[10:12,3:6] .= 1;\n\njulia> A\n13×16 Matrix{Bool}:\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0\n 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0\n 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0\n 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0\n 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n\n julia> bwperim(A)\n13×16 Matrix{Bool}:\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0\n 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0\n 0 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0\n 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0\n 0 1 1 1 1 1 0 0 0 1 0 0 0 0 0 0\n 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0\n 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.bwtraceboundary-Union{Tuple{Union{Matrix{Float64}, Matrix{Int64}, Matrix{UInt8}, T}}, Tuple{T}} where T<:AbstractMatrix{Bool}","page":"IceFloeTracker.jl","title":"IceFloeTracker.bwtraceboundary","text":"bwtraceboundary(image::Union{Matrix{Int64},Matrix{Float64},T};\n P0::Union{Tuple{Int,Int},CartesianIndex{2},Nothing}=nothing,\n closed::Bool=true) where T<:AbstractMatrix{Bool}\n\nTrace the boundary of objects in image \n\nBackground pixels are represented as zero. The algorithm traces the boundary counterclockwise and an initial point P0 can be specified. If more than one boundary is detected and an initial point is provided, the boundary that contains this point is returned as a vector of CartesianIndex types. Otherwise an array of vectors is returned with all the detected boundaries in image. \n\nArguments\n\nimage: image, preferably binary with one single object, whose objects' boundaries are to be traced.\nP0: initial point of a target boundary.\nclosed: if true (default) makes the inital point of a boundary equal to the last point.\n\nExample\n\njulia> A = zeros(Int, 13, 16); A[2:6, 2:6] .= 1; A[4:8, 7:10] .= 1; A[10:12,13:15] .= 1; A[10:12,3:6] .= 1;\n\njulia> A\n13×16 Matrix{Int64}:\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0\n 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0\n 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0\n 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0\n 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n\njulia> boundary = IceFloeTracker.bwtraceboundary(A);\n\njulia> boundary[3]\n9-element Vector{CartesianIndex}:\n CartesianIndex(10, 13)\n CartesianIndex(11, 13)\n CartesianIndex(12, 13)\n CartesianIndex(12, 14)\n CartesianIndex(12, 15)\n CartesianIndex(11, 15)\n CartesianIndex(10, 15)\n CartesianIndex(10, 14)\n CartesianIndex(10, 13)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.callmatchcorr-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.callmatchcorr","text":"callmatchcorr(conditions)\n\nCondition to decide whether match_corr should be called.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.check_fname","page":"IceFloeTracker.jl","title":"IceFloeTracker.check_fname","text":"check_fname(fname)\n\nChecks fname does not exist in current directory; throws an assertion if this condition is false.\n\nArguments\n\nfname: String object or Symbol to a reference to a String representing a path.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.clockwise-Tuple{Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.clockwise","text":"Make a clockwise turn from the dir direction\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.compute_ratios-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.compute_ratios","text":"compute_ratios((props_day1, r), (props_day2,s))\n\nCompute the ratios of the floe properties between the rth floe in props_day1 and the sth floe in props_day2. Return a tuple of the ratios.\n\nArguments\n\nprops_day1: floe properties for day 1\nr: index of floe in props_day1\nprops_day2: floe properties for day 2\ns: index of floe in props_day2\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.compute_ratios_conditions-NTuple{4, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.compute_ratios_conditions","text":"compute_ratios_conditions((props_day1, r), (props_day2, s), delta_time, t)\n\nCompute the conditions for a match between the rth floe in props_day1 and the sth floe in props_day2. Return a tuple of the conditions.\n\nArguments\n\nprops_day1: floe properties for day 1\nr: index of floe in props_day1\nprops_day2: floe properties for day 2\ns: index of floe in props_day2\ndelta_time: time elapsed from image day 1 to image day 2\nt: tuple of thresholds for elapsed time and distance. See pair_floes for details.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.conditional_histeq","page":"IceFloeTracker.jl","title":"IceFloeTracker.conditional_histeq","text":"conditional_histeq(\ntrue_color_image,\nclouds_red,\nside_length::Int,\nentropy_threshold::AbstractFloat=4.0,\nwhite_threshold::AbstractFloat=25.5,\nwhite_fraction_threshold::AbstractFloat=0.4,\n\n)\n\nPerforms conditional histogram equalization on a true color image using tiles of approximately sidelength size side_length. If a perfect tiling is not possible, the tiling on the egde of the image is adjusted to ensure that the tiles are as close to side_length as possible. See get_tiles(array, side_length) for more details.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.conditional_histeq-2","page":"IceFloeTracker.jl","title":"IceFloeTracker.conditional_histeq","text":"conditional_histeq(\ntrue_color_image,\nclouds_red,\nrblocks::Int,\ncblocks::Int,\nentropy_threshold::AbstractFloat=4.0,\nwhite_threshold::AbstractFloat=25.5,\nwhite_fraction_threshold::AbstractFloat=0.4,\n\n)\n\nPerforms conditional histogram equalization on a true color image.\n\nArguments\n\ntrue_color_image: The true color image to be equalized.\nclouds_red: The land/cloud masked red channel of the false color image.\nrblocks: The number of row-blocks to divide the image into for histogram equalization. Default is 8.\ncblocks: The number of column-blocks to divide the image into for histogram equalization. Default is 6.\nentropy_threshold: The entropy threshold used to determine if a block should be equalized. Default is 4.0.\nwhite_threshold: The white threshold used to determine if a pixel should be considered white. Default is 25.5.\nwhite_fraction_threshold: The white fraction threshold used to determine if a block should be equalized. Default is 0.4.\n\nReturns\n\nThe equalized true color image.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.connected_background_count-Tuple{AbstractArray}","page":"IceFloeTracker.jl","title":"IceFloeTracker.connected_background_count","text":"connected_background_count(nhood)\n\nSecond lut generator for neighbor transform with diamond strel (4-neighborhood).\n\nTo be passed to the make_lut function.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.consolidate_matched_pairs-Tuple{IceFloeTracker.MatchedPairs}","page":"IceFloeTracker.jl","title":"IceFloeTracker.consolidate_matched_pairs","text":"consolidate_matched_pairs(matched_pairs::MatchedPairs)\n\nConsolidate the floe properties and similarity ratios of the matched pairs in matched_pairs into a single dataframe. Return the consolidated dataframe. Used in iteration 0.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.convertcentroid!-Tuple{Any, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.convertcentroid!","text":"convertcentroid!(propdf, latlondata, colstodrop)\n\nConvert the centroid coordinates from row and column to latitude and longitude dropping unwanted columns specified in colstodrop for the output data structure. Addionally, add columns x and y with the pixel coordinates of the centroid.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.converttounits!-Tuple{Any, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.converttounits!","text":"converttounits!(propdf, latlondata, colstodrop)\n\nConvert the floe properties from pixels to kilometers and square kilometers where appropiate. Also drop the columns specified in colstodrop.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.corr-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.corr","text":"corr(f1,f2)\n\nReturn the correlation between the psi-s curves p1 and p2.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.corr-Union{Tuple{T}, Tuple{T, T}} where T<:AbstractArray","page":"IceFloeTracker.jl","title":"IceFloeTracker.corr","text":"corr(f1,f2)\n\nReturn the normalized cross-correlation between the psi-s curves p1 and p2.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.counterclockwise-Tuple{Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.counterclockwise","text":"Make a counterclockwise turn from the dir direction\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.create_cloudmask-Tuple{Matrix{RGB{Float64}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.create_cloudmask","text":"create_cloudmask(false_color_image; prelim_threshold, band_7_threshold, band_2_threshold, ratio_lower, ratio_upper)\n\nConvert a 3-channel false color reflectance image to a 1-channel binary matrix; clouds = 0, else = 1. Default thresholds are defined in the published Ice Floe Tracker article: Remote Sensing of the Environment 234 (2019) 111406.\n\nArguments\n\nfalse_color_image: corrected reflectance false color image - bands [7,2,1]\nprelim_threshold: threshold value used to identify clouds in band 7, N0f8(RGB intensity/255)\nband_7_threshold: threshold value used to identify cloud-ice in band 7, N0f8(RGB intensity/255)\nband_2_threshold: threshold value used to identify cloud-ice in band 2, N0f8(RGB intensity/255)\nratio_lower: threshold value used to set lower ratio of cloud-ice in bands 7 and 2\nratio_upper: threshold value used to set upper ratio of cloud-ice in bands 7 and 2\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.create_landmask-Union{Tuple{T}, Tuple{T, AbstractMatrix{Bool}}} where T<:(AbstractMatrix)","page":"IceFloeTracker.jl","title":"IceFloeTracker.create_landmask","text":"create_landmask(landmask_image, struct_elem, fill_value_lower, fill_value_upper)\n\nConvert a 3-channel RGB land mask image to a 1-channel binary matrix, and use a structuring element to extend a buffer to mask complex coastal features. In the resulting mask, land = 0 and ocean = 1. Returns a named tuple with the dilated and non-dilated landmask.\n\nArguments\n\nlandmask_image: RGB land mask image from fetchdata\nstruct_elem: structuring element for dilation (optional)\nfill_value_lower: fill holes having at least these many pixels (optional)\nfill_value_upper: fill holes having at most these many pixels (optional)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.cropfloe-Tuple{Union{BitMatrix, Matrix{<:Integer}}, DataFrame, Integer}","page":"IceFloeTracker.jl","title":"IceFloeTracker.cropfloe","text":"cropfloe(floesimg, props, i)\n\nCrops the floe delimited by the bounding box data in props at index i from the floe image floesimg.\n\nIf the dataframe has bounding box data min_row, min_col, max_row, max_col, but no label, then returns the largest contiguous component.\n\nIf the dataframe has bounding box data min_row, min_col, max_row, max_col, and a label, then returns the component with the label. In this case, floesimg must be an Array{Int}.\n\nIf the dataframe has only a label and no bounding box data, then returns the component with the label, padded by one cell of zeroes on all sides. In this case, floesimg must be an Array{Int}.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.cropfloe-Union{Tuple{I}, Tuple{BitMatrix, I, I, I, I}} where I<:Integer","page":"IceFloeTracker.jl","title":"IceFloeTracker.cropfloe","text":"cropfloe(floesimg, min_row, min_col, max_row, max_col)\n\nCrops the floe delimited by min_row, min_col, max_row, max_col, from the floe image floesimg.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.cropfloe-Union{Tuple{J}, Tuple{I}, Tuple{Matrix{I}, J, J, J, J, I}} where {I<:Integer, J<:Integer}","page":"IceFloeTracker.jl","title":"IceFloeTracker.cropfloe","text":"cropfloe(floesimg, min_row, min_col, max_row, max_col, label)\n\nCrops the floe from floesimg with the label label, returning the region bounded by min_row, min_col, max_row, max_col, and converting to a BitMatrix.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.crosscorr-Union{Tuple{T}, Tuple{Vector{T}, Vector{T}}} where T<:Real","page":"IceFloeTracker.jl","title":"IceFloeTracker.crosscorr","text":"r, lags = crosscorr(u::Vector{T},\n v::Vector{T};\n normalize::Bool=false,\n padmode::Symbol=:longest)\n\nWrapper of DSP.xcorr with normalization (see https://docs.juliadsp.org/stable/convolutions/#DSP.xcorr)\n\nReturns the pair (r, lags) with the cross correlation scores r and corresponding lags according to padmode.\n\nArguments\n\nu,v: real vectors which could have unequal length.\nnormalize: return normalized correlation scores (false by default).\npadmode: either :longest (default) or :none to control padding of shorter vector with zeros.\n\nExamples\n\nThe example below builds two vectors, one a shifted version of the other, and computes various cross correlation scores.\n\njulia> n = 1:5;\n\njulia> x = 0.48.^n;\n\njulia> y = circshift(x,3);\n\njulia> r, lags = crosscorr(x,y,normalize=true);\n\njulia> [r lags]\n9×2 Matrix{Float64}:\n0.369648 -4.0\n0.947531 -3.0\n0.495695 -2.0\n0.3231 -1.0\n0.332519 0.0\n0.15019 1.0\n0.052469 2.0\n0.0241435 3.0\n0.00941878 4.0\n\njulia> r, lags = crosscorr(x,y,normalize=true,padmode=:none);\n\njulia> [r lags]\n9×2 Matrix{Float64}:\n0.369648 1.0\n0.947531 2.0\n0.495695 3.0\n0.3231 4.0\n0.332519 5.0\n0.15019 6.0\n0.052469 7.0\n0.0241435 8.0\n0.00941878 9.0\n\nThis final example builds two vectors of different length and computes some cross correlation scores.\n\njulia> n = 1:5; m = 1:3;\n\njulia> x = 0.48.^n; y = 0.48.^m;\n\njulia> r, lags = crosscorr(x,y,normalize=true);\n\njulia> [r lags]\n9×2 Matrix{Float64}:\n0.0 -4.0\n4.14728e-17 -3.0\n0.178468 -2.0\n0.457473 -1.0\n0.994189 0.0\n0.477211 1.0\n0.229061 2.0\n0.105402 3.0\n0.0411191 4.0\n\njulia> r, lags = crosscorr(x,y,normalize=true,padmode=:none);\n\njulia> [r lags]\n7×2 Matrix{Float64}:\n0.178468 1.0\n0.457473 2.0\n0.994189 3.0\n0.477211 4.0\n0.229061 5.0\n0.105402 6.0\n0.0411191 7.0\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.deleteallbut!-Tuple{Any, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.deleteallbut!","text":"deleteallbut!(matched_pairs, idxs, keeper)\n\nDelete all rows in matched_pairs except for the row with index keeper in idxs.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.detect_move!-Tuple{Matrix{Float64}, CartesianIndex{2}, CartesianIndex{2}, Int64, Vector{CartesianIndex}, BitVector, Vector{CartesianIndex{2}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.detect_move!","text":"Workhorse function: Get all pixel coords for detected border.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.discriminate_ice_water-Union{Tuple{T}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real, Real}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real, Real, Real}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real, Real, Real, Float64}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real, Real, Real, Float64, Float64}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real, Real, Real, Float64, Float64, Float64}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real, Real, Real, Float64, Float64, Float64, Float64}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real, Real, Real, Float64, Float64, Float64, Float64, Real}} where T<:(AbstractArray{Bool})","page":"IceFloeTracker.jl","title":"IceFloeTracker.discriminate_ice_water","text":"discriminate_ice_water(\nfalsecolor_image::Matrix{RGB{Float64}},\nnormalized_image::Matrix{Gray{Float64}},\nlandmask_bitmatrix::T,\ncloudmask_bitmatrix::T,\nfloes_threshold::Float64=Float64(100 / 255),\nmask_clouds_lower::Float64=Float64(17 / 255),\nmask_clouds_upper::Float64=Float64(30 / 255),\nkurt_thresh_lower::Real=2,\nkurt_thresh_upper::Real=8,\nskew_thresh::Real=4,\nst_dev_thresh_lower::Float64=Float64(84 / 255),\nst_dev_thresh_upper::Float64=Float64(98.9 / 255),\nclouds_ratio_threshold::Float64=0.02,\ndiffer_threshold::Float64=0.6,\nnbins::Real=155\n\n)\n\nGenerates an image with ice floes apparent after filtering and combining previously processed versions of falsecolor and truecolor images from the same region of interest. Returns an image ready for segmentation to isolate floes.\n\nNote: This function mutates the landmask object to avoid unnecessary memory allocation. If you need the original landmask, make a copy before passing it to this function. Example: discriminate_ice_water(falsecolor_image, normalized_image, copy(landmask_bitmatrix), cloudmask_bitmatrix)\n\nArguments\n\nfalsecolor_image: input image in false color reflectance\nnormalized_image: normalized version of true color image\nlandmask_bitmatrix: landmask for region of interest\ncloudmask_bitmatrix: cloudmask for region of interest\nfloes_threshold: heuristic applied to original false color image\nmask_clouds_lower: lower heuristic applied to mask out clouds\nmask_clouds_upper: upper heuristic applied to mask out clouds\nkurt_thresh_lower: lower heuristic used to set pixel value threshold based on kurtosis in histogram\nkurt_thresh_upper: upper heuristic used to set pixel value threshold based on kurtosis in histogram\nskew_thresh: heuristic used to set pixel value threshold based on skewness in histogram\nst_dev_thresh_lower: lower heuristic used to set pixel value threshold based on standard deviation in histogram\nst_dev_thresh_upper: upper heuristic used to set pixel value threshold based on standard deviation in histogram\nclouds2_threshold: heuristic used to set pixel value threshold based on ratio of clouds\ndiffer_threshold: heuristic used to calculate proportional intensity in histogram\nnbins: number of bins during histogram build\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.dist-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.dist","text":"dist(p1, p2)\n\nReturn the distance between the points p1 and p2.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.filt_except_label!-Tuple{Matrix{Int64}, Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.filt_except_label!","text":"filt_except_label!(labeled_arr::Array{Int64, 2}, label::Int64)\n\nIn-place version of filt_except_label.\n\nSee also filt_except_label \n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.filt_except_label-Tuple{Matrix{Int64}, Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.filt_except_label","text":"filt_except_label(labeled_arr::Array{Int64, 2}, label::Int64)\n\nMake 0 all values in labeled_arr that are not equal to label.\n\nSee also filt_except_label! \n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.find_floe_matches-Union{Tuple{T}, Tuple{T, T, Any, Any}} where T<:DataFrames.AbstractDataFrame","page":"IceFloeTracker.jl","title":"IceFloeTracker.find_floe_matches","text":"find_floe_matches(\ntracked,\ncandidate_props,\ncondition_thresholds,\nmc_thresholds\n\n)\n\nFind matches for floes in tracked from floes in candidate_props.\n\nArguments\n\ntracked: dataframe containing floe trajectories.\ncandidate_props: dataframe containing floe candidate properties.\ncondition_thresholds: thresholds for deciding whether to match floe i from tracked to floe j from candidate_props\nmc_thresholds: thresholds for area mismatch and psi-s shape correlation\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.find_ice_labels-Tuple{Matrix{RGB{Float64}}, BitMatrix}","page":"IceFloeTracker.jl","title":"IceFloeTracker.find_ice_labels","text":"find_ice_labels(falsecolor_image, landmask; band_7_threshold, band_2_threshold, band_1_threshold, band_7_relaxed_threshold, band_1_relaxed_threshold, possible_ice_threshold)\n\nLocate the pixels of likely ice from false color reflectance image. Returns a binary mask with ice floes contrasted from background. Default thresholds are defined in the published Ice Floe Tracker article: Remote Sensing of the Environment 234 (2019) 111406.\n\nArguments\n\nfalsecolor_image: corrected reflectance false color image - bands [7,2,1]\nlandmask: bitmatrix landmask for region of interest\nband_7_threshold: threshold value used to identify ice in band 7, N0f8(RGB intensity/255)\nband_2_threshold: threshold value used to identify ice in band 2, N0f8(RGB intensity/255)\nband_1_threshold: threshold value used to identify ice in band 2, N0f8(RGB intensity/255)\nband_7_relaxed_threshold: threshold value used to identify ice in band 7 if not found on first pass, N0f8(RGB intensity/255)\nband_1_relaxed_threshold: threshold value used to identify ice in band 1 if not found on first pass, N0f8(RGB intensity/255)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.find_reflectance_peaks-Tuple{Union{SubArray{Float64, 2, Base.ReinterpretArray{Float64, 3, RGB{Float64}, Matrix{RGB{Float64}}, true}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}}, false}, Matrix{Float64}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.find_reflectance_peaks","text":"find_reflectance_peaks(reflectance_channel, possible_ice_threshold;)\n\nFind histogram peaks in single channels of a reflectance image and return the second greatest peak. If needed, edges can be returned as the first object from build_histogram. Similarly, peak values can be returned as the second object from findmaxima.\n\nArguments\n\nreflectance_channel: either band 2 or band 1 of false-color reflectance image\npossible_ice_threshold: threshold value used to identify ice if not found on first or second pass\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.fixzeroindexing!-Union{Tuple{T}, Tuple{DataFrame, Vector{T}}} where T<:Union{String, Symbol}","page":"IceFloeTracker.jl","title":"IceFloeTracker.fixzeroindexing!","text":"fixzeroindexing!(props::DataFrame, props_to_fix::Vector{T}) where T<:Union{Symbol,String}\n\nFix the zero-indexing of the props_to_fix columns in props by adding 1 to each element.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.fname_ext_splice-Tuple{String, String}","page":"IceFloeTracker.jl","title":"IceFloeTracker.fname_ext_splice","text":"fname_ext_splice(fname, ext)\n\nJoin \"fname\" and \"ext\" with '.'.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.fname_ext_split-Tuple{String}","page":"IceFloeTracker.jl","title":"IceFloeTracker.fname_ext_split","text":"fname_ext_split(fname)\n\nSplit \"fname.ext\" into \"fname\" and \"ext\".\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.from_to-Tuple{CartesianIndex, CartesianIndex, Vector{CartesianIndex{2}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.from_to","text":"Get index in Moore neigborhood representing the direction from the from pixel coords to the to pixel coords (see definition of dir_delta below).\n\nClockwise Moore neighborhood.\n\ndir_delta = [CartesianIndex(-1, 0), CartesianIndex(-1, 1), CartesianIndex(0, 1), CartesianIndex(1, 1), CartesianIndex(1, 0), CartesianIndex(1, -1), CartesianIndex(0, -1), CartesianIndex(-1,-1)]\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_area_missed-Tuple{Int64, Tuple{Int64, Int64}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_area_missed","text":"get_area_missed(side_length::Int, dims::Tuple{Int,Int})::Float64\n\nCalculate the proportion of the area that is not covered by tiles of a given side length.\n\nArguments\n\nside_length::Int: The side length of the tile.\ndims::Tuple{Int,Int}: A tuple representing the dimensions (width, height).\n\nReturns\n\nFloat64: The proportion of the area that is not covered by the tiles.\n\nExamples\n\n``` julia> getareamissed(5, (10, 20)) 0.0\n\njulia> getareamissed(7, (10, 20)) 0.51\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_areas-Union{Tuple{Matrix{T}}, Tuple{T}} where T","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_areas","text":"get_areas(labeled_arr::Array{T, 2})::Dict{T, Int} where T\n\nGet the \"areas\" (count of pixels of a given label) of the connected components in labeled_arr.\n\nReturn a dictionary with the frequency distribution: label => countoflabel.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_brighten_mask-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_brighten_mask","text":"get_brighten_mask(equalized_gray_reconstructed_img, gamma_green)\n\nArguments\n\nequalized_gray_reconstructed_img: The equalized gray reconstructed image (uint8 in Matlab).\ngamma_green: The gamma value for the green channel (also uint8).\n\nReturns\n\nDifference equalizedgrayreconstructedimg - gammagreen clamped between 0 and 255.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_dt-NTuple{4, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_dt","text":"get_dt(props1, r, props2, s)\n\nReturn the time difference between the rth floe in props1 and the sth floe in props2 in minutes.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_final","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_final","text":"get_final(img, label, segment_mask, se_erosion, se_dilation)\n\nFinal processing following the tiling workflow.\n\nArguments\n\nimg: The input image.\nlabel: Mode of most common label in the findicelabels workflow.\nsegment_mask: The segment mask.\nse_erosion: structuring element for erosion.\nse_dilation: structuring element for dilation.\napply_segment_mask=true: Whether to filter img the segment mask.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.get_ice_masks-Union{Tuple{S}, Tuple{T}, Tuple{Matrix{RGB{FixedPointNumbers.N0f8}}, Matrix{<:Integer}, BitMatrix, S}, Tuple{Matrix{RGB{FixedPointNumbers.N0f8}}, Matrix{<:Integer}, BitMatrix, S, Bool}} where {T<:Integer, S<:AbstractMatrix{Tuple{UnitRange{Int64}, UnitRange{Int64}}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_ice_masks","text":"get_ice_masks(\n falsecolor_image,\n morph_residue,\n landmask,\n tiles,\n binarize;\n band_7_threshold,\n band_2_threshold,\n band_1_threshold,\n band_7_threshold_relaxed,\n band_1_threshold_relaxed,\n possible_ice_threshold,\n k,\n factor\n)\n\nGet the ice masks from the falsecolor image and morphological residue given a particular tiling configuration.\n\nArguments\n\nfalsecolor_image: The falsecolor image.\nmorph_residue: The morphological residue image.\nlandmask: The landmask.\ntiles: The tiles.\nbinarize::Bool=true: Whether to binarize the tiling.\nband_7_threshold=5: The threshold for band 7.\nband_2_threshold=230: The threshold for band 2.\nband_1_threshold=240: The threshold for band 1.\nband_7_threshold_relaxed=10: The relaxed threshold for band 7.\nband_1_threshold_relaxed=190: The relaxed threshold for band 1.\npossible_ice_threshold=75: The threshold for possible ice.\nk=3: The number of clusters to use for k-means segmentation.\nfactor=255: normalization factor to convert images to uint8.\n\nReturns\n\nA named tuple (icemask, bin) where:\nicemask: The ice mask.\nbin: The binarized tiling.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_matches-Tuple{IceFloeTracker.MatchedPairs}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_matches","text":"get_matches(matched_pairs)\n\nReturn a dataframe with the properties and goodness ratios of the matched pairs (right-hand matches) in matched_pairs. Used in iterations 1:end.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_max_label-Tuple{Dict{Int64, Int64}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_max_label","text":"get_max_label(d::Dict{Int, Int})\n\nGet the label k in dictionary d for which d[k] is maximal.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_optimal_tile_size-Tuple{Int64, Tuple{Int64, Int64}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_optimal_tile_size","text":"get_optimal_tile_size(l0::Int, dims::Tuple{Int,Int}) -> Int\n\nCalculate the optimal tile size in the range [l0-1, l0+1] for the given size l0 and image dimensions dims.\n\nDescription\n\nThis function computes the optimal tile size for tiling an area with given dimensions. It ensures that the initial tile size l0 is at least 2 and not larger than any of the given dimensions. The function evaluates candidate tile sizes and selects the one that minimizes the area missed by its corresponding tiling. In case of a tie, it prefers the larger tile size.\n\nExample\n\njulia> get_optimal_tile_size(3, (10, 7))\n2\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_rgb_channels-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_rgb_channels","text":"get_rgb_channels(img)\n\nGet the RBC (Red, Blue, and Green) channels of an image.\n\nArguments\n\nimg: The input image.\n\nReturns\n\nAn m x n x 3 array the Red, Blue, and Green channels of the input image.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_tile_dims-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_tile_dims","text":"get_tile_dims(tile)\n\nCalculate the dimensions of a tile.\n\nArguments\n\ntile::Tuple{UnitRange{Int},UnitRange{Int}}: A tuple representing the tile dimensions.\n\nReturns\n\nTuple{Int,Int}: A tuple representing the width and height of the tile.\n\nExamples\n\n```julia julia> gettiledims((1:3, 1:4)) (4, 3)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_tile_meta-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_tile_meta","text":"get_tile_meta(tile)\n\nExtracts metadata from a given tile.\n\nArguments\n\ntile: A collection of tuples, where each tuple represents a coordinate pair.\n\nReturns\n\nA tuple (a, b, c, d) where:\na: The first element of the first tuple in tile.\nb: The last element of the first tuple in tile.\nc: The first element of the last tuple in tile.\nd: The last element of the last tuple in tile.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_tiles-Tuple{Any, Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_tiles","text":"get_tiles(array, side_length)\n\nGenerate a collection of tiles from an array.\n\nUnlike TileIterator, the function adjusts the bottom and right edges of the tile matrix if they are smaller than half the tile size side_length.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_tiles-Union{Tuple{T}, Tuple{Any, Tuple{T, T}}} where T<:Int64","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_tiles","text":"get_tiles(array, t::Tuple{Int,Int})\n\nGenerate a collection of tiles from an array.\n\nThe function adjusts the bottom and right edges of the tile matrix if they are smaller than half the tile sizes in t.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_trajectory_heads-Tuple{T} where T<:DataFrames.AbstractDataFrame","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_trajectory_heads","text":"get_trajectory_heads(pairs)\n\nReturn the last row (most recent member) of each group (trajectory) in pairs as a dataframe.\n\nThis is used for getting the initial floe properties for the next day in search for new pairs.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_unmatched-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_unmatched","text":"get_unmatched(props, matched)\n\nReturn the floes in props that are not in matched.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getbboxcolumns-Tuple{DataFrame}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getbboxcolumns","text":"getbboxcolumns(props::DataFrame)\n\nReturn the column names of the bounding box columns in props.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getbestmatchdata-NTuple{4, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getbestmatchdata","text":"getbestmatchdata(idx, r, props_day1, matching_floes)\n\nCollect the data for the best match between the rth floe in props_day1 and the idxth floe in matching_floes. Return a tuple of the floe properties for day 1 and day 2 and the ratios.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getcentroid-Tuple{DataFrame, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getcentroid","text":"getcentroid(props_day::DataFrame, r)\n\nGet the coordinates of the rth floe in props_day.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getcentroidcolumns-Tuple{DataFrame}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getcentroidcolumns","text":"getcentroidcolumns(props::DataFrame)\n\nReturns the column names of the centroid columns in props.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getcollisions-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getcollisions","text":"getcollisions(matchedpairs)\n\nGet nonunique rows in matchedpairs.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getcollisionslocs-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getcollisionslocs","text":"getcollisionslocs(df)\n\nReturn a vector of tuples of the row and the index of the row in df that has a collision with another row in df.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getfit-Tuple{Tuple{Int64, Int64}, Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getfit","text":"getfit(dims::Tuple{Int,Int}, side_length::Int)::Tuple{Int,Int}\n\nCalculate how many tiles of a given side length fit into the given dimensions.\n\nArguments\n\ndims::Tuple{Int,Int}: A tuple representing the dimensions (width, height).\nside_length::Int: The side length of the tile.\n\nReturns\n\nTuple{Int,Int}: A tuple representing the number of tiles that fit along each dimension.\n\nExamples\n\n``` julia> getfit((10, 20), 5) (2, 4)\n\njulia> getfit((15, 25), 5) (3, 5)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getfloemasks-Tuple{DataFrame, Union{BitMatrix, Matrix{<:Integer}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getfloemasks","text":"getfloemasks(props::DataFrame, floeimg::BitMatrix)\n\nReturn a vector of cropped floe masks from floeimg using the bounding box data in props.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getidxmostminimumeverything-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getidxmostminimumeverything","text":"getidxmostminimumeverything(ratiosdf)\n\nReturn the index of the row in ratiosdf with the most minima across its columns. If there are multiple columns with the same minimum value, return the index of the first column with the minimum value. If ratiosdf is empty, return NaN.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getidxofrow-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getidxofrow","text":"getidxofrow(rw0, df)\n\nReturn the indices of the rows in df that are equal to rw0.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getpropsday1day2-Tuple{Any, Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getpropsday1day2","text":"getpropsday1day2(properties, dayidx::Int64)\n\nReturn the floe properties for day dayidx and day dayidx+1.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getsizecomparability-Union{Tuple{T}, Tuple{T, T}} where T<:Tuple{Int64, Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getsizecomparability","text":"getsizecomparability(s1, s2)\n\nCheck if the size of two floes s1 and s2 are comparable. The size is defined as the product of the floe dimensions.\n\nArguments\n\ns1: size of floe 1\ns2: size of floe 2\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.grad-Tuple{Matrix{<:Number}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.grad","text":"dx, dy = grad(A::Matrix{<:Number})\n\nMake gradient vector field for the set of points with coordinates in the rows of the matrix A with x-coordinates down column 1 and y-coordinates down column 2. Return a tuple with dx and dy in that order. \n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.grad-Tuple{Vector{<:Number}, Vector{<:Number}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.grad","text":"dx, dy = grad(x::Vector{<:Number}, y::Vector{<:Number})\n\nMake gradient vector field for the set of points with coordinates in vectors x and y. Return a tuple with dx and dy in that order. \n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.hbreak!-Tuple{T} where T<:(AbstractArray{Bool})","page":"IceFloeTracker.jl","title":"IceFloeTracker.hbreak!","text":"hbreak!(img::AbstractArray{Bool})\n\nInplace version of hbreak. See also hbreak.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.hbreak-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.hbreak","text":"hbreak(img::AbstractArray{Bool})\n\nRemove H-connected pixels in the binary image img. See also hbreak! for an inplace version of this function.\n\nExamples\n\n```jldoctest; setup = :(using IceFloeTracker)\n\njulia> h1 = trues(3,3); h1[[1 3], 2] .= false; h1 3×3 BitMatrix: 1 0 1 1 1 1 1 0 1\n\njulia> h2 = trues(3,3); h2[2, [1 3]] .= false; h2 3×3 BitMatrix: 1 1 1 0 1 0 1 1 1\n\njulia> hbreak!(h1); h1 # modify h1 inplace 3×3 BitMatrix: 1 0 1 1 0 1 1 0 1\n\njulia> hbreak(h2) 3×3 BitMatrix: 1 1 1 0 0 0 1 1 1\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.histeq-Tuple{S} where S<:(AbstractArray{<:Integer})","page":"IceFloeTracker.jl","title":"IceFloeTracker.histeq","text":"histeq(img)\nhisteq(img; nbins=64)\n\nHistogram equalization of img using nbins bins.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.imadjust-Union{Tuple{AbstractArray{<:Integer}}, Tuple{T}} where T<:AbstractFloat","page":"IceFloeTracker.jl","title":"IceFloeTracker.imadjust","text":"imadjust(img; low, high)\n\nAdjust the contrast of an image using linear stretching. The image is normalized to [0, 1] and then stretched to the range [low, high].\n\nArguments\n\nimg: The input image.\nlow: The lower bound of the stretched image. Default is 0.01.\nhigh: The upper bound of the stretched image. Default is 0.99.\n\nReturns\n\nThe contrast-adjusted image in the range [0, 255].\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.imbrighten-Tuple{Any, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.imbrighten","text":"imbrighten(img, brighten_mask, bright_factor)\n\nBrighten the image using a mask and a brightening factor.\n\nArguments\n\nimg: The input image.\nbrighten_mask: A mask indicating the pixels to brighten.\nbright_factor: The factor by which to brighten the pixels.\n\nReturns\n\nThe brightened image.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.imextendedmin","page":"IceFloeTracker.jl","title":"IceFloeTracker.imextendedmin","text":"imextendedmin(img)\n\nMimics MATLAB's imextendedmin function that computes the extended-minima transform, which is the regional minima of the H-minima transform. Regional minima are connected components of pixels with a constant intensity value. This function returns a transformed bitmatrix.\n\nArguments\n\nimg: image object\nh: suppress minima below this depth threshold\nconn: neighborhood connectivity; in 2D 1 = 4-neighborhood and 2 = 8-neighborhood\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.imgradientmag-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.imgradientmag","text":"imgradientmag(img)\n\nCompute the gradient magnitude of an image using the Sobel operator.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.imhist","page":"IceFloeTracker.jl","title":"IceFloeTracker.imhist","text":"imhist(img, imgtype::AbstractString=\"uint8\")\n\nCompute the histogram of an image where each possible value is represented in the histogram. The function returns a tuple with the bins and counts of each bin.\n\nExample\n\n```jldoctest; setup = :(using IceFloeTracker) julia> img = [ 4 4 4 4 4 3 4 5 4 3 3 5 5 5 3 3 4 5 4 3 4 4 4 4 4 ]\n\njulia> bins, heights = imhist(img);\n\njulia> [bins[heights .> 0] heights[heights .>0]] # display only non-zero bins and heights 3×2 Matrix{Int64}: 3 6 4 14 5 5\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.impose_minima-Union{Tuple{T}, Tuple{AbstractArray{T}, AbstractArray{Bool}}} where T<:Integer","page":"IceFloeTracker.jl","title":"IceFloeTracker.impose_minima","text":"impose_minima(I::AbstractArray{T}, BW::AbstractArray{Bool}) where {T<:Integer}\n\nUse morphological reconstruction to enforce minima on the input image I at the positions where the binary mask BW is non-zero.\n\nIt supports both integer and grayscale images using different implementations for each.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.imregionalmin","page":"IceFloeTracker.jl","title":"IceFloeTracker.imregionalmin","text":"imregionalmin(img, conn=2)\n\nCompute the regional minima of the image img using the connectivity conn.\n\nReturns a bitmatrix of the same size as img with the regional minima.\n\nArguments\n\nimg: Image object\nconn: Neighborhood connectivity; in 2D, 1 = 4-neighborhood and 2 = 8-neighborhood\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.imsharpen","page":"IceFloeTracker.jl","title":"IceFloeTracker.imsharpen","text":"imsharpen(truecolor_image, landmask_no_dilate, lambda, kappa, niters, nbins, rblocks, cblocks, clip, smoothing_param, intensity)\n\nSharpen truecolor_image.\n\nArguments\n\ntruecolor_image: input image in truecolor\nlandmask_no_dilate: landmask for region of interest\nlambda: speed of diffusion (0–0.25)\nkappa: conduction coefficient for diffusion (25–100)\nniters: number of iterations of diffusion\nnbins: number of bins during histogram equalization\nrblocks: number of row blocks to divide input image during equalization\ncblocks: number of column blocks to divide input image during equalization\nclip: Thresholds for clipping histogram bins (0–1); values closer to one minimize contrast enhancement, values closer to zero maximize contrast enhancement\nsmoothing_param: pixel radius for gaussian blurring (1–10)\nintensity: amount of sharpening to perform\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.imsharpen_gray-Tuple{Matrix{Float64}, AbstractArray{Bool}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.imsharpen_gray","text":"imsharpen_gray(imgsharpened, landmask)\n\nApply landmask and return Gray type image in colorview for normalization.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.isfloegoodmatch-NTuple{4, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.isfloegoodmatch","text":"isfloegoodmatch(conditions, mct, area_mismatch, corr)\n\nReturn true if the floes are a good match as per the set thresholds. Return false otherwise.\n\nArguments\n\nconditions: tuple of booleans for evaluating the conditions\nmct: tuple of thresholds for the match correlation test\narea_mismatch and corr: values returned by match_corr\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.isincountourlist-Tuple{Union{Tuple{Int64, Int64}, CartesianIndex{2}}, Vector{Vector{CartesianIndex}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.isincountourlist","text":"Check P is in countour list if so return the index of the contour that contains P, otherwise return false.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.ismember-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.ismember","text":"ismember(df1,df2)\n\nReturn a boolean array indicating whether each row in df1 is a member of df2.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.kmeans_segmentation","page":"IceFloeTracker.jl","title":"IceFloeTracker.kmeans_segmentation","text":"kmeans_segmentation(gray_image, ice_labels;)\n\nApply k-means segmentation to a gray image to isolate a cluster group representing sea ice. Returns a binary image with ice segmented from background.\n\nArguments\n\ngray_image: output image from ice-water-discrimination.jl or gray ice floe leads image in segmentation_f.jl\nice_labels: vector if pixel coordinates output from find_ice_labels.jl\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.loadimg-Tuple{}","page":"IceFloeTracker.jl","title":"IceFloeTracker.loadimg","text":"loadimg(; dir::String, fname::String)\n\nLoad an image from dir with filename fname into a matrix of Float64 values. Returns the loaded image.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.long_tracker-Tuple{Vector{DataFrame}, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.long_tracker","text":"long_tracker(props, condition_thresholds, mc_thresholds)\n\nTrack ice floes over multiple days.\n\nTrajectories are built in two steps:\n\nGet pairs of floes in day 1 and day 2. Any unmatched floes, in both day 1 and day 2, become the \"heads\" of their respective trajectories.\nFor each subsequent day, find pairs of floes for the current trajectory heads. Again, any unmatched floe in the new prop table starts a new trajectory.\n\nArguments\n\nprops::Vector{DataFrame}: A vector of DataFrames, each containing ice floe properties for a single day. Each DataFrame must have the following columns:\n\"area\"\n\"min_row\"\n\"min_col\"\n\"max_row\"\n\"max_col\"\n\"row_centroid\"\n\"col_centroid\"\n\"convex_area\"\n\"majoraxislength\"\n\"minoraxislength\"\n\"orientation\"\n\"perimeter\"\n\"mask\": 2D array of booleans\n\"passtime\": A timestamp for the floe\n\"psi\": the psi-s curve for the floe\n\"uuid\": a universally unique identifier for each segmented floe\ncondition_thresholds: 3-tuple of thresholds (each a named tuple) for deciding whether to match floe i from day k to floe j from day k+1\nmc_thresholds: thresholds for area mismatch and psi-s shape correlation\n\nReturns\n\nA DataFrame with the above columns, plus two extra columns, \"area_mismatch\" and \"corr\", which are the area mismatch and correlation between a floe and the one that follows it in the trajectory. Trajectories are identified by a unique identifier, \"uuid\".\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.make_filename-Tuple{}","page":"IceFloeTracker.jl","title":"IceFloeTracker.make_filename","text":"make_filename()\n\nMakes default filename with timestamp.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.make_hbreak_dict-Tuple{}","page":"IceFloeTracker.jl","title":"IceFloeTracker.make_hbreak_dict","text":"make_hbreak_dict()\n\nBuild dict with the two versions of an H-connected 3x3 neighboorhood.\n\nh1 = [1 0 1 1 1 1 1 0 1] \n\nh2 = [1 1 1 0 1 0 1 1 1] \n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.make_lut-Tuple{Function}","page":"IceFloeTracker.jl","title":"IceFloeTracker.make_lut","text":"make_lut(lutfunc::Function)\n\nGenerate lookup table (lut) for 3x3 neighborhoods according to lutfunc.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.make_psi_s-Tuple{Matrix{<:Number}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.make_psi_s","text":"make_psi_s(XY::Matrix{<:Number};rangeout::Bool=true,\nunwrap::Bool=true)\n\nAlternate method of make_psi_s accepting input vectors x and y as a 2-column matrix [x y] in order to facillitate workflow (output from resample_boundary).\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.make_psi_s-Tuple{Vector{<:Number}, Vector{<:Number}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.make_psi_s","text":"make_psi_s(x::Vector{<:Number},\n y::Vector{<:Number};\n rangeout::Bool=true,\n unwrap::Bool=true)::Tuple{Vector{Float64}, Vector{Float64}}\n\nBuilds the ψ-s curve defined by vectors x and y.\n\nReturns a tuple of vectors with the phases ψ in the first component and the traversed arclength in the second component. \n\nFollowing the convention in [1], the wrapped ψ-s curve has values in [0, 2π) by default; use rangeout to control this behavior.\n\nSee also bwtraceboundary, resample_boundary\n\nArguments\n\nx: Vector of x-coordinates\ny: corresponding vector of y-coordinates\nrangeout: true (default) for phase values in [0, 2π); false for phase values in (-π, π].\nunwrap: set to true to get \"unwrapped\" phases (default). \n\nReference\n\n[1] McConnell, Ross, et al. \"psi-s correlation and dynamic time warping: two methods for tracking ice floes in SAR images.\" IEEE Transactions on Geoscience and Remote sensing 29.6 (1991): 1004-1012.\n\nExample\n\nThe example below builds a cardioid and obtains its ψ-s curve.\n\njulia> t = range(0,2pi,201);\n\njulia> x = @. cos(t)*(1-cos(t));\n\njulia> y = @. sin(t)*(1-cos(t));\n\njulia> plot(x,y) # visualize the cardioid\n\njulia> psi, s = make_psi_s(x,y);\n\njulia> [s psi] # inspect psi-s data\n200×2 Matrix{Float64}:\n 0.00049344 0.0314159\n 0.0019736 0.0733034\n 0.00444011 0.11938\n 0.00789238 0.166055\n 0.0123296 0.212929\n 0.0177505 0.259894\n 0.024154 0.306907\n 0.0315383 0.35395\n 0.0399017 0.401012\n 0.0492421 0.448087\n ⋮\n 7.96772 9.02377\n 7.97511 9.07083\n 7.98151 9.11787\n 7.98693 9.16488\n 7.99137 9.21185\n 7.99482 9.25872\n 7.99729 9.3054\n 7.99877 9.35147\n 7.99926 9.39336\n\n julia> plot(s, psi) # inspect psi-s curve -- should be a straight line from (0, 0) to (8, 3π)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.makecontourstartatP-Tuple{CartesianIndex{2}, Vector{CartesianIndex}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.makecontourstartatP","text":"Make contour start at point P by permuting the elements in contour.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.makeemptydffrom-Tuple{DataFrame}","page":"IceFloeTracker.jl","title":"IceFloeTracker.makeemptydffrom","text":"makeemptydffrom(df::DataFrame)\n\nReturn an object with an empty dataframe with the same column names as df and an empty dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.makeemptyratiosdf-Tuple{}","page":"IceFloeTracker.jl","title":"IceFloeTracker.makeemptyratiosdf","text":"makeemptyratiosdf()\n\nReturn an empty dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.matchcorr-Union{Tuple{F}, Tuple{S}, Tuple{T}, Tuple{T, T, F}} where {T<:AbstractMatrix{Bool}, S<:Int64, F<:Float64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.matchcorr","text":"matchcorr(\nf1::T,\nf2::T,\nΔt::F,\nmxrot::S=10,\npsi::F=0.95,\nsz::S=16,\ncomp::F=0.25,\nmm::F=0.22\n)\nwhere {T<:AbstractArray{Bool,2},S<:Int64,F<:Float64}\n\nCompute the mismatch mm and psi-s-correlation c for floes with masks f1 and f2.\n\nThe criteria for floes to be considered equivalent is as follows: - c greater than mm - _mm is less than mm\n\nA pair of NaN is returned for cases for which one of their mask dimension is too small or their sizes are not comparable.\n\nArguments\n\nf1: mask of floe 1\nf2: mask of floe 2\nΔt: time difference between floes\nmxrot: maximum rotation (in degrees) allowed between floesn (default: 10)\npsi: psi-s-correlation threshold (default: 0.95)\nsz: size threshold (default: 16)\ncomp: size comparability threshold (default: 0.25)\nmm: mismatch threshold (default: 0.22)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.mean-Union{Tuple{T}, Tuple{T, T}} where T<:Real","page":"IceFloeTracker.jl","title":"IceFloeTracker.mean","text":"mean(x,y)\n\nCompute the mean of x and y.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.mismatch","page":"IceFloeTracker.jl","title":"IceFloeTracker.mismatch","text":"mismatch(fixed::AbstractArray,\n moving::AbstractArray,\n mxshift::Tuple{Int64, Int64}=(10,10),\n mxrot::Float64=pi/4;\n kwargs...\n )\n\nEstimate a rigid transformation (translation + rotation) that minimizes the 'mismatch' of aligning moving with fixed using the QuadDIRECT algorithm.\n\nReturns a pair with the mismatch score mm and the associated registration angle rot.\n\nArguments\n\nfixed,moving: images to align via a rigid transformation\nmxshift: maximum allowed translation in units of array indices (default set to (10,10))\nmxrot: maximum allowed rotation in radians (default set to π/4)\nthresh: minimum sum-of-squared-intensity overlap between the images (default is 10% of the sum-of-squared-intensity of fixed)\nkwargs: other arguments such as tol, ftol, and fvalue (see QuadDIRECT.analyze for details)\n\n```\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.modenan-Tuple{AbstractVector{<:Int64}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.modenan","text":"modenan(x::AbstractVector{<:Float64})\n\nReturn the mode of x or NaN if x is empty.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.morph_fill-Tuple{T} where T<:(AbstractArray{Bool})","page":"IceFloeTracker.jl","title":"IceFloeTracker.morph_fill","text":"morph_fill(bw::T)::T where {T<:AbstractArray{Bool}}\n\nFill holes in binary image bw by setting 0-valued pixels to 1 if they are surrounded by 1-valued pixels.\n\nExamples\n\n```jldoctest; setup = :(using IceFloeTracker) julia> bw = Bool[ 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 1 1 1 0 0 0 0 0 0 ];\n\njulia> morph_fill(bw) 5×5 Matrix{Bool}: 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.move-Tuple{CartesianIndex{2}, Matrix{Float64}, Int64, Vector{CartesianIndex{2}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.move","text":"move from current pixel to the next in given direction\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.norm-Tuple{Vector{<:Number}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.norm","text":"norm(v)\n\nGet the euclidean norm of the vector v.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.normalize_image-Union{Tuple{T}, Tuple{Matrix{Float64}, T, BitMatrix, ImageMorphology.MorphologySEArray{2}}} where T<:AbstractMatrix{Gray{Float64}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.normalize_image","text":"normalize_image(image_sharpened, image_sharpened_gray, landmask, struct_elem;)\n\nAdjusts sharpened land-masked image to highlight ice floe features.\n\nDoes reconstruction and landmasking to image_sharpened.\n\nArguments\n\nimage_sharpened: sharpened image (output of imsharpen)\nimage_sharpened_gray: grayscale, landmasked sharpened image (output of imsharpen_gray(image_sharpened))\nlandmask: landmask for region of interest\nstruct_elem: structuring element for dilation\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.normalizeangle","page":"IceFloeTracker.jl","title":"IceFloeTracker.normalizeangle","text":"normalizeangle(revised,t=180)\n\nNormalize angle to be between -180 and 180 degrees.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.padnhood-Tuple{Any, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.padnhood","text":"padnhood(img, I, nhood)\n\nPad the matrix img[nhood] with zeros according to the position of I within the edgesimg.\n\nReturns img[nhood] if I is not an edge index.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.pairfloes-Tuple{Vector{<:Union{BitMatrix, Matrix{<:Integer}}}, Vector{DataFrame}, Vector{DateTime}, AbstractString, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.pairfloes","text":"pairfloes(\nsegmented_imgs::Vector{BitMatrix},\nprops::Vector{DataFrame},\npasstimes::Vector{DateTime},\nlatlonrefimage::AbstractString,\ncondition_thresholds,\nmc_thresholds,\n\n)\n\nPair floes in props[k] to floes in props[k+1] for k=1:length(props)-1.\n\nThe main steps of the algorithm are as follows:\n\nCrop floes from segmented_imgs using bounding box data in props. Floes in the edges are removed.\nFor each floekr in props[k], compare to floek+1s in props[k+1] by computing similarity ratios, set of conditions, and drift distance dist. If the conditions are met, compute the area mismatch mm and psi-s correlation c for this pair of floes. Pair these two floes if mm and c satisfy the thresholds in mc_thresholds.\nIf there are collisions (i.e. floe s in props[k+1] is paired to more than one floe in props[k]), then the floe in props[k] with the best match is paired to floe s in props[k+1].\nDrop paired floes from props[k] and props[k+1] and repeat steps 2 and 3 until there are no more floes to match in props[k].\nRepeat steps 2-4 for k=2:length(props)-1.\n\nArguments\n\nsegmented_imgs: array of images with segmented floes\nprops: array of dataframes containing floe properties\npasstimes: array of DateTime objects containing the time of the image in which the floes were captured\nlatlonrefimage: path to geotiff reference image for getting latitude and longitude of floe centroids\ncondition_thresholds: 3-tuple of thresholds (each a named tuple) for deciding whether to match floe i from day k to floe j from day k+1\nmc_thresholds: thresholds for area mismatch and psi-s shape correlation\n\nReturns a dataframe containing the following columns:\n\nID: unique ID for each floe pairing.\npasstime: time of the image in which the floes were captured.\narea: area of the floe in sq. kilometers\nconvex_area: area of the convex hull of the floe in sq. kilometers\nmajor_axis_length: length of the major axis of the floe in kilometers\nminor_axis_length: length of the minor axis of the floe in kilometers\norientation: angle between the major axis and the x-axis in radians\nperimeter: perimeter of the floe in kilometers\nlatitude: latitude of the floe centroid\nlongitude: longitude of the floe centroid\nx: x-coordinate of the floe centroid\ny: y-coordinate of the floe centroid\narea_mismatch: area mismatch between the two floes in rowi and rowi+1 after registration\ncorr: psi-s shape correlation between the two floes in rowi and rowi+1\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.reconstruct","page":"IceFloeTracker.jl","title":"IceFloeTracker.reconstruct","text":"reconstruct(img, se, type, invert)\n\nPerform closing/opening by reconstruction on img.\n\nArguments\n\nimg::AbstractArray: The input image.\nse::AbstractArray: The structuring element.\ntype::String: The type of morphological operation to perform. Must be either \"dilation\" (close by reconstruction) or \"erosion\" (open by reconstruction).\ninvert::Bool=true: Invert marker and mask before reconstruction.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.regionprops","page":"IceFloeTracker.jl","title":"IceFloeTracker.regionprops","text":"regionprops(label_img, ; properties, connectivity)\n\nA wrapper of the regionprops function from the skimage python library.\n\nSee its full documentation at https://scikit-image.org/docs/stable/api/skimage.measure.html#skimage.measure.regionprops.\n\nArguments\n\nlabel_img: Image with the labeled objects of interest\nintensity_img: (Optional) Used for generating extra_properties, integer/float array from which (presumably) label_img was generated\nextra_properties: (Optional) not yet implemented. It will be set to nothing\n\nSee also regionprops_table\n\nExamples\n\njulia> Random.seed!(123);\n\njulia> bw_img = rand([0, 1], 5, 10)\n5×10 Matrix{Int64}:\n 1 0 1 0 0 0 0 0 0 1\n 1 0 1 1 1 0 0 0 1 1\n 1 1 0 1 1 0 1 0 0 1\n 0 1 0 1 0 0 0 0 1 0\n 1 0 0 0 0 1 0 1 0 1\n\n julia> label_img = Images.label_components(bw_img, trues(3,3))\n 5×10 Matrix{Int64}:\n 1 0 1 0 0 0 0 0 0 4\n 1 0 1 1 1 0 0 0 4 4\n 1 1 0 1 1 0 3 0 0 4\n 0 1 0 1 0 0 0 0 4 0\n 1 0 0 0 0 2 0 4 0 4\n\n julia> regions = regionprops(label_img, bw_img);\n\n julia> for region in regions\n println(region.area,\"\t\", region.perimeter)\n end\n13 11.621320343559642\n1 0.0\n1 0.0\n7 4.621320343559642\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.regionprops_table","page":"IceFloeTracker.jl","title":"IceFloeTracker.regionprops_table","text":"regionprops_table(label_img, intensity_img; properties, connectivity, extra_properties)\n\nA wrapper of the regionprops_table function from the skimage python library.\n\nSee its full documentation at https://scikit-image.org/docs/stable/api/skimage.measure.html#regionprops-table.\n\nArguments\n\nlabel_img: Image with the labeled objects of interest\nintensity_img: (Optional) Used for generating extra_properties, integer/float array from which (presumably) label_img was generated \nproperties: List (Vector or Tuple) of properties to be generated for each connected component in label_img\nextra_properties: (Optional) not yet implemented. It will be set to nothing\n\nNotes\n\nZero indexing has been corrected for the bbox and centroid properties\nbbox data (max_col and max_row) are inclusive\ncentroid data are rounded to the nearest integer\n\nSee also regionprops\n\nExamples\n\njulia> using IceFloeTracker, Random\n\njulia> Random.seed!(123);\n\njulia> bw_img = rand([0, 1], 5, 10)\n5×10 Matrix{Int64}:\n 1 0 1 0 0 0 0 0 0 1\n 1 0 1 1 1 0 0 0 1 1\n 1 1 0 1 1 0 1 0 0 1\n 0 1 0 1 0 0 0 0 1 0\n 1 0 0 0 0 1 0 1 0 1\n\njulia> label_img = IceFloeTracker.label_components(bw_img, trues(3,3))\n5×10 Matrix{Int64}:\n 1 0 1 0 0 0 0 0 0 4\n 1 0 1 1 1 0 0 0 4 4\n 1 1 0 1 1 0 3 0 0 4\n 0 1 0 1 0 0 0 0 4 0\n 1 0 0 0 0 2 0 4 0 4\n\njulia> properties = [\"area\", \"perimeter\"]\n2-element Vector{String}:\n \"area\"\n \"perimeter\"\n\n julia> IceFloeTracker.regionprops_table(label_img, bw_img, properties = properties)\n 4×2 DataFrame\n Row │ area perimeter \n │ Int32 Float64 \n ─────┼──────────────────\n 1 │ 13 11.6213\n 2 │ 1 0.0\n 3 │ 1 0.0\n 4 │ 7 4.62132\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.regularize_fill_holes-NTuple{5, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.regularize_fill_holes","text":"regularize_fill_holes(img, local_maxima_mask, factor, segment_mask, L0mask)\n\nRegularize img by: 1. increasing the maxima of img by a factor of factor 2. filtering img at positions where either segment_mask or L0mask are true 3. filling holes\n\nArguments\n\nimg: The morphological residue image.\nlocal_maxima_mask: The local maxima mask.\nfactor: The factor to apply to the local maxima mask.\nsegment_mask: The segment mask – intersection of bw1 and bw2 in first tiled workflow of master.m.\nL0mask: zero-labeled pixels from watershed.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.regularize_sharpening-NTuple{8, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.regularize_sharpening","text":"regularize_sharpening(img, L0mask, radius, amount, local_maxima_mask, factor, segment_mask, se)\n\nRegularize img via sharpening, filtering, reconstruction, and maxima elevating.\n\nArguments\n\nimg: The input image.\nL0mask: zero-labeled pixels from watershed.\nradius: The radius of the unsharp mask.\namount: The amount of unsharp mask.\nlocal_maxima_mask: The local maxima mask.\nfactor: The factor to apply to the local maxima mask.\nsegment_mask: The segment mask – intersection of bw1 and bw2 in first tiled workflow of master.m.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.remove_padding-Tuple{Any, Union{ImageFiltering.Fill, ImageFiltering.Pad}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.remove_padding","text":"remove_padding(paddedimg, border_spec)\n\nRemoves padding from the boundary of padded image paddedimg according to the border specification border_spec type. Returns the cropped image.\n\nArguments\n\npaddedimg: Pre-padded image.\nborder_spec: Type representing the style of padding (such as Pad or Fill) with which paddedimg is assumend to be pre-padded. Example: Pad((1,2), (3,4)) specifies 1 row on the top, 2 columns on the left, 3 rows on the bottom, and 4 columns on the right boundary.\n\nSee also add_padding\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.renamecols!-Union{Tuple{T}, Tuple{DataFrame, Vector{T}, Vector{T}}} where T<:Union{String, Symbol}","page":"IceFloeTracker.jl","title":"IceFloeTracker.renamecols!","text":"renamecols!(props::DataFrame, oldnames::Vector{T}, newnames::Vector{T}) where T<:Union{Symbol,String}\n\nRename the oldnames columns in props to newnames.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.resample_boundary","page":"IceFloeTracker.jl","title":"IceFloeTracker.resample_boundary","text":"resample_boundary(bd_points::Vector{<:CartesianIndex}, reduc_factor::Int64=2, bd::String=\"natural\")\n\nGet a uniform set of resampled boundary points from bd_points using cubic splines with specified boundary conditions\n\nThe resampled set of points is obtained using parametric interpolation of the points in bd_points. It is assumed that the separation between a pair of adjacent points is 1.\n\nArguments\n\nbd_points: Sequetial set of boundary points for the object of interest\nreduc_factor: Factor by which to reduce the number of points in bd_points (2 by default)\n\n-bd: Boundary condition, either 'natural' (default) or 'periodic'\n\nSee also bwtraceboundary\n\nExample\n\n```jldoctest; setup = :(using IceFloeTracker) julia> A = zeros(Int, 13, 16); A[2:6, 2:6] .= 1; A[4:8, 7:10] .= 1; A[10:12,13:15] .= 1; A[10:12,3:6] .= 1; julia> A 13×16 Matrix{Int64}: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n\njulia> boundary = bwtraceboundary(A);\n\njulia> boundary[3] 9-element Vector{CartesianIndex}: CartesianIndex(10, 13) CartesianIndex(11, 13) CartesianIndex(12, 13) CartesianIndex(12, 14) CartesianIndex(12, 15) CartesianIndex(11, 15) CartesianIndex(10, 15) CartesianIndex(10, 14) CartesianIndex(10, 13)\n\njulia> resample_boundary(boundary[3]) 4×2 Matrix{Float64}: 10.0 13.0 12.0357 13.5859 10.5859 15.0357 10.0 13.0\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.reset_id!","page":"IceFloeTracker.jl","title":"IceFloeTracker.reset_id!","text":"reset_id!(df, col)\n\nReset the distinct values in the column col of df to be consecutive integers starting from 1.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.rgb2gray-Tuple{Array{Float64, 3}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.rgb2gray","text":"rgb2gray(rgbchannels::Array{Float64, 3})\n\nConvert an array of RGB channel data to grayscale in the range [0, 255].\n\nIdentical to MATLAB rgb2gray (https://www.mathworks.com/help/matlab/ref/rgb2gray.html).\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.rgb2gray-Tuple{Matrix{RGB{Float64}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.rgb2gray","text":"rgb2gray(img::Matrix{RGB{Float64}})\n\nConvert an RGB image to grayscale in the range [0, 255].\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.roundtoint!-Union{Tuple{T}, Tuple{DataFrame, Vector{T}}} where T<:Union{String, Symbol}","page":"IceFloeTracker.jl","title":"IceFloeTracker.roundtoint!","text":"roundtoint!(props::DataFrame, colnames::Vector{T}) where T<:Union{Symbol,String}\n\nRound the colnames columns in props to Int.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.segmentation_A-Tuple{BitMatrix}","page":"IceFloeTracker.jl","title":"IceFloeTracker.segmentation_A","text":"segmentation_A(segmented_ice_cloudmasked; min_opening_area)\n\nApply k-means segmentation to a gray image to isolate a cluster group representing sea ice. Returns an image segmented and processed as well as an intermediate files needed for downstream functions.\n\nArguments\n\nsegmented_ice_cloudmask: bitmatrix with open water/clouds = 0, ice = 1, output from segmented_ice_cloudmasking()\nmin_opening_area: minimum size of pixels to use during morphological opening\nfill_range: range of values dictating the size of holes to fill\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.segmentation_B","page":"IceFloeTracker.jl","title":"IceFloeTracker.segmentation_B","text":"segmentation_B(sharpened_image, cloudmask, segmented_a_ice_mask, struct_elem; fill_range, isolation_threshold, alpha_level, adjusted_ice_threshold)\n\nPerforms image processing and morphological filtering with intermediate files from normalization.jl and segmentation_A to further isolate ice floes, returning a mask of potential ice.\n\nArguments\n\nsharpened_image: non-cloudmasked but sharpened image, output from normalization.jl\ncloudmask: bitmatrix cloudmask for region of interest\nsegmented_a_ice_mask: binary cloudmasked ice mask from segmentation_a_direct.jl\nstruct_elem: structuring element for dilation\nfill_range: range of values dictating the size of holes to fill\nisolation_threshold: threshold used to isolated pixels from sharpened_image; between 0-1\nalpha_level: alpha threshold used to adjust contrast\ngamma_factor: amount of gamma adjustment\nadjusted_ice_threshold: threshold used to set ice equal to one after gamma adjustment\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.segmentation_F-Tuple{Matrix{Gray{Float64}}, BitMatrix, BitMatrix, Vector{Int64}, BitMatrix, BitMatrix}","page":"IceFloeTracker.jl","title":"IceFloeTracker.segmentation_F","text":"segmentation_F(\nsegmentation_B_not_ice_mask::Matrix{Gray{Float64}},\nsegmentation_B_ice_intersect::BitMatrix,\nsegmentation_B_watershed_intersect::BitMatrix,\nice_labels::Vector{Int64},\ncloudmask::BitMatrix,\nlandmask::BitMatrix;\nmin_area_opening::Int64=20\n\n)\n\nCleans up past segmentation images with morphological operations, and applies the results of prior watershed segmentation, returning the final cleaned image for tracking with ice floes segmented and isolated. \n\nArguments\n\nsegmentation_B_not_ice_mask: gray image output from segmentation_b.jl\nsegmentation_B_ice_intersect: binary mask output from segmentation_b.jl\nsegmentation_B_watershed_intersect: ice pixels, output from segmentation_b.jl \nice_labels: vector of pixel coordinates output from find_ice_labels.jl\ncloudmask.jl: bitmatrix cloudmask for region of interest\nlandmask.jl: bitmatrix landmask for region of interest\nmin_area_opening: threshold used for area opening; pixel groups greater than threshold are retained\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.segmented_ice_cloudmasking-Tuple{Matrix{Gray{Float64}}, BitMatrix, Vector{Int64}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.segmented_ice_cloudmasking","text":"segmented_ice_cloudmasking(gray_image, cloudmask, ice_labels;)\n\nApply cloudmask to a bitmatrix of segmented ice after kmeans clustering. Returns a bitmatrix with open water/clouds = 0, ice = 1).\n\nArguments\n\ngray_image: output image from ice-water-discrimination.jl or gray ice floe leads image in segmentation_f.jl\ncloudmask: bitmatrix cloudmask for region of interest\nice_labels: vector if pixel coordinates output from find_ice_labels.jl\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.sort_floes_by_area!-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.sort_floes_by_area!","text":"sort_floes_by_area!(props)\n\nSort floes in props by area in descending order.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.timestamp-Tuple{String}","page":"IceFloeTracker.jl","title":"IceFloeTracker.timestamp","text":"timestamp(fname)\n\nAttach timestamp to fname.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.trackercond1","page":"IceFloeTracker.jl","title":"IceFloeTracker.trackercond1","text":"trackercond1(p1, p2, delta_time, t1=(dt = (30, 100, 1300), dist=(15, 30, 120)))\n\nReturn true if the floe at p1 and the floe at p2 are within a certain distance of each other and the displacement time is within a certain range. Return false otherwise.\n\nArguments\n\np1: coordinates of floe 1\np2: coordinates of floe 2\ndelta_time: time elapsed from image day 1 to image day 2\nt: tuple of thresholds for elapsed time and distance\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.trackercond2","page":"IceFloeTracker.jl","title":"IceFloeTracker.trackercond2","text":"trackercond2(area1, ratios, t2=(area=1200, arearatio=0.28, majaxisratio=0.10, minaxisratio=0.12, convex_area=0.14))\n\nSet of conditions for \"big\" floes. Return true if the area of the floe is greater than t2.area and the similarity ratios are less than the corresponding thresholds in t2. Return false otherwise.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.trackercond3","page":"IceFloeTracker.jl","title":"IceFloeTracker.trackercond3","text":"trackercond3(area1, ratios, t3=(area=1200, arearatio=0.18, majaxisratio=0.07, minaxisratio=0.08, convex_area=0.09))\n\nSet of conditions for \"small\" floes. Return true if the area of the floe is less than t3.area and the similarity ratios are less than the corresponding thresholds in t3. Return false otherwise\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.unsharp_mask-NTuple{4, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.unsharp_mask","text":"unsharp_mask(image_gray, smoothing_param, intensity, clampmax)\n\nApply unsharp masking on (equalized) grayscale ([0, clampmax]) image to enhance its sharpness.\n\nArguments\n\nimage_gray: The input grayscale image, typically already equalized.\nsmoothing_param::Int: The pixel radius for Gaussian blurring (typically between 1 and 10).\nintensity: The amount of sharpening to apply. Higher values result in more pronounced sharpening.\nclampmax: upper limit of intensity values in the returned image.`\n\nReturns\n\nThe sharpened grayscale image with values clipped between 0 and clapmax.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.unsharp_mask-Tuple{Any, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.unsharp_mask","text":"(Deprecated)\nunsharp_mask(image_gray, smoothing_param, intensity)\n\nApply unsharp masking on (equalized) grayscale image to enhance its sharpness.\n\nDoes not perform clamping after the smoothing step. Kept for legacy tests of IceFloeTracker.jl.\n\nArguments\n\nimage_gray: The input grayscale image, typically already equalized.\nsmoothing_param::Int: The pixel radius for Gaussian blurring (typically between 1 and 10).\nintensity: The amount of sharpening to apply. Higher values result in more pronounced sharpening.\n\nReturns\n\nThe sharpened grayscale image with values clipped between 0 and clapmax.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.update!-Tuple{IceFloeTracker.MatchedPairs, IceFloeTracker.MatchedPairs}","page":"IceFloeTracker.jl","title":"IceFloeTracker.update!","text":"update!(match_total::MatchedPairs, matched_pairs::MatchedPairs)\n\nUpdate match_total with the data from matched_pairs.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.watershed_ice_floes-Tuple{BitMatrix}","page":"IceFloeTracker.jl","title":"IceFloeTracker.watershed_ice_floes","text":"watershed_ice_floes(intermediate_segmentation_image;)\n\nPerforms image processing and watershed segmentation with intermediate files from segmentation_b.jl to further isolate ice floes, returning a binary segmentation mask indicating potential sparse boundaries of ice floes.\n\nArguments\n\n-intermediate_segmentation_image: binary cloudmasked and landmasked intermediate file from segmentation B, either SegB.not_ice_bit or SegB.ice_intersect\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.watershed_product-Tuple{BitMatrix, BitMatrix}","page":"IceFloeTracker.jl","title":"IceFloeTracker.watershed_product","text":"watershed_product(watershed_B_ice_intersect, watershed_B_not_ice;)\n\nIntersects the outputs of watershed segmentation on intermediate files from segmentation B, indicating potential sparse boundaries of ice floes.\n\nArguments\n\nwatershed_B_ice_intersect: binary segmentation mask from watershed_ice_floes\nwatershed_B_not_ice: binary segmentation mask from watershed_ice_floes\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.@persist","page":"IceFloeTracker.jl","title":"IceFloeTracker.@persist","text":"@persist img fname\n@persist(img,fname)\n@persist img\n@persist(img)\n@persist img fname ts\n@persist(img, fname, ts)\n\nGiven a reference to an image object img, the macro persists (saves to a file) img to the current working directory using fname as filename. Returns img.\n\nArguments\n\nimg: Symbol expression representing an image object loaded in memory.\nfname: Optional filename for the persisted image.\nts: Optional boolean to attach timestamp to fname.\n\n\n\n\n\n","category":"macro"},{"location":"#IceFloeTracker.MatchedPairs","page":"IceFloeTracker.jl","title":"IceFloeTracker.MatchedPairs","text":"Container for matched pairs of floes. props1 and props2 are dataframes with the same column names as the input dataframes. ratios is a dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios. dist is a vector of (pixel) distances between paired floes.\n\n\n\n\n\n","category":"type"},{"location":"#IceFloeTracker.MatchedPairs-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.MatchedPairs","text":"MatchedPairs(df)\n\nReturn an object of type MatchedPairs with an empty dataframe with the same column names as df, an empty dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios, and an empty vector for distances.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.Tracked","page":"IceFloeTracker.jl","title":"IceFloeTracker.Tracked","text":"Container for final matched pairs of floes. data is a vector of MatchedPairs objects.\n\n\n\n\n\n","category":"type"},{"location":"#Index","page":"IceFloeTracker.jl","title":"Index","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"","category":"page"}] +[{"location":"tracking/#Tracking","page":"Tracking","title":"Tracking","text":"","category":"section"},{"location":"tracking/","page":"Tracking","title":"Tracking","text":"Ice floe tracking links objects in images pairwise.","category":"page"},{"location":"segmentation/#Segmentation","page":"Segmentation","title":"Segmentation","text":"","category":"section"},{"location":"segmentation/","page":"Segmentation","title":"Segmentation","text":"The segmentation functions are intended for use on the preprocessed imagery.","category":"page"},{"location":"segmentation/#Ice/Water-Discrimination","page":"Segmentation","title":"Ice/Water Discrimination","text":"","category":"section"},{"location":"segmentation/#Feature-Identification","page":"Segmentation","title":"Feature Identification","text":"","category":"section"},{"location":"preprocessing/#Preprocessing","page":"Preprocessing","title":"Preprocessing","text":"","category":"section"},{"location":"preprocessing/","page":"Preprocessing","title":"Preprocessing","text":"IFT operates on optical satellite imagery. The main functions are designed with \"true color\" and \"false color\" imagery in mind, and have thus far primarily been tested on imagery from the Moderate Resolution Imaging Spectroradiometer (MODIS) from the NASA Aqua and Terra satellites. The preprocessing routines mask land and cloud features, and aim to adjust and sharpen the remainder of the images to amplify the contrast along the edges of sea ice floes. The functions use three different images: a land mask, a true color image, and a false color image. Examples are based on the NASA MODIS dataset.","category":"page"},{"location":"preprocessing/#Land-masks","page":"Preprocessing","title":"Land masks","text":"","category":"section"},{"location":"preprocessing/","page":"Preprocessing","title":"Preprocessing","text":"Landmask generation and dilation is handled by the function create_landmask. Landmask images from file are loaded as RGB matrices. This example uses an image from NASA EarthData landmask for Beaufort Sea.","category":"page"},{"location":"preprocessing/","page":"Preprocessing","title":"Preprocessing","text":"using IceFloeTracker\n\nrgb_landmask = IceFloeTracker.load();\nlandmask_imgs = IceFloeTracker.create_landmask(rgb_landmask);","category":"page"},{"location":"preprocessing/","page":"Preprocessing","title":"Preprocessing","text":"The landmask_imgs object includes a binary version of the original landmask and a dilated version, which helps to cover the complicated near-coastal regions.","category":"page"},{"location":"preprocessing/","page":"Preprocessing","title":"Preprocessing","text":"","category":"page"},{"location":"preprocessing/","page":"Preprocessing","title":"Preprocessing","text":"At the top, we have the original landmask TIFF, which has black and gray values. The middle image is the binary image, with land set to 0. At the bottom, we can see the dilated image using the default value of the structuring element. The default has radius 50, which results in a coastal mask of 12.5 km based on the 250 m pixel size of default MODIS imagery.","category":"page"},{"location":"preprocessing/#Cloud-masks","page":"Preprocessing","title":"Cloud masks","text":"","category":"section"},{"location":"preprocessing/","page":"Preprocessing","title":"Preprocessing","text":"Setting thresholds for cloud mask","category":"page"},{"location":"preprocessing/#Image-regularization","page":"Preprocessing","title":"Image regularization","text":"","category":"section"},{"location":"#IceFloeTracker.jl","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"","category":"section"},{"location":"#Overview","page":"IceFloeTracker.jl","title":"Overview","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"IceFloeTracker.jl is a collection of routines and tools for processing remote sensing imagery, identifying sea ice floes, and tracking the displacement and rotation of ice floes across multiple images. It can be used either standalone to create custom processing pathways or with the Ice Floe Tracker Pipeline.","category":"page"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"","category":"page"},{"location":"#Algorithm-components","page":"IceFloeTracker.jl","title":"Algorithm components","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"The Ice Floe Tracker (IFT) package includes the core functions for the three main steps of the algorithm. These functions can be used independently and can be customized for specific use cases. ","category":"page"},{"location":"#Preprocessing","page":"IceFloeTracker.jl","title":"Preprocessing","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"IFT operates on optical satellite imagery. The main functions are designed with \"true color\" and \"false color\" imagery in mind, and have thus far primarily been tested on imagery from the Moderate Resolution Imaging Spectroradiometer (MODIS) from the NASA Aqua and Terra satellites. The preprocessing routines mask land and cloud features, and aim to adjust and sharpen the remainder of the images to amplify the contrast along the edges of sea ice floes. (TBD: Link to main preprocessing page)","category":"page"},{"location":"#Segmentation","page":"IceFloeTracker.jl","title":"Segmentation","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"The IFT segmentation functions include functions for semantic segmentation (pixel-by-pixel assignment into predefined categories) and object-based segmentation (groupings of pixels into distinct objects). The semantic segmentation steps use k-means to group pixels into water and ice regions. A combination of watershed functions, morphological operations, and further applications of k-means are used to identify candidate ice floes. (TBD: Link to main segmentation page)","category":"page"},{"location":"#Tracking","page":"IceFloeTracker.jl","title":"Tracking","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"Ice floe tracking is carried out by comparing the shapes produced in the segmentation step. Shapes with similar area are rotated until the difference in surface area is minimized, and then the edge shapes are compared using a Ѱ-s curve. If thresholds for correlation and area differences are met, then the floe with the best correlation and smallest area differences are considered matches and the objects are assigned the same label. In the end, trajectories for individual floes are recorded in a dataframe.","category":"page"},{"location":"#Developers","page":"IceFloeTracker.jl","title":"Developers","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"IceFloeTracker.jl is a product of the Wilhelmus Lab at Brown University, led by Monica M. Wilhelmus. The original algorithm was developed by Rosalinda Lopez-Acosta during her PhD work at University of California Riverside, advised by Dr. Wilhelmus. The translation of the original Matlab code into the current modular, open source Julia package has been carried out in conjunction with the Center for Computing and Visualization at Brown University. Contributors include Daniel Watkins, Maria Isabel Restrepo, Carlos Paniagua, Tim DiVoll, John Holland, and Bradford Roarr.","category":"page"},{"location":"#Citing","page":"IceFloeTracker.jl","title":"Citing","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"If you use IceFloeTracker.jl in research, teaching, or elsewhere, please mention the IceFloeTracker package and cite our journal article outlining the algorithm:","category":"page"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"Lopez-Acosta et al., (2019). Ice Floe Tracker: An algorithm to automatically retrieve Lagrangian trajectories via feature matching from moderate-resolution visual imagery. Remote Sensing of Environment, 234(111406), doi:10.1016/j.rse.2019.111406.","category":"page"},{"location":"#Papers-using-Ice-Floe-Tracker","page":"IceFloeTracker.jl","title":"Papers using Ice Floe Tracker","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"Manucharyan, Lopez-Acosta, and Wilhelmus (2022)*. Spinning ice floes reveal intensification of mesoscale eddies in the western Arctic Ocean. Scientific Reports, 12(7070), doi:10.1038/s41598-022-10712-z\nWatkins, Bliss, Hutchings, and Wilhelmus (2023)*. Evidence of Abrupt Transitions Between Sea Ice Dynamical Regimes in the East Greenland Marginal Ice Zone. Geophysical Research Letters, 50(e2023GL103558), pp. 1-10, doi:10.1029/2023GL103558","category":"page"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"*Papers using data from the Matlab implementation of Ice Floe Tracker.","category":"page"},{"location":"#Functions","page":"IceFloeTracker.jl","title":"Functions","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"Modules = [IceFloeTracker]\nOrder = [:function, :macro, :type]","category":"page"},{"location":"#Base.isequal-Tuple{IceFloeTracker.MatchedPairs, IceFloeTracker.MatchedPairs}","page":"IceFloeTracker.jl","title":"Base.isequal","text":"isequal(matchedpairs1::MatchedPairs, matchedpairs2::MatchedPairs)\n\nReturn true if matchedpairs1 and matchedpairs2 are equal, false otherwise.\n\n\n\n\n\n","category":"method"},{"location":"#Base.sort!-Tuple{IceFloeTracker.Tracked}","page":"IceFloeTracker.jl","title":"Base.sort!","text":"sort!(tracked::Tracked)\n\nSort the floes in tracked by area in descending order.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker._adjust_histogram-NTuple{5, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker._adjust_histogram","text":"_adjust_histogram(masked_view, nbins, rblocks, cblocks, clip)\n\nPerform adaptive histogram equalization to a masked image. To be invoked within imsharpen.\n\nArguments\n\nmasked_view: input image in truecolor\n\nSee imsharpen for a description of the remaining arguments\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker._bin9todec-Tuple{AbstractArray}","page":"IceFloeTracker.jl","title":"IceFloeTracker._bin9todec","text":"_bin9todec(v)\n\nGet decimal representation of a bit vector v with the leading bit at its leftmost posistion.\n\nExample\n\njulia> _bin9todec([0 0 0 0 0 0 0 0 0])\n0\n\njulia> _bin9todec([1 1 1 1 1 1 1 1 1])\n511\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker._branch_filter","page":"IceFloeTracker.jl","title":"IceFloeTracker._branch_filter","text":"_branch_filter(\nimg::AbstractArray{Bool},\nfunc1::Function=branch_candidates_func,\nfunc2::Function=connected_background_count,)\n\nFilter img with _operator_lut using lut1 and lut2.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker._generate_se!-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker._generate_se!","text":"_generate_se!(se)\n\nGenerate a structuring element by leveraging symmetry (mirroring and inverting) a given initial structuring element.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker._operator_lut-Tuple{CartesianIndex{2}, AbstractArray{Bool}, CartesianIndices{2, Tuple{UnitRange{Int64}, UnitRange{Int64}}}, Vector{Int64}, Vector{Int64}}","page":"IceFloeTracker.jl","title":"IceFloeTracker._operator_lut","text":"_operator_lut(I, img, nhood, lut1, lut2)\n\nLook up the neighborhood nhood in lookup tables lut1 and lut2.\n\nHandles cases when the center of nhood is on the edge of img using data in I.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker._swap_last_values!-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker._swap_last_values!","text":"_swap_last_values!(df)\n\nSwap the last two values of the area_mismatch and corr columns for each group in df. For bookkeeping purposes for goodness of fit data during the tracking process.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.absdiffmeanratio-Union{Tuple{T}, Tuple{T, T}} where T<:Real","page":"IceFloeTracker.jl","title":"IceFloeTracker.absdiffmeanratio","text":"absdiffmeanratio(x, y)\n\nCalculate the absolute difference between x and y divided by the mean of x and y.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.add_padding-Tuple{Any, Union{ImageFiltering.Fill, ImageFiltering.Pad}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.add_padding","text":"add_padding(img, style)\n\nExtrapolate the image img according to the style specifications type. Returns the extrapolated image.\n\nArguments\n\nimg: Image to be padded.\nstyle: A supported type (such as Pad or Fill) representing the extrapolation style. See the relevant documentation for details.\n\nSee also remove_padding\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.add_passtimes!-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.add_passtimes!","text":"add_passtimes!(props, passtimes)\n\nAdd a column passtime to each DataFrame in props containing the time of the image in which the floes were captured.\n\nArguments\n\nprops: array of DataFrames containing floe properties.\npasstimes: array of DateTime objects containing the time of the image in which the floes were captured.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.addfloemasks!-Tuple{DataFrame, Union{BitMatrix, Matrix{<:Integer}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.addfloemasks!","text":"addfloearrays(props::DataFrame, floeimg::BitMatrix)\n\nAdd a column to props called floearray containing the cropped floe masks from floeimg.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.addlatlon!-Tuple{DataFrame, AbstractString}","page":"IceFloeTracker.jl","title":"IceFloeTracker.addlatlon!","text":"addlatlon(pairedfloesdf::DataFrame, refimage::AbstractString)\n\nAdd columns latitude, longitude, and pixel coordinates x, y to pairedfloesdf.\n\nArguments\n\npairedfloesdf: dataframe containing floe tracking data.\nrefimage: path to reference image.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.addmatch!-Tuple{IceFloeTracker.MatchedPairs, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.addmatch!","text":"addmatch!(matched_pairs, newmatch)\n\nAdd newmatch to matched_pairs.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.adduuid!-Tuple{DataFrame}","page":"IceFloeTracker.jl","title":"IceFloeTracker.adduuid!","text":"adduuid!(df)\n\nAssign a unique ID to each floe in a table of floe properties.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.adduuid!-Tuple{Vector{DataFrame}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.adduuid!","text":"adduuid!(dfs)\n\nAssign a unique ID to each floe in an vector of tables of floe properties.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.appendrows!-Union{Tuple{T}, Tuple{IceFloeTracker.MatchingProps, T, Any, Int64, Float64}} where T<:DataFrames.DataFrameRow","page":"IceFloeTracker.jl","title":"IceFloeTracker.appendrows!","text":"appendrows!(df::MatchingProps, props::T, ratios, idx::Int64, dist::Float64) where {T<:DataFrameRow}\n\nAppend a row to df.props and df.ratios with the values of props and ratios respectively.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.apply_cloudmask-Tuple{Matrix{RGB{Float64}}, AbstractArray{Bool}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.apply_cloudmask","text":"apply_cloudmask(false_color_image, cloudmask)\n\nZero out pixels containing clouds where clouds and ice are not discernable. Arguments should be of the same size.\n\nArguments\n\nfalse_color_image: reference image, e.g. corrected reflectance false color image bands [7,2,1] or grayscale\ncloudmask: binary cloudmask with clouds = 0, else = 1\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.apply_landmask-Tuple{AbstractMatrix, BitMatrix}","page":"IceFloeTracker.jl","title":"IceFloeTracker.apply_landmask","text":"apply_landmask(input_image, landmask_binary)\n\nZero out pixels in all channels of the input image using the binary landmask.\n\nArguments\n\ninput_image: truecolor RGB image\nlandmask_binary: binary landmask with 1=land, 0=water/ice \n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.atan2-Tuple{Number, Number}","page":"IceFloeTracker.jl","title":"IceFloeTracker.atan2","text":"atan2(y,x)\n\nWrapper of Base.atan that returns the angle of vector (x,y) in the range [0, 2π).\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.binarize_landmask-Tuple{T} where T<:(AbstractMatrix)","page":"IceFloeTracker.jl","title":"IceFloeTracker.binarize_landmask","text":"binarize_landmask(landmask_image)\n\nConvert a 3-channel RGB land mask image to a 1-channel binary matrix; land = 0, ocean = 1.\n\nArguments\n\nlandmask_image: RGB land mask image from fetchdata\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.branch-Tuple{T} where T<:(AbstractArray{Bool})","page":"IceFloeTracker.jl","title":"IceFloeTracker.branch","text":"branch(img::AbstractArray{Bool})\n\nFind branch points in skeletonized image img according to Definition 3 of [1].\n\n[1] Arcelli, Carlo, and Gabriella Sanniti di Baja. \"Skeletons of planar patterns.\" Machine Intelligence and Pattern Recognition. Vol. 19. North-Holland, 1996. 99-143.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.branch_candidates_func-Tuple{AbstractArray}","page":"IceFloeTracker.jl","title":"IceFloeTracker.branch_candidates_func","text":"branch_candidates_func(nhood)\n\nFilter nhood as candidate for branch point.\n\nTo be passed to the make_lut function.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.bridge-Tuple{T} where T<:(AbstractArray{Bool})","page":"IceFloeTracker.jl","title":"IceFloeTracker.bridge","text":"bridge(bw)\n\nSet 0-valued pixels to 1 if they have two nonzero neighbors that are not connected. Note the following exceptions:\n\n0 0 0 0 0 0 1 0 1 becomes 1 1 1 0 0 0 0 0 0\n\n1 0 1 1 1 1 0 0 0 becomes 0 0 0 0 0 0 0 0 0\n\nThe same applies to all their corresponding rotations.\n\nExamples\n\njulia> bw = [0 0 0; 0 0 0; 1 0 1]\n3×3 Matrix{Int64}:\n 0 0 0\n 0 0 0\n 1 0 1\n\njulia> bridge(bw)\n3×3 BitMatrix:\n 0 0 0\n 0 0 0\n 1 1 1\n\njulia> bw = [1 0 0; 1 0 1; 0 0 1]\n3×3 Matrix{Int64}:\n 1 0 0\n 1 0 1\n 0 0 1\n\njulia> bridge(bw)\n3×3 BitMatrix:\n 1 1 0\n 1 1 1\n 0 1 1\n\n julia> bw = [1 0 1; 0 0 0; 1 0 1]\n3×3 Matrix{Int64}:\n 1 0 1\n 0 0 0\n 1 0 1\n\njulia> bridge(bw)\n3×3 BitMatrix:\n 1 1 1\n 1 1 1\n 1 1 1\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.bump_tile-Union{Tuple{S}, Tuple{Tuple{UnitRange{S}, UnitRange{S}}, Tuple{S, S}}} where S<:Int64","page":"IceFloeTracker.jl","title":"IceFloeTracker.bump_tile","text":"bump_tile(tile::Tuple{UnitRange{Int64}, UnitRange{Int64}}, dims::Tuple{Int,Int})::Tuple{UnitRange{Int}, UnitRange{Int}}\n\nAdjust the tile dimensions by adding extra rows and columns.\n\nArguments\n\ntile::Tuple{Int,Int,Int,Int}: A tuple representing the tile dimensions (a, b, c, d).\ndims::Tuple{Int,Int}: A tuple representing the extra rows and columns to add (extrarows, extracols).\n\nReturns\n\nTuple{UnitRange{Int}, UnitRange{Int}}: A tuple of ranges representing the new tile dimensions.\n\nExamples\n\n```julia julia> bump_tile((1:3, 1:4), (1, 1)) (1:4, 1:5)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.bwareamaxfilt","page":"IceFloeTracker.jl","title":"IceFloeTracker.bwareamaxfilt","text":"bwareamaxfilt(bwimg::AbstractArray{Bool}, conn)\n\nFilter the smaller (by area) connected components in bwimg keeping the (assumed unique) largest.\n\nUses 8-pixel connectivity by default (conn=8). Use conn=4 for 4-pixel connectivity.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.bwareamaxfilt!","page":"IceFloeTracker.jl","title":"IceFloeTracker.bwareamaxfilt!","text":"bwareamaxfilt!(bwimg::AbstractArray)\n\nIn-place version of bwareamaxfilt.\n\nSee also bwareamaxfilt \n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.bwdist-Tuple{AbstractArray{Bool}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.bwdist","text":"bwdist(bwimg)\n\nDistance transform for binary image bwdist.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.bwperim-Tuple{T} where T<:AbstractMatrix{Bool}","page":"IceFloeTracker.jl","title":"IceFloeTracker.bwperim","text":"bwperim(bwimg)\n\nLocate the pixels at the boundary of objects in an binary image bwimg using 8-pixel connectivity.\n\nArguments\n\nbwimg: Binary (black/white – 1/0) image\n\nExamples\n\njulia> A = zeros(Bool, 13, 16); A[2:6, 2:6] .= 1; A[4:8, 7:10] .= 1; A[10:12,13:15] .= 1; A[10:12,3:6] .= 1;\n\njulia> A\n13×16 Matrix{Bool}:\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0\n 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0\n 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0\n 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0\n 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n\n julia> bwperim(A)\n13×16 Matrix{Bool}:\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0\n 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0\n 0 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0\n 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0\n 0 1 1 1 1 1 0 0 0 1 0 0 0 0 0 0\n 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0\n 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.bwtraceboundary-Union{Tuple{Union{Matrix{Float64}, Matrix{Int64}, Matrix{UInt8}, T}}, Tuple{T}} where T<:AbstractMatrix{Bool}","page":"IceFloeTracker.jl","title":"IceFloeTracker.bwtraceboundary","text":"bwtraceboundary(image::Union{Matrix{Int64},Matrix{Float64},T};\n P0::Union{Tuple{Int,Int},CartesianIndex{2},Nothing}=nothing,\n closed::Bool=true) where T<:AbstractMatrix{Bool}\n\nTrace the boundary of objects in image \n\nBackground pixels are represented as zero. The algorithm traces the boundary counterclockwise and an initial point P0 can be specified. If more than one boundary is detected and an initial point is provided, the boundary that contains this point is returned as a vector of CartesianIndex types. Otherwise an array of vectors is returned with all the detected boundaries in image. \n\nArguments\n\nimage: image, preferably binary with one single object, whose objects' boundaries are to be traced.\nP0: initial point of a target boundary.\nclosed: if true (default) makes the inital point of a boundary equal to the last point.\n\nExample\n\njulia> A = zeros(Int, 13, 16); A[2:6, 2:6] .= 1; A[4:8, 7:10] .= 1; A[10:12,13:15] .= 1; A[10:12,3:6] .= 1;\n\njulia> A\n13×16 Matrix{Int64}:\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0\n 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0\n 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0\n 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0\n 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n\njulia> boundary = IceFloeTracker.bwtraceboundary(A);\n\njulia> boundary[3]\n9-element Vector{CartesianIndex}:\n CartesianIndex(10, 13)\n CartesianIndex(11, 13)\n CartesianIndex(12, 13)\n CartesianIndex(12, 14)\n CartesianIndex(12, 15)\n CartesianIndex(11, 15)\n CartesianIndex(10, 15)\n CartesianIndex(10, 14)\n CartesianIndex(10, 13)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.callmatchcorr-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.callmatchcorr","text":"callmatchcorr(conditions)\n\nCondition to decide whether match_corr should be called.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.check_fname","page":"IceFloeTracker.jl","title":"IceFloeTracker.check_fname","text":"check_fname(fname)\n\nChecks fname does not exist in current directory; throws an assertion if this condition is false.\n\nArguments\n\nfname: String object or Symbol to a reference to a String representing a path.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.clockwise-Tuple{Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.clockwise","text":"Make a clockwise turn from the dir direction\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.compute_ratios-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.compute_ratios","text":"compute_ratios((props_day1, r), (props_day2,s))\n\nCompute the ratios of the floe properties between the rth floe in props_day1 and the sth floe in props_day2. Return a tuple of the ratios.\n\nArguments\n\nprops_day1: floe properties for day 1\nr: index of floe in props_day1\nprops_day2: floe properties for day 2\ns: index of floe in props_day2\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.compute_ratios_conditions-NTuple{4, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.compute_ratios_conditions","text":"compute_ratios_conditions((props_day1, r), (props_day2, s), delta_time, t)\n\nCompute the conditions for a match between the rth floe in props_day1 and the sth floe in props_day2. Return a tuple of the conditions.\n\nArguments\n\nprops_day1: floe properties for day 1\nr: index of floe in props_day1\nprops_day2: floe properties for day 2\ns: index of floe in props_day2\ndelta_time: time elapsed from image day 1 to image day 2\nt: tuple of thresholds for elapsed time and distance. See pair_floes for details.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.conditional_histeq","page":"IceFloeTracker.jl","title":"IceFloeTracker.conditional_histeq","text":"conditional_histeq(\ntrue_color_image,\nclouds_red,\nside_length::Int,\nentropy_threshold::AbstractFloat=4.0,\nwhite_threshold::AbstractFloat=25.5,\nwhite_fraction_threshold::AbstractFloat=0.4,\n\n)\n\nPerforms conditional histogram equalization on a true color image using tiles of approximately sidelength size side_length. If a perfect tiling is not possible, the tiling on the egde of the image is adjusted to ensure that the tiles are as close to side_length as possible. See get_tiles(array, side_length) for more details.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.conditional_histeq-2","page":"IceFloeTracker.jl","title":"IceFloeTracker.conditional_histeq","text":"conditional_histeq(\ntrue_color_image,\nclouds_red,\nrblocks::Int,\ncblocks::Int,\nentropy_threshold::AbstractFloat=4.0,\nwhite_threshold::AbstractFloat=25.5,\nwhite_fraction_threshold::AbstractFloat=0.4,\n\n)\n\nPerforms conditional histogram equalization on a true color image.\n\nArguments\n\ntrue_color_image: The true color image to be equalized.\nclouds_red: The land/cloud masked red channel of the false color image.\nrblocks: The number of row-blocks to divide the image into for histogram equalization. Default is 8.\ncblocks: The number of column-blocks to divide the image into for histogram equalization. Default is 6.\nentropy_threshold: The entropy threshold used to determine if a block should be equalized. Default is 4.0.\nwhite_threshold: The white threshold used to determine if a pixel should be considered white. Default is 25.5.\nwhite_fraction_threshold: The white fraction threshold used to determine if a block should be equalized. Default is 0.4.\n\nReturns\n\nThe equalized true color image.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.connected_background_count-Tuple{AbstractArray}","page":"IceFloeTracker.jl","title":"IceFloeTracker.connected_background_count","text":"connected_background_count(nhood)\n\nSecond lut generator for neighbor transform with diamond strel (4-neighborhood).\n\nTo be passed to the make_lut function.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.consolidate_matched_pairs-Tuple{IceFloeTracker.MatchedPairs}","page":"IceFloeTracker.jl","title":"IceFloeTracker.consolidate_matched_pairs","text":"consolidate_matched_pairs(matched_pairs::MatchedPairs)\n\nConsolidate the floe properties and similarity ratios of the matched pairs in matched_pairs into a single dataframe. Return the consolidated dataframe. Used in iteration 0.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.convertcentroid!-Tuple{Any, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.convertcentroid!","text":"convertcentroid!(propdf, latlondata, colstodrop)\n\nConvert the centroid coordinates from row and column to latitude and longitude dropping unwanted columns specified in colstodrop for the output data structure. Addionally, add columns x and y with the pixel coordinates of the centroid.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.converttounits!-Tuple{Any, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.converttounits!","text":"converttounits!(propdf, latlondata, colstodrop)\n\nConvert the floe properties from pixels to kilometers and square kilometers where appropiate. Also drop the columns specified in colstodrop.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.corr-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.corr","text":"corr(f1,f2)\n\nReturn the correlation between the psi-s curves p1 and p2.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.corr-Union{Tuple{T}, Tuple{T, T}} where T<:AbstractArray","page":"IceFloeTracker.jl","title":"IceFloeTracker.corr","text":"corr(f1,f2)\n\nReturn the normalized cross-correlation between the psi-s curves p1 and p2.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.counterclockwise-Tuple{Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.counterclockwise","text":"Make a counterclockwise turn from the dir direction\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.create_cloudmask-Tuple{Matrix{RGB{Float64}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.create_cloudmask","text":"create_cloudmask(false_color_image; prelim_threshold, band_7_threshold, band_2_threshold, ratio_lower, ratio_upper)\n\nConvert a 3-channel false color reflectance image to a 1-channel binary matrix; clouds = 0, else = 1. Default thresholds are defined in the published Ice Floe Tracker article: Remote Sensing of the Environment 234 (2019) 111406.\n\nArguments\n\nfalse_color_image: corrected reflectance false color image - bands [7,2,1]\nprelim_threshold: threshold value used to identify clouds in band 7, N0f8(RGB intensity/255)\nband_7_threshold: threshold value used to identify cloud-ice in band 7, N0f8(RGB intensity/255)\nband_2_threshold: threshold value used to identify cloud-ice in band 2, N0f8(RGB intensity/255)\nratio_lower: threshold value used to set lower ratio of cloud-ice in bands 7 and 2\nratio_upper: threshold value used to set upper ratio of cloud-ice in bands 7 and 2\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.create_landmask-Union{Tuple{T}, Tuple{T, AbstractMatrix{Bool}}} where T<:(AbstractMatrix)","page":"IceFloeTracker.jl","title":"IceFloeTracker.create_landmask","text":"create_landmask(landmask_image, struct_elem, fill_value_lower, fill_value_upper)\n\nConvert a 3-channel RGB land mask image to a 1-channel binary matrix, and use a structuring element to extend a buffer to mask complex coastal features. In the resulting mask, land = 0 and ocean = 1. Returns a named tuple with the dilated and non-dilated landmask.\n\nArguments\n\nlandmask_image: RGB land mask image from fetchdata\nstruct_elem: structuring element for dilation (optional)\nfill_value_lower: fill holes having at least these many pixels (optional)\nfill_value_upper: fill holes having at most these many pixels (optional)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.cropfloe-Tuple{Union{BitMatrix, Matrix{<:Integer}}, DataFrame, Integer}","page":"IceFloeTracker.jl","title":"IceFloeTracker.cropfloe","text":"cropfloe(floesimg, props, i)\n\nCrops the floe delimited by the bounding box data in props at index i from the floe image floesimg.\n\nIf the dataframe has bounding box data min_row, min_col, max_row, max_col, but no label, then returns the largest contiguous component.\n\nIf the dataframe has bounding box data min_row, min_col, max_row, max_col, and a label, then returns the component with the label. In this case, floesimg must be an Array{Int}.\n\nIf the dataframe has only a label and no bounding box data, then returns the component with the label, padded by one cell of zeroes on all sides. In this case, floesimg must be an Array{Int}.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.cropfloe-Union{Tuple{I}, Tuple{BitMatrix, I, I, I, I}} where I<:Integer","page":"IceFloeTracker.jl","title":"IceFloeTracker.cropfloe","text":"cropfloe(floesimg, min_row, min_col, max_row, max_col)\n\nCrops the floe delimited by min_row, min_col, max_row, max_col, from the floe image floesimg.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.cropfloe-Union{Tuple{J}, Tuple{I}, Tuple{Matrix{I}, J, J, J, J, I}} where {I<:Integer, J<:Integer}","page":"IceFloeTracker.jl","title":"IceFloeTracker.cropfloe","text":"cropfloe(floesimg, min_row, min_col, max_row, max_col, label)\n\nCrops the floe from floesimg with the label label, returning the region bounded by min_row, min_col, max_row, max_col, and converting to a BitMatrix.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.crosscorr-Union{Tuple{T}, Tuple{Vector{T}, Vector{T}}} where T<:Real","page":"IceFloeTracker.jl","title":"IceFloeTracker.crosscorr","text":"r, lags = crosscorr(u::Vector{T},\n v::Vector{T};\n normalize::Bool=false,\n padmode::Symbol=:longest)\n\nWrapper of DSP.xcorr with normalization (see https://docs.juliadsp.org/stable/convolutions/#DSP.xcorr)\n\nReturns the pair (r, lags) with the cross correlation scores r and corresponding lags according to padmode.\n\nArguments\n\nu,v: real vectors which could have unequal length.\nnormalize: return normalized correlation scores (false by default).\npadmode: either :longest (default) or :none to control padding of shorter vector with zeros.\n\nExamples\n\nThe example below builds two vectors, one a shifted version of the other, and computes various cross correlation scores.\n\njulia> n = 1:5;\n\njulia> x = 0.48.^n;\n\njulia> y = circshift(x,3);\n\njulia> r, lags = crosscorr(x,y,normalize=true);\n\njulia> [r lags]\n9×2 Matrix{Float64}:\n0.369648 -4.0\n0.947531 -3.0\n0.495695 -2.0\n0.3231 -1.0\n0.332519 0.0\n0.15019 1.0\n0.052469 2.0\n0.0241435 3.0\n0.00941878 4.0\n\njulia> r, lags = crosscorr(x,y,normalize=true,padmode=:none);\n\njulia> [r lags]\n9×2 Matrix{Float64}:\n0.369648 1.0\n0.947531 2.0\n0.495695 3.0\n0.3231 4.0\n0.332519 5.0\n0.15019 6.0\n0.052469 7.0\n0.0241435 8.0\n0.00941878 9.0\n\nThis final example builds two vectors of different length and computes some cross correlation scores.\n\njulia> n = 1:5; m = 1:3;\n\njulia> x = 0.48.^n; y = 0.48.^m;\n\njulia> r, lags = crosscorr(x,y,normalize=true);\n\njulia> [r lags]\n9×2 Matrix{Float64}:\n0.0 -4.0\n4.14728e-17 -3.0\n0.178468 -2.0\n0.457473 -1.0\n0.994189 0.0\n0.477211 1.0\n0.229061 2.0\n0.105402 3.0\n0.0411191 4.0\n\njulia> r, lags = crosscorr(x,y,normalize=true,padmode=:none);\n\njulia> [r lags]\n7×2 Matrix{Float64}:\n0.178468 1.0\n0.457473 2.0\n0.994189 3.0\n0.477211 4.0\n0.229061 5.0\n0.105402 6.0\n0.0411191 7.0\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.deleteallbut!-Tuple{Any, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.deleteallbut!","text":"deleteallbut!(matched_pairs, idxs, keeper)\n\nDelete all rows in matched_pairs except for the row with index keeper in idxs.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.detect_move!-Tuple{Matrix{Float64}, CartesianIndex{2}, CartesianIndex{2}, Int64, Vector{CartesianIndex}, BitVector, Vector{CartesianIndex{2}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.detect_move!","text":"Workhorse function: Get all pixel coords for detected border.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.discriminate_ice_water-Union{Tuple{T}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real, Real}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real, Real, Real}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real, Real, Real, Float64}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real, Real, Real, Float64, Float64}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real, Real, Real, Float64, Float64, Float64}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real, Real, Real, Float64, Float64, Float64, Float64}, Tuple{Matrix{RGB{Float64}}, Matrix{Gray{Float64}}, T, T, Float64, Float64, Float64, Real, Real, Real, Float64, Float64, Float64, Float64, Real}} where T<:(AbstractArray{Bool})","page":"IceFloeTracker.jl","title":"IceFloeTracker.discriminate_ice_water","text":"discriminate_ice_water(\nfalsecolor_image::Matrix{RGB{Float64}},\nnormalized_image::Matrix{Gray{Float64}},\nlandmask_bitmatrix::T,\ncloudmask_bitmatrix::T,\nfloes_threshold::Float64=Float64(100 / 255),\nmask_clouds_lower::Float64=Float64(17 / 255),\nmask_clouds_upper::Float64=Float64(30 / 255),\nkurt_thresh_lower::Real=2,\nkurt_thresh_upper::Real=8,\nskew_thresh::Real=4,\nst_dev_thresh_lower::Float64=Float64(84 / 255),\nst_dev_thresh_upper::Float64=Float64(98.9 / 255),\nclouds_ratio_threshold::Float64=0.02,\ndiffer_threshold::Float64=0.6,\nnbins::Real=155\n\n)\n\nGenerates an image with ice floes apparent after filtering and combining previously processed versions of falsecolor and truecolor images from the same region of interest. Returns an image ready for segmentation to isolate floes.\n\nNote: This function mutates the landmask object to avoid unnecessary memory allocation. If you need the original landmask, make a copy before passing it to this function. Example: discriminate_ice_water(falsecolor_image, normalized_image, copy(landmask_bitmatrix), cloudmask_bitmatrix)\n\nArguments\n\nfalsecolor_image: input image in false color reflectance\nnormalized_image: normalized version of true color image\nlandmask_bitmatrix: landmask for region of interest\ncloudmask_bitmatrix: cloudmask for region of interest\nfloes_threshold: heuristic applied to original false color image\nmask_clouds_lower: lower heuristic applied to mask out clouds\nmask_clouds_upper: upper heuristic applied to mask out clouds\nkurt_thresh_lower: lower heuristic used to set pixel value threshold based on kurtosis in histogram\nkurt_thresh_upper: upper heuristic used to set pixel value threshold based on kurtosis in histogram\nskew_thresh: heuristic used to set pixel value threshold based on skewness in histogram\nst_dev_thresh_lower: lower heuristic used to set pixel value threshold based on standard deviation in histogram\nst_dev_thresh_upper: upper heuristic used to set pixel value threshold based on standard deviation in histogram\nclouds2_threshold: heuristic used to set pixel value threshold based on ratio of clouds\ndiffer_threshold: heuristic used to calculate proportional intensity in histogram\nnbins: number of bins during histogram build\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.dist-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.dist","text":"dist(p1, p2)\n\nReturn the distance between the points p1 and p2.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.filt_except_label!-Tuple{Matrix{Int64}, Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.filt_except_label!","text":"filt_except_label!(labeled_arr::Array{Int64, 2}, label::Int64)\n\nIn-place version of filt_except_label.\n\nSee also filt_except_label \n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.filt_except_label-Tuple{Matrix{Int64}, Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.filt_except_label","text":"filt_except_label(labeled_arr::Array{Int64, 2}, label::Int64)\n\nMake 0 all values in labeled_arr that are not equal to label.\n\nSee also filt_except_label! \n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.find_floe_matches-Union{Tuple{T}, Tuple{T, T, Any, Any}} where T<:DataFrames.AbstractDataFrame","page":"IceFloeTracker.jl","title":"IceFloeTracker.find_floe_matches","text":"find_floe_matches(\ntracked,\ncandidate_props,\ncondition_thresholds,\nmc_thresholds\n\n)\n\nFind matches for floes in tracked from floes in candidate_props.\n\nArguments\n\ntracked: dataframe containing floe trajectories.\ncandidate_props: dataframe containing floe candidate properties.\ncondition_thresholds: thresholds for deciding whether to match floe i from tracked to floe j from candidate_props\nmc_thresholds: thresholds for area mismatch and psi-s shape correlation\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.find_ice_labels-Tuple{Matrix{RGB{Float64}}, BitMatrix}","page":"IceFloeTracker.jl","title":"IceFloeTracker.find_ice_labels","text":"find_ice_labels(falsecolor_image, landmask; band_7_threshold, band_2_threshold, band_1_threshold, band_7_relaxed_threshold, band_1_relaxed_threshold, possible_ice_threshold)\n\nLocate the pixels of likely ice from false color reflectance image. Returns a binary mask with ice floes contrasted from background. Default thresholds are defined in the published Ice Floe Tracker article: Remote Sensing of the Environment 234 (2019) 111406.\n\nArguments\n\nfalsecolor_image: corrected reflectance false color image - bands [7,2,1]\nlandmask: bitmatrix landmask for region of interest\nband_7_threshold: threshold value used to identify ice in band 7, N0f8(RGB intensity/255)\nband_2_threshold: threshold value used to identify ice in band 2, N0f8(RGB intensity/255)\nband_1_threshold: threshold value used to identify ice in band 2, N0f8(RGB intensity/255)\nband_7_relaxed_threshold: threshold value used to identify ice in band 7 if not found on first pass, N0f8(RGB intensity/255)\nband_1_relaxed_threshold: threshold value used to identify ice in band 1 if not found on first pass, N0f8(RGB intensity/255)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.find_reflectance_peaks-Tuple{Union{SubArray{Float64, 2, Base.ReinterpretArray{Float64, 3, RGB{Float64}, Matrix{RGB{Float64}}, true}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}}, false}, Matrix{Float64}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.find_reflectance_peaks","text":"find_reflectance_peaks(reflectance_channel, possible_ice_threshold;)\n\nFind histogram peaks in single channels of a reflectance image and return the second greatest peak. If needed, edges can be returned as the first object from build_histogram. Similarly, peak values can be returned as the second object from findmaxima.\n\nArguments\n\nreflectance_channel: either band 2 or band 1 of false-color reflectance image\npossible_ice_threshold: threshold value used to identify ice if not found on first or second pass\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.fixzeroindexing!-Union{Tuple{T}, Tuple{DataFrame, Vector{T}}} where T<:Union{String, Symbol}","page":"IceFloeTracker.jl","title":"IceFloeTracker.fixzeroindexing!","text":"fixzeroindexing!(props::DataFrame, props_to_fix::Vector{T}) where T<:Union{Symbol,String}\n\nFix the zero-indexing of the props_to_fix columns in props by adding 1 to each element.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.fname_ext_splice-Tuple{String, String}","page":"IceFloeTracker.jl","title":"IceFloeTracker.fname_ext_splice","text":"fname_ext_splice(fname, ext)\n\nJoin \"fname\" and \"ext\" with '.'.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.fname_ext_split-Tuple{String}","page":"IceFloeTracker.jl","title":"IceFloeTracker.fname_ext_split","text":"fname_ext_split(fname)\n\nSplit \"fname.ext\" into \"fname\" and \"ext\".\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.from_to-Tuple{CartesianIndex, CartesianIndex, Vector{CartesianIndex{2}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.from_to","text":"Get index in Moore neigborhood representing the direction from the from pixel coords to the to pixel coords (see definition of dir_delta below).\n\nClockwise Moore neighborhood.\n\ndir_delta = [CartesianIndex(-1, 0), CartesianIndex(-1, 1), CartesianIndex(0, 1), CartesianIndex(1, 1), CartesianIndex(1, 0), CartesianIndex(1, -1), CartesianIndex(0, -1), CartesianIndex(-1,-1)]\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_area_missed-Tuple{Int64, Tuple{Int64, Int64}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_area_missed","text":"get_area_missed(side_length::Int, dims::Tuple{Int,Int})::Float64\n\nCalculate the proportion of the area that is not covered by tiles of a given side length.\n\nArguments\n\nside_length::Int: The side length of the tile.\ndims::Tuple{Int,Int}: A tuple representing the dimensions (width, height).\n\nReturns\n\nFloat64: The proportion of the area that is not covered by the tiles.\n\nExamples\n\n``` julia> getareamissed(5, (10, 20)) 0.0\n\njulia> getareamissed(7, (10, 20)) 0.51\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_areas-Union{Tuple{Matrix{T}}, Tuple{T}} where T","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_areas","text":"get_areas(labeled_arr::Array{T, 2})::Dict{T, Int} where T\n\nGet the \"areas\" (count of pixels of a given label) of the connected components in labeled_arr.\n\nReturn a dictionary with the frequency distribution: label => countoflabel.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_brighten_mask-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_brighten_mask","text":"get_brighten_mask(equalized_gray_reconstructed_img, gamma_green)\n\nArguments\n\nequalized_gray_reconstructed_img: The equalized gray reconstructed image (uint8 in Matlab).\ngamma_green: The gamma value for the green channel (also uint8).\n\nReturns\n\nDifference equalizedgrayreconstructedimg - gammagreen clamped between 0 and 255.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_dt-NTuple{4, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_dt","text":"get_dt(props1, r, props2, s)\n\nReturn the time difference between the rth floe in props1 and the sth floe in props2 in minutes.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_final","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_final","text":"get_final(img, label, segment_mask, se_erosion, se_dilation)\n\nFinal processing following the tiling workflow.\n\nArguments\n\nimg: The input image.\nlabel: Mode of most common label in the findicelabels workflow.\nsegment_mask: The segment mask.\nse_erosion: structuring element for erosion.\nse_dilation: structuring element for dilation.\napply_segment_mask=true: Whether to filter img the segment mask.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.get_ice_masks-Union{Tuple{S}, Tuple{T}, Tuple{Matrix{RGB{FixedPointNumbers.N0f8}}, Matrix{<:Integer}, BitMatrix, S}, Tuple{Matrix{RGB{FixedPointNumbers.N0f8}}, Matrix{<:Integer}, BitMatrix, S, Bool}} where {T<:Integer, S<:AbstractMatrix{Tuple{UnitRange{Int64}, UnitRange{Int64}}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_ice_masks","text":"get_ice_masks(\n falsecolor_image,\n morph_residue,\n landmask,\n tiles,\n binarize;\n band_7_threshold,\n band_2_threshold,\n band_1_threshold,\n band_7_threshold_relaxed,\n band_1_threshold_relaxed,\n possible_ice_threshold,\n k,\n factor\n)\n\nGet the ice masks from the falsecolor image and morphological residue given a particular tiling configuration.\n\nArguments\n\nfalsecolor_image: The falsecolor image.\nmorph_residue: The morphological residue image.\nlandmask: The landmask.\ntiles: The tiles.\nbinarize::Bool=true: Whether to binarize the tiling.\nband_7_threshold=5: The threshold for band 7.\nband_2_threshold=230: The threshold for band 2.\nband_1_threshold=240: The threshold for band 1.\nband_7_threshold_relaxed=10: The relaxed threshold for band 7.\nband_1_threshold_relaxed=190: The relaxed threshold for band 1.\npossible_ice_threshold=75: The threshold for possible ice.\nk=3: The number of clusters to use for k-means segmentation.\nfactor=255: normalization factor to convert images to uint8.\n\nReturns\n\nA named tuple (icemask, bin) where:\nicemask: The ice mask.\nbin: The binarized tiling.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_matches-Tuple{IceFloeTracker.MatchedPairs}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_matches","text":"get_matches(matched_pairs)\n\nReturn a dataframe with the properties and goodness ratios of the matched pairs (right-hand matches) in matched_pairs. Used in iterations 1:end.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_max_label-Tuple{Dict{Int64, Int64}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_max_label","text":"get_max_label(d::Dict{Int, Int})\n\nGet the label k in dictionary d for which d[k] is maximal.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_optimal_tile_size-Tuple{Int64, Tuple{Int64, Int64}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_optimal_tile_size","text":"get_optimal_tile_size(l0::Int, dims::Tuple{Int,Int}) -> Int\n\nCalculate the optimal tile size in the range [l0-1, l0+1] for the given size l0 and image dimensions dims.\n\nDescription\n\nThis function computes the optimal tile size for tiling an area with given dimensions. It ensures that the initial tile size l0 is at least 2 and not larger than any of the given dimensions. The function evaluates candidate tile sizes and selects the one that minimizes the area missed by its corresponding tiling. In case of a tie, it prefers the larger tile size.\n\nExample\n\njulia> get_optimal_tile_size(3, (10, 7))\n2\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_rgb_channels-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_rgb_channels","text":"get_rgb_channels(img)\n\nGet the RBC (Red, Blue, and Green) channels of an image.\n\nArguments\n\nimg: The input image.\n\nReturns\n\nAn m x n x 3 array the Red, Blue, and Green channels of the input image.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_tile_dims-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_tile_dims","text":"get_tile_dims(tile)\n\nCalculate the dimensions of a tile.\n\nArguments\n\ntile::Tuple{UnitRange{Int},UnitRange{Int}}: A tuple representing the tile dimensions.\n\nReturns\n\nTuple{Int,Int}: A tuple representing the width and height of the tile.\n\nExamples\n\n```julia julia> gettiledims((1:3, 1:4)) (4, 3)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_tile_meta-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_tile_meta","text":"get_tile_meta(tile)\n\nExtracts metadata from a given tile.\n\nArguments\n\ntile: A collection of tuples, where each tuple represents a coordinate pair.\n\nReturns\n\nA tuple (a, b, c, d) where:\na: The first element of the first tuple in tile.\nb: The last element of the first tuple in tile.\nc: The first element of the last tuple in tile.\nd: The last element of the last tuple in tile.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_tiles-Tuple{Any, Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_tiles","text":"get_tiles(array, side_length)\n\nGenerate a collection of tiles from an array.\n\nUnlike TileIterator, the function adjusts the bottom and right edges of the tile matrix if they are smaller than half the tile size side_length.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_tiles-Union{Tuple{T}, Tuple{Any, Tuple{T, T}}} where T<:Int64","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_tiles","text":"get_tiles(array, t::Tuple{Int,Int})\n\nGenerate a collection of tiles from an array.\n\nThe function adjusts the bottom and right edges of the tile matrix if they are smaller than half the tile sizes in t.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_trajectory_heads-Tuple{T} where T<:DataFrames.AbstractDataFrame","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_trajectory_heads","text":"get_trajectory_heads(pairs)\n\nReturn the last row (most recent member) of each group (trajectory) in pairs as a dataframe.\n\nThis is used for getting the initial floe properties for the next day in search for new pairs.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.get_unmatched-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.get_unmatched","text":"get_unmatched(props, matched)\n\nReturn the floes in props that are not in matched.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getbboxcolumns-Tuple{DataFrame}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getbboxcolumns","text":"getbboxcolumns(props::DataFrame)\n\nReturn the column names of the bounding box columns in props.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getbestmatchdata-NTuple{4, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getbestmatchdata","text":"getbestmatchdata(idx, r, props_day1, matching_floes)\n\nCollect the data for the best match between the rth floe in props_day1 and the idxth floe in matching_floes. Return a tuple of the floe properties for day 1 and day 2 and the ratios.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getcentroid-Tuple{DataFrame, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getcentroid","text":"getcentroid(props_day::DataFrame, r)\n\nGet the coordinates of the rth floe in props_day.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getcentroidcolumns-Tuple{DataFrame}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getcentroidcolumns","text":"getcentroidcolumns(props::DataFrame)\n\nReturns the column names of the centroid columns in props.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getcollisions-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getcollisions","text":"getcollisions(matchedpairs)\n\nGet nonunique rows in matchedpairs.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getcollisionslocs-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getcollisionslocs","text":"getcollisionslocs(df)\n\nReturn a vector of tuples of the row and the index of the row in df that has a collision with another row in df.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getfit-Tuple{Tuple{Int64, Int64}, Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getfit","text":"getfit(dims::Tuple{Int,Int}, side_length::Int)::Tuple{Int,Int}\n\nCalculate how many tiles of a given side length fit into the given dimensions.\n\nArguments\n\ndims::Tuple{Int,Int}: A tuple representing the dimensions (width, height).\nside_length::Int: The side length of the tile.\n\nReturns\n\nTuple{Int,Int}: A tuple representing the number of tiles that fit along each dimension.\n\nExamples\n\n``` julia> getfit((10, 20), 5) (2, 4)\n\njulia> getfit((15, 25), 5) (3, 5)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getfloemasks-Tuple{DataFrame, Union{BitMatrix, Matrix{<:Integer}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getfloemasks","text":"getfloemasks(props::DataFrame, floeimg::BitMatrix)\n\nReturn a vector of cropped floe masks from floeimg using the bounding box data in props.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getidxmostminimumeverything-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getidxmostminimumeverything","text":"getidxmostminimumeverything(ratiosdf)\n\nReturn the index of the row in ratiosdf with the most minima across its columns. If there are multiple columns with the same minimum value, return the index of the first column with the minimum value. If ratiosdf is empty, return NaN.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getidxofrow-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getidxofrow","text":"getidxofrow(rw0, df)\n\nReturn the indices of the rows in df that are equal to rw0.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getpropsday1day2-Tuple{Any, Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getpropsday1day2","text":"getpropsday1day2(properties, dayidx::Int64)\n\nReturn the floe properties for day dayidx and day dayidx+1.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.getsizecomparability-Union{Tuple{T}, Tuple{T, T}} where T<:Tuple{Int64, Int64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.getsizecomparability","text":"getsizecomparability(s1, s2)\n\nCheck if the size of two floes s1 and s2 are comparable. The size is defined as the product of the floe dimensions.\n\nArguments\n\ns1: size of floe 1\ns2: size of floe 2\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.grad-Tuple{Matrix{<:Number}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.grad","text":"dx, dy = grad(A::Matrix{<:Number})\n\nMake gradient vector field for the set of points with coordinates in the rows of the matrix A with x-coordinates down column 1 and y-coordinates down column 2. Return a tuple with dx and dy in that order. \n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.grad-Tuple{Vector{<:Number}, Vector{<:Number}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.grad","text":"dx, dy = grad(x::Vector{<:Number}, y::Vector{<:Number})\n\nMake gradient vector field for the set of points with coordinates in vectors x and y. Return a tuple with dx and dy in that order. \n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.hbreak!-Tuple{T} where T<:(AbstractArray{Bool})","page":"IceFloeTracker.jl","title":"IceFloeTracker.hbreak!","text":"hbreak!(img::AbstractArray{Bool})\n\nInplace version of hbreak. See also hbreak.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.hbreak-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.hbreak","text":"hbreak(img::AbstractArray{Bool})\n\nRemove H-connected pixels in the binary image img. See also hbreak! for an inplace version of this function.\n\nExamples\n\n```jldoctest; setup = :(using IceFloeTracker)\n\njulia> h1 = trues(3,3); h1[[1 3], 2] .= false; h1 3×3 BitMatrix: 1 0 1 1 1 1 1 0 1\n\njulia> h2 = trues(3,3); h2[2, [1 3]] .= false; h2 3×3 BitMatrix: 1 1 1 0 1 0 1 1 1\n\njulia> hbreak!(h1); h1 # modify h1 inplace 3×3 BitMatrix: 1 0 1 1 0 1 1 0 1\n\njulia> hbreak(h2) 3×3 BitMatrix: 1 1 1 0 0 0 1 1 1\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.histeq-Tuple{S} where S<:(AbstractArray{<:Integer})","page":"IceFloeTracker.jl","title":"IceFloeTracker.histeq","text":"histeq(img)\nhisteq(img; nbins=64)\n\nHistogram equalization of img using nbins bins.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.imadjust-Union{Tuple{AbstractArray{<:Integer}}, Tuple{T}} where T<:AbstractFloat","page":"IceFloeTracker.jl","title":"IceFloeTracker.imadjust","text":"imadjust(img; low, high)\n\nAdjust the contrast of an image using linear stretching. The image is normalized to [0, 1] and then stretched to the range [low, high].\n\nArguments\n\nimg: The input image.\nlow: The lower bound of the stretched image. Default is 0.01.\nhigh: The upper bound of the stretched image. Default is 0.99.\n\nReturns\n\nThe contrast-adjusted image in the range [0, 255].\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.imbrighten-Tuple{Any, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.imbrighten","text":"imbrighten(img, brighten_mask, bright_factor)\n\nBrighten the image using a mask and a brightening factor.\n\nArguments\n\nimg: The input image.\nbrighten_mask: A mask indicating the pixels to brighten.\nbright_factor: The factor by which to brighten the pixels.\n\nReturns\n\nThe brightened image.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.imextendedmin","page":"IceFloeTracker.jl","title":"IceFloeTracker.imextendedmin","text":"imextendedmin(img)\n\nMimics MATLAB's imextendedmin function that computes the extended-minima transform, which is the regional minima of the H-minima transform. Regional minima are connected components of pixels with a constant intensity value. This function returns a transformed bitmatrix.\n\nArguments\n\nimg: image object\nh: suppress minima below this depth threshold\nconn: neighborhood connectivity; in 2D 1 = 4-neighborhood and 2 = 8-neighborhood\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.imgradientmag-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.imgradientmag","text":"imgradientmag(img)\n\nCompute the gradient magnitude of an image using the Sobel operator.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.imhist","page":"IceFloeTracker.jl","title":"IceFloeTracker.imhist","text":"imhist(img, imgtype::AbstractString=\"uint8\")\n\nCompute the histogram of an image where each possible value is represented in the histogram. The function returns a tuple with the bins and counts of each bin.\n\nExample\n\n```jldoctest; setup = :(using IceFloeTracker) julia> img = [ 4 4 4 4 4 3 4 5 4 3 3 5 5 5 3 3 4 5 4 3 4 4 4 4 4 ]\n\njulia> bins, heights = imhist(img);\n\njulia> [bins[heights .> 0] heights[heights .>0]] # display only non-zero bins and heights 3×2 Matrix{Int64}: 3 6 4 14 5 5\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.impose_minima-Union{Tuple{T}, Tuple{AbstractArray{T}, AbstractArray{Bool}}} where T<:Integer","page":"IceFloeTracker.jl","title":"IceFloeTracker.impose_minima","text":"impose_minima(I::AbstractArray{T}, BW::AbstractArray{Bool}) where {T<:Integer}\n\nUse morphological reconstruction to enforce minima on the input image I at the positions where the binary mask BW is non-zero.\n\nIt supports both integer and grayscale images using different implementations for each.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.imregionalmin","page":"IceFloeTracker.jl","title":"IceFloeTracker.imregionalmin","text":"imregionalmin(img, conn=2)\n\nCompute the regional minima of the image img using the connectivity conn.\n\nReturns a bitmatrix of the same size as img with the regional minima.\n\nArguments\n\nimg: Image object\nconn: Neighborhood connectivity; in 2D, 1 = 4-neighborhood and 2 = 8-neighborhood\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.imsharpen","page":"IceFloeTracker.jl","title":"IceFloeTracker.imsharpen","text":"imsharpen(truecolor_image, landmask_no_dilate, lambda, kappa, niters, nbins, rblocks, cblocks, clip, smoothing_param, intensity)\n\nSharpen truecolor_image.\n\nArguments\n\ntruecolor_image: input image in truecolor\nlandmask_no_dilate: landmask for region of interest\nlambda: speed of diffusion (0–0.25)\nkappa: conduction coefficient for diffusion (25–100)\nniters: number of iterations of diffusion\nnbins: number of bins during histogram equalization\nrblocks: number of row blocks to divide input image during equalization\ncblocks: number of column blocks to divide input image during equalization\nclip: Thresholds for clipping histogram bins (0–1); values closer to one minimize contrast enhancement, values closer to zero maximize contrast enhancement\nsmoothing_param: pixel radius for gaussian blurring (1–10)\nintensity: amount of sharpening to perform\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.imsharpen_gray-Tuple{Matrix{Float64}, AbstractArray{Bool}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.imsharpen_gray","text":"imsharpen_gray(imgsharpened, landmask)\n\nApply landmask and return Gray type image in colorview for normalization.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.isfloegoodmatch-NTuple{4, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.isfloegoodmatch","text":"isfloegoodmatch(conditions, mct, area_mismatch, corr)\n\nReturn true if the floes are a good match as per the set thresholds. Return false otherwise.\n\nArguments\n\nconditions: tuple of booleans for evaluating the conditions\nmct: tuple of thresholds for the match correlation test\narea_mismatch and corr: values returned by match_corr\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.isincountourlist-Tuple{Union{Tuple{Int64, Int64}, CartesianIndex{2}}, Vector{Vector{CartesianIndex}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.isincountourlist","text":"Check P is in countour list if so return the index of the contour that contains P, otherwise return false.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.ismember-Tuple{Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.ismember","text":"ismember(df1,df2)\n\nReturn a boolean array indicating whether each row in df1 is a member of df2.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.kmeans_segmentation","page":"IceFloeTracker.jl","title":"IceFloeTracker.kmeans_segmentation","text":"kmeans_segmentation(gray_image, ice_labels;)\n\nApply k-means segmentation to a gray image to isolate a cluster group representing sea ice. Returns a binary image with ice segmented from background.\n\nArguments\n\ngray_image: output image from ice-water-discrimination.jl or gray ice floe leads image in segmentation_f.jl\nice_labels: vector if pixel coordinates output from find_ice_labels.jl\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.loadimg-Tuple{}","page":"IceFloeTracker.jl","title":"IceFloeTracker.loadimg","text":"loadimg(; dir::String, fname::String)\n\nLoad an image from dir with filename fname into a matrix of Float64 values. Returns the loaded image.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.long_tracker-Tuple{Vector{DataFrame}, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.long_tracker","text":"long_tracker(props, condition_thresholds, mc_thresholds)\n\nTrack ice floes over multiple days.\n\nTrajectories are built in two steps:\n\nGet pairs of floes in day 1 and day 2. Any unmatched floes, in both day 1 and day 2, become the \"heads\" of their respective trajectories.\nFor each subsequent day, find pairs of floes for the current trajectory heads. Again, any unmatched floe in the new prop table starts a new trajectory.\n\nArguments\n\nprops::Vector{DataFrame}: A vector of DataFrames, each containing ice floe properties for a single day. Each DataFrame must have the following columns:\n\"area\"\n\"min_row\"\n\"min_col\"\n\"max_row\"\n\"max_col\"\n\"row_centroid\"\n\"col_centroid\"\n\"convex_area\"\n\"majoraxislength\"\n\"minoraxislength\"\n\"orientation\"\n\"perimeter\"\n\"mask\": 2D array of booleans\n\"passtime\": A timestamp for the floe\n\"psi\": the psi-s curve for the floe\n\"uuid\": a universally unique identifier for each segmented floe\ncondition_thresholds: 3-tuple of thresholds (each a named tuple) for deciding whether to match floe i from day k to floe j from day k+1\nmc_thresholds: thresholds for area mismatch and psi-s shape correlation\n\nReturns\n\nA DataFrame with the above columns, plus two extra columns, \"area_mismatch\" and \"corr\", which are the area mismatch and correlation between a floe and the one that follows it in the trajectory. Trajectories are identified by a unique identifier, \"uuid\".\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.make_filename-Tuple{}","page":"IceFloeTracker.jl","title":"IceFloeTracker.make_filename","text":"make_filename()\n\nMakes default filename with timestamp.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.make_hbreak_dict-Tuple{}","page":"IceFloeTracker.jl","title":"IceFloeTracker.make_hbreak_dict","text":"make_hbreak_dict()\n\nBuild dict with the two versions of an H-connected 3x3 neighboorhood.\n\nh1 = [1 0 1 1 1 1 1 0 1] \n\nh2 = [1 1 1 0 1 0 1 1 1] \n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.make_lut-Tuple{Function}","page":"IceFloeTracker.jl","title":"IceFloeTracker.make_lut","text":"make_lut(lutfunc::Function)\n\nGenerate lookup table (lut) for 3x3 neighborhoods according to lutfunc.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.make_psi_s-Tuple{Matrix{<:Number}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.make_psi_s","text":"make_psi_s(XY::Matrix{<:Number};rangeout::Bool=true,\nunwrap::Bool=true)\n\nAlternate method of make_psi_s accepting input vectors x and y as a 2-column matrix [x y] in order to facillitate workflow (output from resample_boundary).\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.make_psi_s-Tuple{Vector{<:Number}, Vector{<:Number}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.make_psi_s","text":"make_psi_s(x::Vector{<:Number},\n y::Vector{<:Number};\n rangeout::Bool=true,\n unwrap::Bool=true)::Tuple{Vector{Float64}, Vector{Float64}}\n\nBuilds the ψ-s curve defined by vectors x and y.\n\nReturns a tuple of vectors with the phases ψ in the first component and the traversed arclength in the second component. \n\nFollowing the convention in [1], the wrapped ψ-s curve has values in [0, 2π) by default; use rangeout to control this behavior.\n\nSee also bwtraceboundary, resample_boundary\n\nArguments\n\nx: Vector of x-coordinates\ny: corresponding vector of y-coordinates\nrangeout: true (default) for phase values in [0, 2π); false for phase values in (-π, π].\nunwrap: set to true to get \"unwrapped\" phases (default). \n\nReference\n\n[1] McConnell, Ross, et al. \"psi-s correlation and dynamic time warping: two methods for tracking ice floes in SAR images.\" IEEE Transactions on Geoscience and Remote sensing 29.6 (1991): 1004-1012.\n\nExample\n\nThe example below builds a cardioid and obtains its ψ-s curve.\n\njulia> t = range(0,2pi,201);\n\njulia> x = @. cos(t)*(1-cos(t));\n\njulia> y = @. sin(t)*(1-cos(t));\n\njulia> plot(x,y) # visualize the cardioid\n\njulia> psi, s = make_psi_s(x,y);\n\njulia> [s psi] # inspect psi-s data\n200×2 Matrix{Float64}:\n 0.00049344 0.0314159\n 0.0019736 0.0733034\n 0.00444011 0.11938\n 0.00789238 0.166055\n 0.0123296 0.212929\n 0.0177505 0.259894\n 0.024154 0.306907\n 0.0315383 0.35395\n 0.0399017 0.401012\n 0.0492421 0.448087\n ⋮\n 7.96772 9.02377\n 7.97511 9.07083\n 7.98151 9.11787\n 7.98693 9.16488\n 7.99137 9.21185\n 7.99482 9.25872\n 7.99729 9.3054\n 7.99877 9.35147\n 7.99926 9.39336\n\n julia> plot(s, psi) # inspect psi-s curve -- should be a straight line from (0, 0) to (8, 3π)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.makecontourstartatP-Tuple{CartesianIndex{2}, Vector{CartesianIndex}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.makecontourstartatP","text":"Make contour start at point P by permuting the elements in contour.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.makeemptydffrom-Tuple{DataFrame}","page":"IceFloeTracker.jl","title":"IceFloeTracker.makeemptydffrom","text":"makeemptydffrom(df::DataFrame)\n\nReturn an object with an empty dataframe with the same column names as df and an empty dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.makeemptyratiosdf-Tuple{}","page":"IceFloeTracker.jl","title":"IceFloeTracker.makeemptyratiosdf","text":"makeemptyratiosdf()\n\nReturn an empty dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.matchcorr-Union{Tuple{F}, Tuple{S}, Tuple{T}, Tuple{T, T, F}} where {T<:AbstractMatrix{Bool}, S<:Int64, F<:Float64}","page":"IceFloeTracker.jl","title":"IceFloeTracker.matchcorr","text":"matchcorr(\nf1::T,\nf2::T,\nΔt::F,\nmxrot::S=10,\npsi::F=0.95,\nsz::S=16,\ncomp::F=0.25,\nmm::F=0.22\n)\nwhere {T<:AbstractArray{Bool,2},S<:Int64,F<:Float64}\n\nCompute the mismatch mm and psi-s-correlation c for floes with masks f1 and f2.\n\nThe criteria for floes to be considered equivalent is as follows: - c greater than mm - _mm is less than mm\n\nA pair of NaN is returned for cases for which one of their mask dimension is too small or their sizes are not comparable.\n\nArguments\n\nf1: mask of floe 1\nf2: mask of floe 2\nΔt: time difference between floes\nmxrot: maximum rotation (in degrees) allowed between floesn (default: 10)\npsi: psi-s-correlation threshold (default: 0.95)\nsz: size threshold (default: 16)\ncomp: size comparability threshold (default: 0.25)\nmm: mismatch threshold (default: 0.22)\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.mean-Union{Tuple{T}, Tuple{T, T}} where T<:Real","page":"IceFloeTracker.jl","title":"IceFloeTracker.mean","text":"mean(x,y)\n\nCompute the mean of x and y.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.mismatch","page":"IceFloeTracker.jl","title":"IceFloeTracker.mismatch","text":"mismatch(fixed::AbstractArray,\n moving::AbstractArray,\n mxshift::Tuple{Int64, Int64}=(10,10),\n mxrot::Float64=pi/4;\n kwargs...\n )\n\nEstimate a rigid transformation (translation + rotation) that minimizes the 'mismatch' of aligning moving with fixed using the QuadDIRECT algorithm.\n\nReturns a pair with the mismatch score mm and the associated registration angle rot.\n\nArguments\n\nfixed,moving: images to align via a rigid transformation\nmxshift: maximum allowed translation in units of array indices (default set to (10,10))\nmxrot: maximum allowed rotation in radians (default set to π/4)\nthresh: minimum sum-of-squared-intensity overlap between the images (default is 10% of the sum-of-squared-intensity of fixed)\nkwargs: other arguments such as tol, ftol, and fvalue (see QuadDIRECT.analyze for details)\n\n```\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.modenan-Tuple{AbstractVector{<:Int64}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.modenan","text":"modenan(x::AbstractVector{<:Float64})\n\nReturn the mode of x or NaN if x is empty.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.morph_fill-Tuple{T} where T<:(AbstractArray{Bool})","page":"IceFloeTracker.jl","title":"IceFloeTracker.morph_fill","text":"morph_fill(bw::T)::T where {T<:AbstractArray{Bool}}\n\nFill holes in binary image bw by setting 0-valued pixels to 1 if they are surrounded by 1-valued pixels.\n\nExamples\n\n```jldoctest; setup = :(using IceFloeTracker) julia> bw = Bool[ 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 1 1 1 0 0 0 0 0 0 ];\n\njulia> morph_fill(bw) 5×5 Matrix{Bool}: 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.move-Tuple{CartesianIndex{2}, Matrix{Float64}, Int64, Vector{CartesianIndex{2}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.move","text":"move from current pixel to the next in given direction\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.norm-Tuple{Vector{<:Number}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.norm","text":"norm(v)\n\nGet the euclidean norm of the vector v.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.normalize_image-Union{Tuple{T}, Tuple{Matrix{Float64}, T, BitMatrix, ImageMorphology.MorphologySEArray{2}}} where T<:AbstractMatrix{Gray{Float64}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.normalize_image","text":"normalize_image(image_sharpened, image_sharpened_gray, landmask, struct_elem;)\n\nAdjusts sharpened land-masked image to highlight ice floe features.\n\nDoes reconstruction and landmasking to image_sharpened.\n\nArguments\n\nimage_sharpened: sharpened image (output of imsharpen)\nimage_sharpened_gray: grayscale, landmasked sharpened image (output of imsharpen_gray(image_sharpened))\nlandmask: landmask for region of interest\nstruct_elem: structuring element for dilation\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.normalizeangle","page":"IceFloeTracker.jl","title":"IceFloeTracker.normalizeangle","text":"normalizeangle(revised,t=180)\n\nNormalize angle to be between -180 and 180 degrees.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.padnhood-Tuple{Any, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.padnhood","text":"padnhood(img, I, nhood)\n\nPad the matrix img[nhood] with zeros according to the position of I within the edgesimg.\n\nReturns img[nhood] if I is not an edge index.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.pairfloes-Tuple{Vector{<:Union{BitMatrix, Matrix{<:Integer}}}, Vector{DataFrame}, Vector{DateTime}, AbstractString, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.pairfloes","text":"pairfloes(\nsegmented_imgs::Vector{BitMatrix},\nprops::Vector{DataFrame},\npasstimes::Vector{DateTime},\nlatlonrefimage::AbstractString,\ncondition_thresholds,\nmc_thresholds,\n\n)\n\nPair floes in props[k] to floes in props[k+1] for k=1:length(props)-1.\n\nThe main steps of the algorithm are as follows:\n\nCrop floes from segmented_imgs using bounding box data in props. Floes in the edges are removed.\nFor each floekr in props[k], compare to floek+1s in props[k+1] by computing similarity ratios, set of conditions, and drift distance dist. If the conditions are met, compute the area mismatch mm and psi-s correlation c for this pair of floes. Pair these two floes if mm and c satisfy the thresholds in mc_thresholds.\nIf there are collisions (i.e. floe s in props[k+1] is paired to more than one floe in props[k]), then the floe in props[k] with the best match is paired to floe s in props[k+1].\nDrop paired floes from props[k] and props[k+1] and repeat steps 2 and 3 until there are no more floes to match in props[k].\nRepeat steps 2-4 for k=2:length(props)-1.\n\nArguments\n\nsegmented_imgs: array of images with segmented floes\nprops: array of dataframes containing floe properties\npasstimes: array of DateTime objects containing the time of the image in which the floes were captured\nlatlonrefimage: path to geotiff reference image for getting latitude and longitude of floe centroids\ncondition_thresholds: 3-tuple of thresholds (each a named tuple) for deciding whether to match floe i from day k to floe j from day k+1\nmc_thresholds: thresholds for area mismatch and psi-s shape correlation\n\nReturns a dataframe containing the following columns:\n\nID: unique ID for each floe pairing.\npasstime: time of the image in which the floes were captured.\narea: area of the floe in sq. kilometers\nconvex_area: area of the convex hull of the floe in sq. kilometers\nmajor_axis_length: length of the major axis of the floe in kilometers\nminor_axis_length: length of the minor axis of the floe in kilometers\norientation: angle between the major axis and the x-axis in radians\nperimeter: perimeter of the floe in kilometers\nlatitude: latitude of the floe centroid\nlongitude: longitude of the floe centroid\nx: x-coordinate of the floe centroid\ny: y-coordinate of the floe centroid\narea_mismatch: area mismatch between the two floes in rowi and rowi+1 after registration\ncorr: psi-s shape correlation between the two floes in rowi and rowi+1\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.reconstruct","page":"IceFloeTracker.jl","title":"IceFloeTracker.reconstruct","text":"reconstruct(img, se, type, invert)\n\nPerform closing/opening by reconstruction on img.\n\nArguments\n\nimg::AbstractArray: The input image.\nse::AbstractArray: The structuring element.\ntype::String: The type of morphological operation to perform. Must be either \"dilation\" (close by reconstruction) or \"erosion\" (open by reconstruction).\ninvert::Bool=true: Invert marker and mask before reconstruction.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.regionprops","page":"IceFloeTracker.jl","title":"IceFloeTracker.regionprops","text":"regionprops(label_img, ; properties, connectivity)\n\nA wrapper of the regionprops function from the skimage python library.\n\nSee its full documentation at https://scikit-image.org/docs/stable/api/skimage.measure.html#skimage.measure.regionprops.\n\nArguments\n\nlabel_img: Image with the labeled objects of interest\nintensity_img: (Optional) Used for generating extra_properties, integer/float array from which (presumably) label_img was generated\nextra_properties: (Optional) not yet implemented. It will be set to nothing\n\nSee also regionprops_table\n\nExamples\n\njulia> Random.seed!(123);\n\njulia> bw_img = rand([0, 1], 5, 10)\n5×10 Matrix{Int64}:\n 1 0 1 0 0 0 0 0 0 1\n 1 0 1 1 1 0 0 0 1 1\n 1 1 0 1 1 0 1 0 0 1\n 0 1 0 1 0 0 0 0 1 0\n 1 0 0 0 0 1 0 1 0 1\n\n julia> label_img = Images.label_components(bw_img, trues(3,3))\n 5×10 Matrix{Int64}:\n 1 0 1 0 0 0 0 0 0 4\n 1 0 1 1 1 0 0 0 4 4\n 1 1 0 1 1 0 3 0 0 4\n 0 1 0 1 0 0 0 0 4 0\n 1 0 0 0 0 2 0 4 0 4\n\n julia> regions = regionprops(label_img, bw_img);\n\n julia> for region in regions\n println(region.area,\"\t\", region.perimeter)\n end\n13 11.621320343559642\n1 0.0\n1 0.0\n7 4.621320343559642\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.regionprops_table","page":"IceFloeTracker.jl","title":"IceFloeTracker.regionprops_table","text":"regionprops_table(label_img, intensity_img; properties, connectivity, extra_properties)\n\nA wrapper of the regionprops_table function from the skimage python library.\n\nSee its full documentation at https://scikit-image.org/docs/stable/api/skimage.measure.html#regionprops-table.\n\nArguments\n\nlabel_img: Image with the labeled objects of interest\nintensity_img: (Optional) Used for generating extra_properties, integer/float array from which (presumably) label_img was generated \nproperties: List (Vector or Tuple) of properties to be generated for each connected component in label_img\nextra_properties: (Optional) not yet implemented. It will be set to nothing\n\nNotes\n\nZero indexing has been corrected for the bbox and centroid properties\nbbox data (max_col and max_row) are inclusive\ncentroid data are rounded to the nearest integer\n\nSee also regionprops\n\nExamples\n\njulia> using IceFloeTracker, Random\n\njulia> Random.seed!(123);\n\njulia> bw_img = rand([0, 1], 5, 10)\n5×10 Matrix{Int64}:\n 1 0 1 0 0 0 0 0 0 1\n 1 0 1 1 1 0 0 0 1 1\n 1 1 0 1 1 0 1 0 0 1\n 0 1 0 1 0 0 0 0 1 0\n 1 0 0 0 0 1 0 1 0 1\n\njulia> label_img = IceFloeTracker.label_components(bw_img, trues(3,3))\n5×10 Matrix{Int64}:\n 1 0 1 0 0 0 0 0 0 4\n 1 0 1 1 1 0 0 0 4 4\n 1 1 0 1 1 0 3 0 0 4\n 0 1 0 1 0 0 0 0 4 0\n 1 0 0 0 0 2 0 4 0 4\n\njulia> properties = [\"area\", \"perimeter\"]\n2-element Vector{String}:\n \"area\"\n \"perimeter\"\n\n julia> IceFloeTracker.regionprops_table(label_img, bw_img, properties = properties)\n 4×2 DataFrame\n Row │ area perimeter \n │ Int32 Float64 \n ─────┼──────────────────\n 1 │ 13 11.6213\n 2 │ 1 0.0\n 3 │ 1 0.0\n 4 │ 7 4.62132\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.regularize_fill_holes-NTuple{5, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.regularize_fill_holes","text":"regularize_fill_holes(img, local_maxima_mask, factor, segment_mask, L0mask)\n\nRegularize img by: 1. increasing the maxima of img by a factor of factor 2. filtering img at positions where either segment_mask or L0mask are true 3. filling holes\n\nArguments\n\nimg: The morphological residue image.\nlocal_maxima_mask: The local maxima mask.\nfactor: The factor to apply to the local maxima mask.\nsegment_mask: The segment mask – intersection of bw1 and bw2 in first tiled workflow of master.m.\nL0mask: zero-labeled pixels from watershed.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.regularize_sharpening-NTuple{8, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.regularize_sharpening","text":"regularize_sharpening(img, L0mask, radius, amount, local_maxima_mask, factor, segment_mask, se)\n\nRegularize img via sharpening, filtering, reconstruction, and maxima elevating.\n\nArguments\n\nimg: The input image.\nL0mask: zero-labeled pixels from watershed.\nradius: The radius of the unsharp mask.\namount: The amount of unsharp mask.\nlocal_maxima_mask: The local maxima mask.\nfactor: The factor to apply to the local maxima mask.\nsegment_mask: The segment mask – intersection of bw1 and bw2 in first tiled workflow of master.m.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.remove_padding-Tuple{Any, Union{ImageFiltering.Fill, ImageFiltering.Pad}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.remove_padding","text":"remove_padding(paddedimg, border_spec)\n\nRemoves padding from the boundary of padded image paddedimg according to the border specification border_spec type. Returns the cropped image.\n\nArguments\n\npaddedimg: Pre-padded image.\nborder_spec: Type representing the style of padding (such as Pad or Fill) with which paddedimg is assumend to be pre-padded. Example: Pad((1,2), (3,4)) specifies 1 row on the top, 2 columns on the left, 3 rows on the bottom, and 4 columns on the right boundary.\n\nSee also add_padding\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.renamecols!-Union{Tuple{T}, Tuple{DataFrame, Vector{T}, Vector{T}}} where T<:Union{String, Symbol}","page":"IceFloeTracker.jl","title":"IceFloeTracker.renamecols!","text":"renamecols!(props::DataFrame, oldnames::Vector{T}, newnames::Vector{T}) where T<:Union{Symbol,String}\n\nRename the oldnames columns in props to newnames.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.resample_boundary","page":"IceFloeTracker.jl","title":"IceFloeTracker.resample_boundary","text":"resample_boundary(bd_points::Vector{<:CartesianIndex}, reduc_factor::Int64=2, bd::String=\"natural\")\n\nGet a uniform set of resampled boundary points from bd_points using cubic splines with specified boundary conditions\n\nThe resampled set of points is obtained using parametric interpolation of the points in bd_points. It is assumed that the separation between a pair of adjacent points is 1.\n\nArguments\n\nbd_points: Sequetial set of boundary points for the object of interest\nreduc_factor: Factor by which to reduce the number of points in bd_points (2 by default)\n\n-bd: Boundary condition, either 'natural' (default) or 'periodic'\n\nSee also bwtraceboundary\n\nExample\n\n```jldoctest; setup = :(using IceFloeTracker) julia> A = zeros(Int, 13, 16); A[2:6, 2:6] .= 1; A[4:8, 7:10] .= 1; A[10:12,13:15] .= 1; A[10:12,3:6] .= 1; julia> A 13×16 Matrix{Int64}: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n\njulia> boundary = bwtraceboundary(A);\n\njulia> boundary[3] 9-element Vector{CartesianIndex}: CartesianIndex(10, 13) CartesianIndex(11, 13) CartesianIndex(12, 13) CartesianIndex(12, 14) CartesianIndex(12, 15) CartesianIndex(11, 15) CartesianIndex(10, 15) CartesianIndex(10, 14) CartesianIndex(10, 13)\n\njulia> resample_boundary(boundary[3]) 4×2 Matrix{Float64}: 10.0 13.0 12.0357 13.5859 10.5859 15.0357 10.0 13.0\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.reset_id!","page":"IceFloeTracker.jl","title":"IceFloeTracker.reset_id!","text":"reset_id!(df, col)\n\nReset the distinct values in the column col of df to be consecutive integers starting from 1.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.rgb2gray-Tuple{Array{Float64, 3}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.rgb2gray","text":"rgb2gray(rgbchannels::Array{Float64, 3})\n\nConvert an array of RGB channel data to grayscale in the range [0, 255].\n\nIdentical to MATLAB rgb2gray (https://www.mathworks.com/help/matlab/ref/rgb2gray.html).\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.rgb2gray-Tuple{Matrix{RGB{Float64}}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.rgb2gray","text":"rgb2gray(img::Matrix{RGB{Float64}})\n\nConvert an RGB image to grayscale in the range [0, 255].\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.roundtoint!-Union{Tuple{T}, Tuple{DataFrame, Vector{T}}} where T<:Union{String, Symbol}","page":"IceFloeTracker.jl","title":"IceFloeTracker.roundtoint!","text":"roundtoint!(props::DataFrame, colnames::Vector{T}) where T<:Union{Symbol,String}\n\nRound the colnames columns in props to Int.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.segmentation_A-Tuple{BitMatrix}","page":"IceFloeTracker.jl","title":"IceFloeTracker.segmentation_A","text":"segmentation_A(segmented_ice_cloudmasked; min_opening_area)\n\nApply k-means segmentation to a gray image to isolate a cluster group representing sea ice. Returns an image segmented and processed as well as an intermediate files needed for downstream functions.\n\nArguments\n\nsegmented_ice_cloudmask: bitmatrix with open water/clouds = 0, ice = 1, output from segmented_ice_cloudmasking()\nmin_opening_area: minimum size of pixels to use during morphological opening\nfill_range: range of values dictating the size of holes to fill\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.segmentation_B","page":"IceFloeTracker.jl","title":"IceFloeTracker.segmentation_B","text":"segmentation_B(sharpened_image, cloudmask, segmented_a_ice_mask, struct_elem; fill_range, isolation_threshold, alpha_level, adjusted_ice_threshold)\n\nPerforms image processing and morphological filtering with intermediate files from normalization.jl and segmentation_A to further isolate ice floes, returning a mask of potential ice.\n\nArguments\n\nsharpened_image: non-cloudmasked but sharpened image, output from normalization.jl\ncloudmask: bitmatrix cloudmask for region of interest\nsegmented_a_ice_mask: binary cloudmasked ice mask from segmentation_a_direct.jl\nstruct_elem: structuring element for dilation\nfill_range: range of values dictating the size of holes to fill\nisolation_threshold: threshold used to isolated pixels from sharpened_image; between 0-1\nalpha_level: alpha threshold used to adjust contrast\ngamma_factor: amount of gamma adjustment\nadjusted_ice_threshold: threshold used to set ice equal to one after gamma adjustment\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.segmentation_F-Tuple{Matrix{Gray{Float64}}, BitMatrix, BitMatrix, Vector{Int64}, BitMatrix, BitMatrix}","page":"IceFloeTracker.jl","title":"IceFloeTracker.segmentation_F","text":"segmentation_F(\nsegmentation_B_not_ice_mask::Matrix{Gray{Float64}},\nsegmentation_B_ice_intersect::BitMatrix,\nsegmentation_B_watershed_intersect::BitMatrix,\nice_labels::Vector{Int64},\ncloudmask::BitMatrix,\nlandmask::BitMatrix;\nmin_area_opening::Int64=20\n\n)\n\nCleans up past segmentation images with morphological operations, and applies the results of prior watershed segmentation, returning the final cleaned image for tracking with ice floes segmented and isolated. \n\nArguments\n\nsegmentation_B_not_ice_mask: gray image output from segmentation_b.jl\nsegmentation_B_ice_intersect: binary mask output from segmentation_b.jl\nsegmentation_B_watershed_intersect: ice pixels, output from segmentation_b.jl \nice_labels: vector of pixel coordinates output from find_ice_labels.jl\ncloudmask.jl: bitmatrix cloudmask for region of interest\nlandmask.jl: bitmatrix landmask for region of interest\nmin_area_opening: threshold used for area opening; pixel groups greater than threshold are retained\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.segmented_ice_cloudmasking-Tuple{Matrix{Gray{Float64}}, BitMatrix, Vector{Int64}}","page":"IceFloeTracker.jl","title":"IceFloeTracker.segmented_ice_cloudmasking","text":"segmented_ice_cloudmasking(gray_image, cloudmask, ice_labels;)\n\nApply cloudmask to a bitmatrix of segmented ice after kmeans clustering. Returns a bitmatrix with open water/clouds = 0, ice = 1).\n\nArguments\n\ngray_image: output image from ice-water-discrimination.jl or gray ice floe leads image in segmentation_f.jl\ncloudmask: bitmatrix cloudmask for region of interest\nice_labels: vector if pixel coordinates output from find_ice_labels.jl\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.sort_floes_by_area!-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.sort_floes_by_area!","text":"sort_floes_by_area!(props)\n\nSort floes in props by area in descending order.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.timestamp-Tuple{String}","page":"IceFloeTracker.jl","title":"IceFloeTracker.timestamp","text":"timestamp(fname)\n\nAttach timestamp to fname.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.trackercond1","page":"IceFloeTracker.jl","title":"IceFloeTracker.trackercond1","text":"trackercond1(p1, p2, delta_time, t1=(dt = (30, 100, 1300), dist=(15, 30, 120)))\n\nReturn true if the floe at p1 and the floe at p2 are within a certain distance of each other and the displacement time is within a certain range. Return false otherwise.\n\nArguments\n\np1: coordinates of floe 1\np2: coordinates of floe 2\ndelta_time: time elapsed from image day 1 to image day 2\nt: tuple of thresholds for elapsed time and distance\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.trackercond2","page":"IceFloeTracker.jl","title":"IceFloeTracker.trackercond2","text":"trackercond2(area1, ratios, t2=(area=1200, arearatio=0.28, majaxisratio=0.10, minaxisratio=0.12, convex_area=0.14))\n\nSet of conditions for \"big\" floes. Return true if the area of the floe is greater than t2.area and the similarity ratios are less than the corresponding thresholds in t2. Return false otherwise.\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.trackercond3","page":"IceFloeTracker.jl","title":"IceFloeTracker.trackercond3","text":"trackercond3(area1, ratios, t3=(area=1200, arearatio=0.18, majaxisratio=0.07, minaxisratio=0.08, convex_area=0.09))\n\nSet of conditions for \"small\" floes. Return true if the area of the floe is less than t3.area and the similarity ratios are less than the corresponding thresholds in t3. Return false otherwise\n\n\n\n\n\n","category":"function"},{"location":"#IceFloeTracker.unsharp_mask-NTuple{4, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.unsharp_mask","text":"unsharp_mask(image_gray, smoothing_param, intensity, clampmax)\n\nApply unsharp masking on (equalized) grayscale ([0, clampmax]) image to enhance its sharpness.\n\nArguments\n\nimage_gray: The input grayscale image, typically already equalized.\nsmoothing_param::Int: The pixel radius for Gaussian blurring (typically between 1 and 10).\nintensity: The amount of sharpening to apply. Higher values result in more pronounced sharpening.\nclampmax: upper limit of intensity values in the returned image.`\n\nReturns\n\nThe sharpened grayscale image with values clipped between 0 and clapmax.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.unsharp_mask-Tuple{Any, Any, Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.unsharp_mask","text":"(Deprecated)\nunsharp_mask(image_gray, smoothing_param, intensity)\n\nApply unsharp masking on (equalized) grayscale image to enhance its sharpness.\n\nDoes not perform clamping after the smoothing step. Kept for legacy tests of IceFloeTracker.jl.\n\nArguments\n\nimage_gray: The input grayscale image, typically already equalized.\nsmoothing_param::Int: The pixel radius for Gaussian blurring (typically between 1 and 10).\nintensity: The amount of sharpening to apply. Higher values result in more pronounced sharpening.\n\nReturns\n\nThe sharpened grayscale image with values clipped between 0 and clapmax.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.update!-Tuple{IceFloeTracker.MatchedPairs, IceFloeTracker.MatchedPairs}","page":"IceFloeTracker.jl","title":"IceFloeTracker.update!","text":"update!(match_total::MatchedPairs, matched_pairs::MatchedPairs)\n\nUpdate match_total with the data from matched_pairs.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.watershed_ice_floes-Tuple{BitMatrix}","page":"IceFloeTracker.jl","title":"IceFloeTracker.watershed_ice_floes","text":"watershed_ice_floes(intermediate_segmentation_image;)\n\nPerforms image processing and watershed segmentation with intermediate files from segmentation_b.jl to further isolate ice floes, returning a binary segmentation mask indicating potential sparse boundaries of ice floes.\n\nArguments\n\n-intermediate_segmentation_image: binary cloudmasked and landmasked intermediate file from segmentation B, either SegB.not_ice_bit or SegB.ice_intersect\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.watershed_product-Tuple{BitMatrix, BitMatrix}","page":"IceFloeTracker.jl","title":"IceFloeTracker.watershed_product","text":"watershed_product(watershed_B_ice_intersect, watershed_B_not_ice;)\n\nIntersects the outputs of watershed segmentation on intermediate files from segmentation B, indicating potential sparse boundaries of ice floes.\n\nArguments\n\nwatershed_B_ice_intersect: binary segmentation mask from watershed_ice_floes\nwatershed_B_not_ice: binary segmentation mask from watershed_ice_floes\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.@persist","page":"IceFloeTracker.jl","title":"IceFloeTracker.@persist","text":"@persist img fname\n@persist(img,fname)\n@persist img\n@persist(img)\n@persist img fname ts\n@persist(img, fname, ts)\n\nGiven a reference to an image object img, the macro persists (saves to a file) img to the current working directory using fname as filename. Returns img.\n\nArguments\n\nimg: Symbol expression representing an image object loaded in memory.\nfname: Optional filename for the persisted image.\nts: Optional boolean to attach timestamp to fname.\n\n\n\n\n\n","category":"macro"},{"location":"#IceFloeTracker.MatchedPairs","page":"IceFloeTracker.jl","title":"IceFloeTracker.MatchedPairs","text":"Container for matched pairs of floes. props1 and props2 are dataframes with the same column names as the input dataframes. ratios is a dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios. dist is a vector of (pixel) distances between paired floes.\n\n\n\n\n\n","category":"type"},{"location":"#IceFloeTracker.MatchedPairs-Tuple{Any}","page":"IceFloeTracker.jl","title":"IceFloeTracker.MatchedPairs","text":"MatchedPairs(df)\n\nReturn an object of type MatchedPairs with an empty dataframe with the same column names as df, an empty dataframe with column names area, majoraxis, minoraxis, convex_area, area_mismatch, and corr for similarity ratios, and an empty vector for distances.\n\n\n\n\n\n","category":"method"},{"location":"#IceFloeTracker.Tracked","page":"IceFloeTracker.jl","title":"IceFloeTracker.Tracked","text":"Container for final matched pairs of floes. data is a vector of MatchedPairs objects.\n\n\n\n\n\n","category":"type"},{"location":"#Index","page":"IceFloeTracker.jl","title":"Index","text":"","category":"section"},{"location":"","page":"IceFloeTracker.jl","title":"IceFloeTracker.jl","text":"","category":"page"}] } diff --git a/segmentation/index.html b/segmentation/index.html index e0ee4fbb..a5285a6e 100644 --- a/segmentation/index.html +++ b/segmentation/index.html @@ -1,2 +1,2 @@ -Segmentation · IceFloeTracker.jl
      +Segmentation · IceFloeTracker.jl
      diff --git a/tracking/index.html b/tracking/index.html index 7f7df63f..f1d9e0c3 100644 --- a/tracking/index.html +++ b/tracking/index.html @@ -1,2 +1,2 @@ -Tracking · IceFloeTracker.jl

      Tracking

      Ice floe tracking links objects in images pairwise.

      +Tracking · IceFloeTracker.jl

      Tracking

      Ice floe tracking links objects in images pairwise.