missing kernel or block size in equalize_adapthist

94 views
Skip to first unread message

Kai Wiechen

unread,
May 25, 2015, 2:49:53 PM5/25/15
to scikit...@googlegroups.com

Hello,

I am using equalize_adapthist after color deconvolution and some morphological operations to enhance local contrast of nuclei in histological images. There are different results when applying equalize_adapthist when using small patches and larger size whole images (left small patch, right large size whole image). The CLAHE implementation in ImageJ has a 'block size' parameter and the implementation in Pixinsight has a 'Kernel size' parameter to get results depending on the local context. Is it possible to 'simulate' this behaviour with scikit-image?

Best regards,

Kai







Steven Silvester

unread,
May 25, 2015, 6:54:34 PM5/25/15
to scikit...@googlegroups.com
Hi Kai,

Do the `n_tiles*` arguments not meet your needs?  By defining the number of tiles in X and Y, you are equivalently setting a block size.



Regards,

Steve

Kai Wiechen

unread,
May 26, 2015, 2:58:55 AM5/26/15
to scikit...@googlegroups.com
Hi Steve,

but these parameters are limited to the range 1..16. The small test patches are 150x150 pixels, the complete images have 1920x1448 pixels. I have applied equalize_adapthist here with default parameters (n_tiles=8).

Best regards,

Kai

Steven Silvester

unread,
May 26, 2015, 9:17:01 PM5/26/15
to scikit...@googlegroups.com
Hi Kai,

Is the issue that you want finer grain control of the block size?  If so, that would require a substantial rewrite.

Please feel free to open an issue on Github if that is the case.


Regards,

Steve


--
You received this message because you are subscribed to a topic in the Google Groups "scikit-image" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scikit-image/2elntOClGOY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scikit-image...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kai Wiechen

unread,
May 28, 2015, 2:35:49 PM5/28/15
to scikit...@googlegroups.com
Hi Steve,

yes, I would like to have finer control of block/kernel size to obtain similar results if I apply this to small test patches or the larger complete image. Is there any reason to limit ntiles_x/y to 16?

Regards,

Kai

Steven Silvester

unread,
May 28, 2015, 4:25:44 PM5/28/15
to scikit...@googlegroups.com
Hi Kai,

The limits were set based on the original implementation, but there is no reason they need to stay at 16.  Using an arbitrary size tile is what would take a substantial rewrite.  Looking at your numbers, it looks like a 13x10 block size will get you ~150x150 tile size.  At the full 16x16, you'd have 120x90 pixels.


Regards,

Steve

Steven Silvester

unread,
Jun 6, 2015, 11:54:30 AM6/6/15
to scikit...@googlegroups.com
Hi Kai,

We are having a discussion now about how to fix/improve the adapthist block handling:  https://github.com/scikit-image/scikit-image/issues/1541.


Regards,

Steve

On Monday, May 25, 2015 at 1:49:53 PM UTC-5, Kai Wiechen wrote:
Reply all
Reply to author
Forward
0 new messages