mpicbg.ij.integral
Class BlockStatistics

java.lang.Object
  extended by mpicbg.ij.integral.BlockStatistics
Direct Known Subclasses:
NormalizeLocalContrast, RemoveOutliers

public class BlockStatistics
extends Object

Basic statistical properties of a block of pixels that can be accelerated using integral images. At this time, it is implemented for single channel images at floating point accuracy only, RGB is transferred into grey, integer accuracy into floating point accuracy accordingly. That is, for processing multiple color channels, separate them into individual ImageProcessors first and execute the calculation on each of them individually.

Author:
Stephan Saalfeld

Nested Class Summary
protected  class BlockStatistics.RowIntegrator
           
 
Field Summary
protected  FloatProcessor fp
           
protected  DoubleIntegralImage sums
           
protected  DoubleIntegralImage sumsOfSquares
           
 
Constructor Summary
BlockStatistics(FloatProcessor fp)
           
 
Method Summary
protected static void integrateColumns(int w1, int w2, int n1, int n2, double[] sum, double[] sumOfSquares, int w)
           
protected  void integrateRows(int w1, int n, int width, double[] sum, double[] sumOfSquares)
           
protected  void integrateRowsParallel(int w1, int n, int width, int height, double[] sum, double[] sumOfSquares)
           
 void mean(int blockRadius)
           
 void mean(int blockRadiusX, int blockRadiusY)
          Set all pixels in ip to their block mean for a block with given radius.
 void sampleVariance(int blockRadius)
          Set all pixels in ip to their block sample variance for a block with given radius.
 void sampleVariance(int blockRadiusX, int blockRadiusY)
          Set all pixels in ip to their block sample variance for a block with given radius.
 void std(int blockRadius)
          Set all pixels in ip to their block STD for a block with given radius.
 void std(int blockRadiusX, int blockRadiusY)
          Set all pixels in ip to their block STD for a block with given radius.
 void variance(int blockRadius)
          Set all pixels in ip to their block variance for a block with given radius.
 void variance(int blockRadiusX, int blockRadiusY)
          Set all pixels in ip to their block variance for a block with given radius.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sums

protected final DoubleIntegralImage sums

sumsOfSquares

protected final DoubleIntegralImage sumsOfSquares

fp

protected final FloatProcessor fp
Constructor Detail

BlockStatistics

public BlockStatistics(FloatProcessor fp)
Method Detail

integrateRows

protected final void integrateRows(int w1,
                                   int n,
                                   int width,
                                   double[] sum,
                                   double[] sumOfSquares)

integrateRowsParallel

protected final void integrateRowsParallel(int w1,
                                           int n,
                                           int width,
                                           int height,
                                           double[] sum,
                                           double[] sumOfSquares)

integrateColumns

protected static final void integrateColumns(int w1,
                                             int w2,
                                             int n1,
                                             int n2,
                                             double[] sum,
                                             double[] sumOfSquares,
                                             int w)

mean

public final void mean(int blockRadiusX,
                       int blockRadiusY)
Set all pixels in ip to their block mean for a block with given radius.

Parameters:
blockRadiusX -
blockRadiusY -

mean

public final void mean(int blockRadius)

variance

public final void variance(int blockRadiusX,
                           int blockRadiusY)
Set all pixels in ip to their block variance for a block with given radius.

Parameters:
blockRadiusX -
blockRadiusY -

variance

public final void variance(int blockRadius)
Set all pixels in ip to their block variance for a block with given radius.

Parameters:
blockRadius -

std

public final void std(int blockRadiusX,
                      int blockRadiusY)
Set all pixels in ip to their block STD for a block with given radius.

Parameters:
blockRadiusX -
blockRadiusY -

std

public final void std(int blockRadius)
Set all pixels in ip to their block STD for a block with given radius.

Parameters:
blockRadiusX -
blockRadiusY -

sampleVariance

public final void sampleVariance(int blockRadiusX,
                                 int blockRadiusY)
Set all pixels in ip to their block sample variance for a block with given radius.

Parameters:
blockRadiusX -
blockRadiusY -

sampleVariance

public final void sampleVariance(int blockRadius)
Set all pixels in ip to their block sample variance for a block with given radius.

Parameters:
blockRadius -


Copyright © 2007-2016 Fiji. All Rights Reserved.