-
Notifications
You must be signed in to change notification settings - Fork 1
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
476 feat morph fill #478
Conversation
There was a problem hiding this 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) |
There was a problem hiding this comment.
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}}}, |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
]
Closes #476