Class FactoryMotion2D

java.lang.Object
boofcv.factory.sfm.FactoryMotion2D

public class FactoryMotion2D extends Object
Factory for creating algorithms related to 2D image motion. Typically used for image stabilization, mosaic, and motion detection in video feeds.
  • Constructor Details

    • FactoryMotion2D

      public FactoryMotion2D()
  • Method Details

    • createMotion2D

      public static <I extends ImageBase<I>, IT extends InvertibleTransform<IT>> ImageMotion2D<I,IT> createMotion2D(int ransacIterations, double inlierThreshold, int outlierPrune, int absoluteMinimumTracks, double respawnTrackFraction, double respawnCoverageFraction, boolean refineEstimate, PointTracker<I> tracker, IT motionModel)
      Estimates the 2D motion of an image using different models.
      Type Parameters:
      I - Image input type.
      IT - Model model
      Parameters:
      ransacIterations - Number of RANSAC iterations
      inlierThreshold - Threshold which defines an inlier.
      outlierPrune - If a feature is an outlier for this many turns in a row it is dropped. Try 2
      absoluteMinimumTracks - New features will be respawned if the number of inliers drop below this number.
      respawnTrackFraction - If the fraction of current inliers to the original number of inliers drops below this fraction then new features are spawned. Try 0.3
      respawnCoverageFraction - If the area covered drops by this fraction then spawn more features. Try 0.8
      refineEstimate - Should it refine the model estimate using all inliers.
      tracker - Point feature tracker.
      motionModel - Instance of the model model used. Affine2D_F64 or Homography2D_F64
      Returns:
      ImageMotion2D
    • createVideoStitch

      public static <I extends ImageBase<I>, IT extends InvertibleTransform<IT>> StitchingFromMotion2D<I,IT> createVideoStitch(double maxJumpFraction, ImageMotion2D<I,IT> motion2D, ImageType<I> imageType)
      Estimates the image motion then combines images together. Typically used for mosaics and stabilization.
      Type Parameters:
      I - Image input type.
      IT - Model model
      Parameters:
      maxJumpFraction - If the area changes by this much between two consecuative frames then the transform is reset.
      motion2D - Estimates the image motion.
      imageType - Type of image processed
      Returns:
      StitchingFromMotion2D