[SciPy-Dev] ANN: SMIL - Small Morphological Image Library
Jose-Marcio Martins da Cruz
Jose-Marcio.Martins at mines-paristech.fr
Tue Jan 29 14:17:32 EST 2019
Hi Stefan,
On 1/29/19 12:44 AM, Stefan van der Walt wrote:
> Hi Jose-Marcio,
>
> On Fri, 25 Jan 2019 11:10:44 +0100, Jose-Marcio Martins da Cruz wrote:
>> I'm pleased to announce SMIL - Simple Morphological Image Library -
>> v. 0.9.1
>
> Neat and compact little library; congratulations on the release!
Thanks,
>
>> SMIL is distributed with GPL license.
>
> Note that the website currently states BSD.
Sorry, you're right !
>
> Is there any reason you are not using standard NumPy arrays to represent
> data, or at least return those from the Python API? E.g., the following
> code would feel very foreign to someone used to Python:
>
For the moment, you can go back and forth from NumPy. See below.
Some internal users are asking for this, but...
The library was optimized to have better performance with data in the usual matrix structure. We could surely rewrite
all this, as was done by OpenCV, but There will surely have a performance loss. NumPy data structures are very flexible
at the cost of some complexity.
But we're thinking in how to implement it in some clever way.
>>>> im3D = sp.Image(im2.getWidth(), im2.getHeight(), 3)
>>>> im3D << 0
>>>> sp.copy(im1, 0, 256, im3D)
>>>> sp.copy(im3, im3D, 0, 0, 2)
<rem>
Sorry, this part isn't yet documented in the web site.
</rem>
* to create an image from numpy data :
im.fromNumArray(npArr)
* to get a numpy pointer from an Image :
npArr = im.getNumArray()
Related to this, there are floating point images. In Morphology, we don't need this as only ordered sets matter, not the
real values. Some people (medical or materials) handling 3D images from scanners convert them to 32 bits before doing
Morpho operations on them. But we need to have an answer to this.
>
> Usage of the `lena` image is somewhat frowned upon nowadays, so you may
> want to consider replacing that with another image. In skimage, we use
> astronaut Eileen Collins:
>
> https://github.com/scikit-image/scikit-image/blob/v0.14.2/skimage/data/astronaut.png
Thanks. This is an interesting image. I'll add some examples with this.
Thanks a lot for your comments.
Best regards
José-Marcio
>
> Best regards,
> Stéfan
>
More information about the SciPy-Dev
mailing list