Class LocalBufferedHistogram

java.lang.Object
inra.ijpb.morphology.strel.LocalBufferedHistogram

public class LocalBufferedHistogram
extends java.lang.Object

Local histogram in a linear neighborhood of a pixel. Works only for Grayscale images coded between 0 and 255.

Replaced by LocalExtremumBufferGray8

Author:
David Legland
  • Constructor Summary

    Constructors
    Constructor Description
    LocalBufferedHistogram​(int n)
    Main constructor.
    LocalBufferedHistogram​(int n, int value)
    Initializes an histogram filled with the given value.
  • Method Summary

    Modifier and Type Method Description
    void add​(int value)
    Adds a value to the local histogram, and update bounds if needed.
    void clear()
    Reset inner counts with zero values, and min and max values.
    void fill​(int value)
    Resets histogram by considering it is filled with the given value.
    int getMax()
    Returns the maximum value stored in this local histogram
    int getMin()
    Returns the minimum value stored in this local histogram

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LocalBufferedHistogram

      public LocalBufferedHistogram​(int n)
      Main constructor.
      Parameters:
      n - the size of the buffer
    • LocalBufferedHistogram

      public LocalBufferedHistogram​(int n, int value)
      Initializes an histogram filled with the given value.
      Parameters:
      n - the size of the buffer
      value - the initial value of all elements in buffer
  • Method Details

    • add

      public void add​(int value)
      Adds a value to the local histogram, and update bounds if needed. Then removes the last stored value, and update bounds if needed.
      Parameters:
      value - the value to add
    • clear

      public void clear()
      Reset inner counts with zero values, and min and max values.
    • fill

      public void fill​(int value)
      Resets histogram by considering it is filled with the given value. Updates min and max accordingly.
      Parameters:
      value - the new value of all elements in the histogram
    • getMin

      public int getMin()
      Returns the minimum value stored in this local histogram
      Returns:
      the minimum value in neighborhood
    • getMax

      public int getMax()
      Returns the maximum value stored in this local histogram
      Returns:
      the maximum value in neighborhood