Package boofcv.alg.misc
Class ImageCoverage
- java.lang.Object
-
- boofcv.alg.misc.ImageCoverage
-
public class ImageCoverage extends java.lang.ObjectComputes the fraction / percent of an image which is covered by image features. Converage is computed by overlaying a grid on top of the image. The size of a cell depends on the maximum number of possible features which can be detected.- See Also:
ConfigGridUniform,ImageGrid
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classImageCoverage.CellSpecifies if each cell in the grid contains at least one feature
-
Field Summary
Fields Modifier and Type Field Description boofcv.struct.ConfigGridUniformconfigUniformConfiguration for overlaying a grid.doublefractionFraction of the image covered by image featuresboofcv.struct.ImageGrid<ImageCoverage.Cell>gridinttargetCellPixelsAutomatically computed.
-
Constructor Summary
Constructors Constructor Description ImageCoverage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmarkPixel(int pixelX, int pixelY)Marks a pixel in the image as having contained a feature.voidprocess()Given the filled in grid it computes the fraction of cells with coveragevoidreset(int maxFeatures, int width, int height)Resets and adjusts the grid size
-
-
-
Field Detail
-
configUniform
public final boofcv.struct.ConfigGridUniform configUniform
Configuration for overlaying a grid. You probably want to leave this as is
-
grid
public final boofcv.struct.ImageGrid<ImageCoverage.Cell> grid
-
fraction
public double fraction
Fraction of the image covered by image features
-
targetCellPixels
public int targetCellPixels
Automatically computed. The targeted cell size in pixels. SeeImageGrid
-
-
Method Detail
-
reset
public void reset(int maxFeatures, int width, int height)Resets and adjusts the grid size- Parameters:
maxFeatures- Maximum number of features which can be inside an imagewidth- image widthheight- image height
-
markPixel
public void markPixel(int pixelX, int pixelY)Marks a pixel in the image as having contained a feature. The pixel must lie inside the image. Outside pixels have undefined and likely very bad behavior.
-
process
public void process()
Given the filled in grid it computes the fraction of cells with coverage
-
-