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

Impose minima and related functions #489

Merged
merged 8 commits into from
Nov 11, 2024
Merged

Impose minima and related functions #489

merged 8 commits into from
Nov 11, 2024

Conversation

cpaniaguam
Copy link
Member

No description provided.

@cpaniaguam cpaniaguam linked an issue Nov 7, 2024 that may be closed by this pull request
2 tasks
@cpaniaguam cpaniaguam requested review from hollandjg, tdivoll and a team November 7, 2024 14:29
@cpaniaguam cpaniaguam self-assigned this Nov 7, 2024
danielmwatkins
danielmwatkins previously approved these changes Nov 8, 2024
Copy link
Contributor

@danielmwatkins danielmwatkins left a comment

Choose a reason for hiding this comment

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

I didn't see any docstrings, so do add those if these are going to be functions that a user can access

@cpaniaguam cpaniaguam dismissed danielmwatkins’s stale review November 8, 2024 21:16

The merge-base changed after approval.

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.

Just suggestions in this one, otherwise looks good!


It supports both integer and grayscale images using different implementations for each.
"""
function impose_minima(I::AbstractArray{T}, BW::AbstractArray{Bool}) where {T<:Integer}
Copy link
Collaborator

Choose a reason for hiding this comment

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

minor detail, but consider adding a comment after where {T<:Integer} #color image.
Then below on line 139, consider where {T<:AbstractFloat} #gray image.
It's clear in the docstring, so maybe not needed.

function impose_minima(I::AbstractArray{T}, BW::AbstractArray{Bool}) where {T<:Integer}
marker = 255 .* BW
mask = imcomplement(min.(I .+ 1, 255 .- marker))
reconstructed = sk_morphology.reconstruction(marker, mask)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this reconstruction from skimage closer to the matlab implementation compared to the reconstruction we were using before?

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's the same but a bit faster.

@cpaniaguam cpaniaguam merged commit b029564 into main Nov 11, 2024
7 checks passed
@cpaniaguam cpaniaguam deleted the 488-impose-minima branch November 11, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Misc Image processing
3 participants