WilhelmusLab / IceFloeTracker.jl

Julia package for ice floe tracker
https://wilhelmuslab.github.io/IceFloeTracker.jl/
MIT License
1 stars 2 forks source link

Floe labeling #339

Closed tdivoll closed 7 months ago

tdivoll commented 1 year ago

Add functionality to add a unique ID to each floe in the floe props output. Also add a column for the number of candidate floes. This will help facilitate processing of results.

During the normal tracking, search for a threshold of potential matches to know when we can stop looking for matches.

cpaniaguam commented 11 months ago

Daniel Watkins: Yes, the main idea is just that we need to be able to keep track of floes with a unique label, since it will sometimes but not always be the case that the row ranking by size will continue to line up in subsequent images. Let me know if this idea makes sense: In order to make floe labeling simple, I propose something similar to this: naming floes YYYY_NNNNN where YYYY is the year and NNNNN is an index starting at 0001. In the first image, NNNN is just the row number that you already have in the dataframe. So if the year is 2020 and the first image had, say, 20 floes in it, we’d have floes 2020_00001 throught 2020_00020. Next, the tracker algorithm is run and you end up with a subset of floes that successfully matched. For those floes, we carry the floe label forward. The remaining floes from image 2 get assigned the numbers 2020_00021 through however many images remain. Finally after all the images have been processed, and all the floes have labels, the dataframes can be merged. Each image has a date associated with it, and each floe has an ID, when the dataframes are concatenated, they can be sorted by floe label and sorted by date, so that the final dataframe can be saved as a CSV file e.g. floe_label, datetime, x, y, … , properties , … 2020_000001, 2020-01-01 13:00, … 2020_000001, 2020-01-01 18:00, … 2020_000001, 2020-01-02 06:00, … 2020_000002, 2020-01-01 13:00, … 2020_000002, 2020-01-02 06:00, … 2020_000003, 2020-01-01 13:00, … …

cpaniaguam commented 11 months ago

Making @danielmwatkins' idea a bit more abstract for implementation:

Add to pairfloes

  1. Add datetimes to floes
  2. Label all floes in day 1
  3. Find matches for day-1 floes in day 2. Assign day-1 labels to paired floes in day-2
  4. Label left over (unmatched) day-2 floes
  5. Repeat until day-n-1
  1. Concatenate floe tables vertically
  2. Sort by label and then by datetime, thereby creating a time series for each floe
cpaniaguam commented 11 months ago
cpaniaguam commented 10 months ago
tdivoll commented 7 months ago

closed by #352