-
Notifications
You must be signed in to change notification settings - Fork 148
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
Make dilate and erode accept floats #133
Comments
I don't know if there is a particular reason, besides this originally being written to replicate other integer-only code that was much slower. Looking at the code, it may even just work well as is by removing the current limitations |
When getting accustomed to this library's code base, I ran into something interesting on line 117. To my assumption, this is the cause of unexpected results on the function |
The original reason was probably to make it behave like pymorph: at the time, pymorph did a lot of what I wanted, but was Python-only and 2D only, so a lot of mahotas was written to be a C++ version of that |
Should I implement dilate and erode functions that use a boolean footprint like what is implemented in SciPy? Currently, the phase separation algorithm I am implementing does not work with the current dilate and erode functions but works for SciPy and my own implementation. |
Yes, I'd be happy to review/help. |
Hi all,
I was using this library as a lightweight alternative to scipy, but I ran into a few inconveniences. I usually work with 2D images that are 32 bit floats and normalized to [0..1]. However, it seems some functions, notably erode and dilate, do not accept floating point arrays. Is there a particular reason to why erode and dilate only accepts integer data types? If so, it is no biggie as I can simply emulate floating point arithmetics with 32 bit integers.
Kind regards,
Erich
The text was updated successfully, but these errors were encountered: