Package boofcv.abst.geo.bundle
Class SceneStructureCommon
java.lang.Object
boofcv.abst.geo.bundle.SceneStructureCommon
- All Implemented Interfaces:
SceneStructure
- Direct Known Subclasses:
SceneStructureMetric,SceneStructureProjective
Base class for implementations of
SceneStructure. Contains data structures
common to all implementations-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCamera which is viewing the scene.static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanTrue if homogenous coordinates are being usedprotected intnumber of elements in a point. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconnectPointToView(int pointIndex, int viewIndex) Specifies that the point was observed in this view.<T extends BundleAdjustmentCamera>
TgetCameraModel(int cameraIndex) intintCounts the total number of unknown camera parameters that will be optimized/booleanIf true then homogenous coordinates are being used.voidremovePoints(DogArray_I32 which) Removes the points specified in 'which' from the list of points.voidsetCamera(int which, boolean fixed, BundleAdjustmentCamera model) Specifies the camera model being used.voidsetCamera(int which, boolean fixed, CameraPinhole intrinsic) voidsetCamera(int which, boolean fixed, CameraPinholeBrown intrinsic) voidsetHomogenous(boolean homogenous) Used to change if homogenous coordinates are used or not.voidsetPoint(int which, double x, double y, double z) Specifies the location of a point in 3D spacevoidsetPoint(int which, double x, double y, double z, double w) Specifies the location of a point as a 3D homogenous coordinateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface boofcv.abst.geo.bundle.SceneStructure
getParameterCount
-
Field Details
-
cameras
-
points
-
homogenous
protected boolean homogenousTrue if homogenous coordinates are being used -
pointSize
protected int pointSizenumber of elements in a point. Will be 3 or 4
-
-
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 specifiedx- coordinate along x-axisy- coordinate along y-axisz- 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 specifiedx- coordinate along x-axisy- coordinate along y-axisz- coordinate along z-axisw- w-coordinate
-
setCamera
Specifies the camera model being used.- Parameters:
which- Which camera is being specifiedfixed- If these parameters are constant or notmodel- The camera model
-
setCamera
-
setCamera
-
connectPointToView
public void connectPointToView(int pointIndex, int viewIndex) Specifies that the point was observed in this view.- Parameters:
pointIndex- index of pointviewIndex- index of view
-
getPoints
-
getCameras
-
getCameraModel
-
getUnknownCameraParameterCount
public int getUnknownCameraParameterCount()Counts the total number of unknown camera parameters that will be optimized/- Returns:
- Number of parameters
-
removePoints
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:SceneStructureIf true then homogenous coordinates are being used.- Specified by:
isHomogenousin interfaceSceneStructure- Returns:
- true if homogenous coordinates
-
getObservationCount
public int getObservationCount()
-