Class ScoreRectifiedViewCoveragePixels

java.lang.Object
boofcv.alg.mvs.ScoreRectifiedViewCoveragePixels

public class ScoreRectifiedViewCoveragePixels extends Object
Scores different views to act as a common view based on coverage of rectified image. It works by using a shrunk down image to compute the area which would be covered by multiple stereo images. An image with more coverage and more images overlaying it is scored higher.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
    Average value of covered pixels
    double
    The actual fraction of the image covered by neighboring views
    int
    Maximum length the largest side can be
    double
    The found area covered score.
    double
    This is used to adjust the influence of average.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addView(int width, int height, DMatrixRMaj rect, float quality3D, boofcv.alg.mvs.ScoreRectifiedViewCoveragePixels.Operation op)
    Adds a view by specifying how target view would be rectified for this stereo pair.
    double
    fractionIntersection(int width, int height, DMatrixRMaj rect)
    Computes the fraction of the rectified image which is inside the image
    void
    initialize(int width, int height, PixelTransform<Point2D_F64> transform_pixel_to_undist)
    Initializes data structures and specifies lens distortion for the target view
    void
    Processes viewed image and computes a coverage score.

    Methods inherited from class java.lang.Object

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

    • maxSide

      public int maxSide
      Maximum length the largest side can be
    • score

      public double score
      The found area covered score. Computed from fraction of area covered and average count
    • scoreAverageOffset

      public double scoreAverageOffset
      This is used to adjust the influence of average. Larger the value less influence
    • covered

      public double covered
      The actual fraction of the image covered by neighboring views
    • averageValue

      public double averageValue
      Average value of covered pixels
  • Constructor Details

    • ScoreRectifiedViewCoveragePixels

      public ScoreRectifiedViewCoveragePixels()
  • Method Details

    • initialize

      public void initialize(int width, int height, PixelTransform<Point2D_F64> transform_pixel_to_undist)
      Initializes data structures and specifies lens distortion for the target view
      Parameters:
      width - Width of original image in this view
      height - Height of original image in this view
      transform_pixel_to_undist - Lens distortion model from distorted to undistorted pixels
    • addView

      public void addView(int width, int height, DMatrixRMaj rect, float quality3D, boofcv.alg.mvs.ScoreRectifiedViewCoveragePixels.Operation op)
      Adds a view by specifying how target view would be rectified for this stereo pair.
      Parameters:
      width - (Input) Width of the new view being added
      height - (Input) Height of the new view being added
      rect - (Input) Homography from undistorted pixels to rectified pixels in this view.
      quality3D - (Input) Signifies the quality of 3D information available. Higher numbers mean more 3D information from this view. A value of 0 indicates no 3D information. Typically this ranges from 0 to 1.
    • fractionIntersection

      public double fractionIntersection(int width, int height, DMatrixRMaj rect)
      Computes the fraction of the rectified image which is inside the image
    • process

      public void process()
      Processes viewed image and computes a coverage score.