Class SceneStructureCommon

java.lang.Object
boofcv.abst.geo.bundle.SceneStructureCommon
All Implemented Interfaces:
SceneStructure
Direct Known Subclasses:
SceneStructureMetric, SceneStructureProjective

public abstract class SceneStructureCommon extends Object implements SceneStructure
Base class for implementations of SceneStructure. Contains data structures common to all implementations
  • Field Details

  • Constructor Details

    • SceneStructureCommon

      protected SceneStructureCommon(boolean homogenous)
  • Method Details

    • setHomogenous

      public void setHomogenous(boolean homogenous)
      Used to change if homogenous coordinates are used or not. All past points are discarded when this function is called
      Parameters:
      homogenous - true for homogenous coordinates or false for 3D cartesian
    • setPoint

      public void setPoint(int which, double x, double y, double z)
      Specifies the location of a point in 3D space
      Parameters:
      which - Which point is being specified
      x - coordinate along x-axis
      y - coordinate along y-axis
      z - coordinate along z-axis
    • setPoint

      public void setPoint(int which, double x, double y, double z, double w)
      Specifies the location of a point as a 3D homogenous coordinate
      Parameters:
      which - Which point is being specified
      x - coordinate along x-axis
      y - coordinate along y-axis
      z - coordinate along z-axis
      w - w-coordinate
    • setCamera

      public void setCamera(int which, boolean fixed, BundleAdjustmentCamera model)
      Specifies the camera model being used.
      Parameters:
      which - Which camera is being specified
      fixed - If these parameters are constant or not
      model - The camera model
    • setCamera

      public void setCamera(int which, boolean fixed, CameraPinhole intrinsic)
    • setCamera

      public void setCamera(int which, boolean fixed, CameraPinholeBrown intrinsic)
    • connectPointToView

      public void connectPointToView(int pointIndex, int viewIndex)
      Specifies that the point was observed in this view.
      Parameters:
      pointIndex - index of point
      viewIndex - index of view
    • getPoints

      public DogArray<SceneStructureCommon.Point> getPoints()
    • getCameras

      public DogArray<SceneStructureCommon.Camera> getCameras()
    • getCameraModel

      public <T extends BundleAdjustmentCamera> T getCameraModel(int cameraIndex)
    • getUnknownCameraParameterCount

      public int getUnknownCameraParameterCount()
      Counts the total number of unknown camera parameters that will be optimized/
      Returns:
      Number of parameters
    • removePoints

      public void removePoints(DogArray_I32 which)
      Removes the points specified in 'which' from the list of points. 'which' must be ordered from lowest to highest index.
      Parameters:
      which - Ordered list of point indexes to remove
    • isHomogenous

      public boolean isHomogenous()
      Description copied from interface: SceneStructure
      If true then homogenous coordinates are being used.
      Specified by:
      isHomogenous in interface SceneStructure
      Returns:
      true if homogenous coordinates
    • getObservationCount

      public int getObservationCount()