Package boofcv.alg.misc
Class Histogram2D_S32
- java.lang.Object
-
- boofcv.alg.misc.Histogram2D_S32
-
public class Histogram2D_S32 extends java.lang.Object2D histogram used to count.
-
-
Constructor Summary
Constructors Constructor Description Histogram2D_S32()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intget(int row, int col)Value at the specified coordinate in the histogramvoidincrement(int row, int col)Increments the value at the specified coordinate by 1intindexOf(int row, int col)Index of the specified coordinateintmaximumColIdx(int row)Returns the column with the largest value in the specified rowintmaximumRowIdx(int col)Returns the row with the largest value in the specified columnvoidprint(java.lang.String format)Prints the histogram to stdoutvoidreshape(int rows, int cols)Changes the size of the histogram to match the specified shape.voidset(int row, int col, int value)Value at the specified coordinate in the histogramintsize()Number of elements in the histogramintsum()Sum of all the elements in the histogramintsumCol(int col)Sums up all the elements in the specified column and returns the resultintsumRow(int row)Sums up all the elements in the specified row and returns the resultvoidzero()Fills all elements in data that are in use to zero.
-
-
-
Method Detail
-
reshape
public void reshape(int rows, int cols)Changes the size of the histogram to match the specified shape. Size of data is changed only when it's too small for the new shape.
-
zero
public void zero()
Fills all elements in data that are in use to zero.
-
increment
public void increment(int row, int col)Increments the value at the specified coordinate by 1
-
sumRow
public int sumRow(int row)
Sums up all the elements in the specified row and returns the result
-
sumCol
public int sumCol(int col)
Sums up all the elements in the specified column and returns the result
-
maximumColIdx
public int maximumColIdx(int row)
Returns the column with the largest value in the specified row
-
maximumRowIdx
public int maximumRowIdx(int col)
Returns the row with the largest value in the specified column
-
sum
public int sum()
Sum of all the elements in the histogram
-
get
public int get(int row, int col)Value at the specified coordinate in the histogram
-
set
public void set(int row, int col, int value)Value at the specified coordinate in the histogram
-
indexOf
public int indexOf(int row, int col)Index of the specified coordinate
-
size
public int size()
Number of elements in the histogram
-
print
public void print(java.lang.String format)
Prints the histogram to stdout- Parameters:
format- Printf format for the value
-
-