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
Modifier and TypeClassDescriptionstatic class
Camera which is viewing the scene.static class
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
True if homogenous coordinates are being usedprotected int
number of elements in a point. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
connectPointToView
(int pointIndex, int viewIndex) Specifies that the point was observed in this view.<T extends BundleAdjustmentCamera>
TgetCameraModel
(int cameraIndex) int
int
Counts the total number of unknown camera parameters that will be optimized/boolean
If true then homogenous coordinates are being used.void
removePoints
(DogArray_I32 which) Removes the points specified in 'which' from the list of points.void
setCamera
(int which, boolean fixed, BundleAdjustmentCamera model) Specifies the camera model being used.void
setCamera
(int which, boolean fixed, CameraPinhole intrinsic) void
setCamera
(int which, boolean fixed, CameraPinholeBrown intrinsic) void
setHomogenous
(boolean homogenous) Used to change if homogenous coordinates are used or not.void
setPoint
(int which, double x, double y, double z) Specifies the location of a point in 3D spacevoid
setPoint
(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, wait
Methods 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:SceneStructure
If true then homogenous coordinates are being used.- Specified by:
isHomogenous
in interfaceSceneStructure
- Returns:
- true if homogenous coordinates
-
getObservationCount
public int getObservationCount()
-