From 4967314132f183ea5b94374674f587a8e5027147 Mon Sep 17 00:00:00 2001 From: Luis Pedro Coelho Date: Fri, 26 Dec 2014 19:18:50 +0100 Subject: [PATCH] DOC Answer Haralick FAQ about 16 bit images Explain that haralick can require large amounts of memory for 16 bit images. --- docs/source/faq.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/source/faq.rst b/docs/source/faq.rst index 27266662..c27dbce4 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -25,6 +25,24 @@ In any case, we all use the same data format: numpy arrays. It is very easy you want from each. All the packages use function based interfaces which make it easy to mix-and-match. +I ran out of memory computing Haralick features on 16 bit images. Is it not +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +supported? +~~~~~~~~~~~ + +Yes, it is. However, in order to compute Haralick features, first a +cooccurrence matrix is computed. This matrix has the size ``(ngrey, ngrey)`` +where ``ngrey`` is the largest grey value in the input. Thus, if your image has +a very high dynamic range, you may not have the resources to compute the +matrix. + +It is often a good idea to contrast stretch your images anyway. For example, +using the following code, stretches your images to the 0-255 range:: + + im_stretched = mh.stretch(im) + features = mh.features.haralic(im_stretched) + + What are the parameters to Local Binary Patterns? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~