Class ImageCoverage


  • public class ImageCoverage
    extends java.lang.Object
    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:
    ConfigGridUniform, ImageGrid
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static class  ImageCoverage.Cell
      Specifies if each cell in the grid contains at least one feature
    • Field Summary

      Fields 
      Modifier and Type Field Description
      boofcv.struct.ConfigGridUniform configUniform
      Configuration for overlaying a grid.
      double fraction
      Fraction of the image covered by image features
      boofcv.struct.ImageGrid<ImageCoverage.Cell> grid  
      int targetCellPixels
      Automatically computed.
    • Constructor Summary

      Constructors 
      Constructor Description
      ImageCoverage()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void 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 coverage
      void reset​(int maxFeatures, int width, int height)
      Resets and adjusts the grid size
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • configUniform

        public final boofcv.struct.ConfigGridUniform configUniform
        Configuration for overlaying a grid. You probably want to leave this as is
      • fraction

        public double fraction
        Fraction of the image covered by image features
      • targetCellPixels

        public int targetCellPixels
        Automatically computed. The targeted cell size in pixels. See ImageGrid
    • Constructor Detail

      • ImageCoverage

        public ImageCoverage()
    • 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 image
        width - image width
        height - 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