Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

476 feat morph fill #478

Merged
merged 6 commits into from
Nov 8, 2024
Merged

476 feat morph fill #478

merged 6 commits into from
Nov 8, 2024

Conversation

cpaniaguam
Copy link
Member

Closes #476

@cpaniaguam cpaniaguam linked an issue Nov 6, 2024 that may be closed by this pull request
3 tasks
@cpaniaguam cpaniaguam self-assigned this Nov 6, 2024
@cpaniaguam cpaniaguam requested a review from a team November 6, 2024 18:03
@cpaniaguam cpaniaguam added the enhancement New feature or request label Nov 6, 2024
@cpaniaguam cpaniaguam mentioned this pull request Nov 7, 2024
3 tasks
tdivoll
tdivoll previously approved these changes Nov 8, 2024
Copy link
Collaborator

@tdivoll tdivoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See individual comments.

@@ -79,5 +80,5 @@ julia> bridge(bw)
```
"""
function bridge(bw::T)::T where {T<:AbstractArray{Bool}}
return _bridge_filter(bw, _bridge_operator_lut)
return _filter(bw, _bridge_operator_lut)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that we already had tests set up for bridge(), this looks like just swapping in the new function name.

function _fill_operator_lut(
I::CartesianIndex{2},
img::AbstractArray{Bool},
nhood::CartesianIndices{2,Tuple{UnitRange{Int64},UnitRange{Int64}}},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice flexibility to work with different neighborhood sizes!


r = rand(1:100)

imgbig = repeat(img, r, r)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems robust, does it make an image 100x bigger with random perimeters that need to be filled or the same size img with the perimeter in random locations?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would repeat that basic block r times across and down. Say that r takes up the value 2. Then imgbig would look like this

[
    B B
    B B
]

@cpaniaguam cpaniaguam merged commit 93f8880 into main Nov 8, 2024
7 checks passed
@cpaniaguam cpaniaguam deleted the 476-feat-morph_fill branch November 8, 2024 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

feat: morph_fill
2 participants