Package boofcv.alg.misc
Class ImageCoverage
java.lang.Object
boofcv.alg.misc.ImageCoverage
Computes 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:
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Specifies if each cell in the grid contains at least one feature -
Field Summary
Modifier and TypeFieldDescriptionfinal ConfigGridUniform
Configuration for overlaying a grid.double
Fraction of the image covered by image featuresfinal ImageGrid<ImageCoverage.Cell>
int
Automatically computed. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
markPixel
(int pixelX, int pixelY) Marks a pixel in the image as having contained a feature.void
process()
Given the filled in grid it computes the fraction of cells with coveragevoid
reset
(int maxFeatures, int width, int height) Resets and adjusts the grid size
-
Field Details
-
configUniform
Configuration for overlaying a grid. You probably want to leave this as is -
grid
-
fraction
public double fractionFraction of the image covered by image features -
targetCellPixels
public int targetCellPixelsAutomatically computed. The targeted cell size in pixels. SeeImageGrid
-
-
Constructor Details
-
ImageCoverage
public ImageCoverage()
-
-
Method Details
-
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
-