regional maxima

38 views
Skip to first unread message

jip

unread,
May 30, 2012, 4:03:35 PM5/30/12
to python...@googlegroups.com
Dear luis,

When working with regional maxima implemented in mahotas 0.8, I realize that the result is different from the result obtained with pymorph.remax. For comparison, mahotas.regmax and skimage implementation yield similar images:

up left:original imagr

up right: gaussian blur

mid left: regmax on blured image with mahotas

mid right: regmax with pymorph

down:regmax with skimage

Do pymorph and mahotas  implement the same operator?.

I didn't test it yet, but I suppose I can't use the labelled image from mahotas.regmax in the watershed algo without some pos-tprocessing to remove the concentric domains.

Best regards

Jean-Patrick

Luis Pedro Coelho

unread,
May 30, 2012, 4:48:56 PM5/30/12
to python...@googlegroups.com
Hi,

I thought I had implemented the same as pymorph except for some cases where I
thought that pymorph was actually not the best.

Still, can you just send me the image you have on the top left? So I can test
it better.

Tx
Luis

On Wednesday, May 30, 2012 01:03:35 PM jip wrote:
> Dear luis,
>
> When working with regional maxima implemented in mahotas 0.8, I realize
> that the result is different from the result obtained with pymorph.remax.
> For comparison, mahotas.regmax and skimage implementation yield similar
> images:
>
> <https://lh3.googleusercontent.com/-Mjqv0yktQ8I/T8Z5ZmUKpZI/AAAAAAAAAx8/lHut
> 521wuMk/s1600/Remax-Pymorph-mahotas_skimage.png>
>
> up left:original imagr
>
> up right: gaussian blur
>
> mid left: regmax on blured image with mahotas
>
> mid right: regmax with pymorph
>
> down:regmax with skimage
>
> Do pymorph and mahotas implement the same operator?.
>
> I didn't test it yet, but I suppose I can't use the labelled image from
> mahotas.regmax in the watershed algo without some pos-tprocessing to remove
> the concentric domains.
>
> Best regards
>
> Jean-Patrick
> <https://lh3.googleusercontent.com/-Mjqv0yktQ8I/T8Z5ZmUKpZI/AAAAAAAAAx8/lHut
> 521wuMk/s1600/Remax-Pymorph-mahotas_skimage.png>
--
Luis Pedro Coelho | Institute for Molecular Medicine | http://luispedro.org

LxMLS 2012: Lisbon Machine Learning School
http://lxmls.it.pt

jip

unread,
May 31, 2012, 4:12:57 AM5/31/12
to python...@googlegroups.com
Hi,
Please find an archive of the 12 bits image.

Jp
1.tif.tar.gz

Luis Pedro Coelho

unread,
May 31, 2012, 6:43:27 AM5/31/12
to python...@googlegroups.com
I realised that pymorph actually has a much better definition of regmax().

I will make mahotas implement the same.

Tx for the report,
Luis

Jean-Patrick Pommier

unread,
May 31, 2012, 7:17:09 AM5/31/12
to python...@googlegroups.com
thanks

jp

2012/5/31 Luis Pedro Coelho <lu...@luispedro.org>

Luis Pedro Coelho

unread,
Jun 4, 2012, 1:52:34 PM6/4/12
to python...@googlegroups.com
I just pushed a new version to github.

The old implementation is available under locmax()/locmin().

This should be the same as pymorph, except that it should also be really fast
(unless you have a lot of local maxima, but even then, it should be pretty
fast).

HTH
Luis

Luis Pedro Coelho

unread,
Jun 4, 2012, 1:54:53 PM6/4/12
to python...@googlegroups.com
As usual, bug reports are more than welcome.

Luis

jip

unread,
Jun 5, 2012, 3:35:25 PM6/5/12
to python...@googlegroups.com
Thank you Luis,
The mahotas implementation is really fast, my script is boosted.

Jean-Patrick
Reply all
Reply to author
Forward
0 new messages