Conversation
…cted components having the same label
…et systematically increasing labels
| logger.debug("output after this iteration\n %s" % count_blobs_per_label(output).query("count > 1")) | ||
|
|
||
| # saving the props table | ||
| output = opening(output) |
|
From Buckley et. al. https://doi.org/10.5194/tc-18-5031-2024, Figure 2
I think the question is whether we want that smoothing step to be applied to all the floes at the end. Given Carlos' comment #66 (comment) it might be inadvisable to leave as-is. If the smoothing is necessary from a scientific point of view, we could:
@danielmwatkins @cpaniaguam Any other ideas? Or preferences? |
|
Note that the failing test is unrelated to this PR, and is fixed in |
|
I'd like to suggest keeping the "opening" step at the end of the algorithm, and just using the new "cleaning" to remove the extra disconnected parts. That's the smallest change we can make to the algorithm whilst still fixing the problem. |
|
This is an interesting case because it is one, like you note, where there really isn't anything there that it should be identifying. I like the idea of adding a minimal cleaning step at the end. |
cpaniaguam
left a comment
There was a problem hiding this comment.
Thanks for this!
Because the number of different labels in the images might be high, it's probably better to avoid the accumulator pattern in favor of a comprehension. Left a suggestion regarding this.
Looked into this. Decided against the requested changes.















Ensure that floes detected at different scales don't have the same label.
Changes:
cv2.connectedComponentsWithStats, which has a 32-bit integer type for tracking labelsn+1are labelled starting from the value of the previous highest labelhighest_label_so_far+ 1Resolutions: