Package boofcv.struct
Class ImageGrid<T>
java.lang.Object
boofcv.struct.ImageGrid<T>
Breaks the image up into a grid. For use when processing individual regions of the image at a time. The size
of a cell is designed to be approximately the target size, but adjusted to ensure even coverage.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionget
(int row, int col) Returns the cell element at the specified grid coordinategetCellAtPixel
(int pixelX, int pixelY) Returns the cell at the specified pixel.void
initialize
(int targetLength, int imageWidth, int imageHeight) Initializes the grid based on how many pixels long a cell should be and the image size.void
processCells
(ImageGrid.ProcessCell<T> processor) Goes through every cell in the grid and passes in data to the processorvoid
processCellsThreads
(ImageGrid.ProcessCell<T> processor) Same asprocessCells(boofcv.struct.ImageGrid.ProcessCell<T>)
but threaded.
-
Field Details
-
cells
-
rows
public int rows -
cols
public int cols -
lengthX
public int lengthX -
lengthY
public int lengthY
-
-
Constructor Details
-
ImageGrid
-
-
Method Details
-
initialize
public void initialize(int targetLength, int imageWidth, int imageHeight) Initializes the grid based on how many pixels long a cell should be and the image size.- Parameters:
targetLength
- Target length of a grid cell in pixelsimageWidth
- Image width in pixelsimageHeight
- Image height in pixels
-
getCellAtPixel
Returns the cell at the specified pixel. Coordinate must be inside image bounds -
get
Returns the cell element at the specified grid coordinate -
processCells
Goes through every cell in the grid and passes in data to the processor -
processCellsThreads
Same asprocessCells(boofcv.struct.ImageGrid.ProcessCell<T>)
but threaded.
-