public class LocalExtremumBufferGray8 extends Object implements LocalExtremum
Computes the maximum in a local buffer around current point.
This implementation considers a circular buffer (when a value is added, it replaces the first value that was inserted) that makes it possible to update extrema if needed.
Works only for Grayscale images coded between 0 and 255.
LocalExtremum.Type| Constructor and Description | 
|---|
LocalExtremumBufferGray8(int n)
Main constructor. 
 | 
LocalExtremumBufferGray8(int n,
                        int value)
Initializes an histogram filled with the given value. 
 | 
LocalExtremumBufferGray8(int n,
                        LocalExtremum.Type type)
Constructor from size and type of extremum (minimum or maximum). 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
add(int value)
Adds a value to the local histogram, and update bounds if needed. 
 | 
void | 
clear()
Resets inner counts with default maximal integer values
 (Integer.MIN_VALUE for MAX, Integer.MAX_VALUE for MIN) 
 | 
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 
 | 
void | 
setMinMaxSign(int sign)
Changes the sign used for distinguishing minimum and maximum. 
 | 
public LocalExtremumBufferGray8(int n)
n - the size of the bufferpublic LocalExtremumBufferGray8(int n,
                                LocalExtremum.Type type)
n - the size of the buffertype - the type of extremum (maximum or minimum)public LocalExtremumBufferGray8(int n,
                                int value)
n - the size of the buffervalue - the initial value of all elements in bufferpublic void setMinMaxSign(int sign)
sign - +1 for maximum, -1 for minimumpublic void add(int value)
value - the value to addpublic void clear()
public void fill(int value)
value - the new value of all elements in bufferpublic int getMax()
Copyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.