Files
scikit-image/skimage/filter/rank
Geoffrey French da93619e59 Fixed some issues with the new windowed_histogram function in filter.rank.
It used to be able to output uint8 histogram, whose max pixel counts of 255 could easily overflow. Addressed by limiting the output type to float.
Normalized histograms are now generated, otherwise behaviour is unpredictable at boundaries or when pixels are not permitted by a mask.
The new optional n_bins parameter allows the caller to specify the size of the histogram generated. Having it fixed to image.max()+1 could result in feature vectors being shorter than desired just due to a value not being used in an image.
An example has been added to the docs, that demonstrates the application of windows histograms in object matching; a single coin is extracted and found by chi squared histogram matching.
2014-08-31 22:25:45 +01:00
..
2012-11-12 09:34:33 +01:00
2013-07-12 23:16:08 +02:00

To do
-----

* add simple examples, adapt documentation on existing examples
* add/check existing doc
* adapting tests for each type of filter

General remarks
---------------

Basically these filters compute local histogram for each pixel. A histogram is
built using a moving window in order to limit redundant computation. The path
followed by the moving window is given hereunder

 ...-----------------------\
/--------------------------/
\-------------------------- ...

We compare cmorph.dilate to this histogram based method to show how
computational costs increase with respect to image size or structuring element
size. This implementation gives better results for large structuring elements.

The local histogram is updated at each pixel as the structuring element window
moves by, i.e. only those pixels entering and leaving the structuring element
update the local histogram. The histogram size is 8-bit (256 bins) for 8-bit
images and 2 to 16-bit for 16-bit images depending on the maximum value of the
image.

The filter is applied up to the image border, the neighboorhood used is
adjusted accordingly. The user may provide a mask image (same size as input
image) where non zero values are the part of the image participating in the
histogram computation. By default the entire image is filtered.