Package boofcv.abst.geo.bundle
Class SceneStructureMetric
- java.lang.Object
-
- boofcv.abst.geo.bundle.SceneStructureCommon
-
- boofcv.abst.geo.bundle.SceneStructureMetric
-
- All Implemented Interfaces:
SceneStructure
public class SceneStructureMetric extends SceneStructureCommon
Specifies a metric (calibrated) scene for optimizing usingBundleAdjustment. It specifies the relationships between cameras, views, and points. A camera projects a 3D point onto the image plane. Examples of specific models include pinhole and fisheye. A view is a set of observed features from a specific camera image. Views have an associated camera and specify the pose of the camera when the scene was viewed. Points describe the scene's 3D structure. Points belonging to the general scene and rigid objects have two different sets of ID's.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSceneStructureMetric.RigidA set of connected points that form a rigid structure.static classSceneStructureMetric.ViewObservations from a camera of points.-
Nested classes/interfaces inherited from class boofcv.abst.geo.bundle.SceneStructureCommon
SceneStructureCommon.Camera, SceneStructureCommon.Point
-
-
Field Summary
Fields Modifier and Type Field Description int[]lookupRigidorg.ddogleg.struct.FastQueue<SceneStructureMetric.Rigid>rigidsorg.ddogleg.struct.FastQueue<SceneStructureMetric.View>views-
Fields inherited from class boofcv.abst.geo.bundle.SceneStructureCommon
cameras, homogenous, points, pointSize
-
-
Constructor Summary
Constructors Constructor Description SceneStructureMetric(boolean homogenous)Configure bundle adjustment
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassignIDsToRigidPoints()Assigns an ID to all rigid points.voidconnectViewToCamera(int viewIndex, int cameraIndex)Specifies that the view uses the specified cameraintgetParameterCount()Returns the total number of parameters which will be optimisedorg.ddogleg.struct.FastQueue<SceneStructureMetric.Rigid>getRigids()intgetTotalRigidPoints()Returns total number of points associated with rigid objects.intgetUnknownCameraCount()Returns the number of cameras with parameters that are not fixedintgetUnknownRigidCount()Returns the number of view with parameters that are not fixedintgetUnknownViewCount()Returns the number of view with parameters that are not fixedorg.ddogleg.struct.FastQueue<SceneStructureMetric.View>getViews()booleanhasRigid()Returns true if the scene contains rigid objectsvoidinitialize(int totalCameras, int totalViews, int totalPoints)Call this function first.voidinitialize(int totalCameras, int totalViews, int totalPoints, int totalRigid)Call this function first.voidsetRigid(int which, boolean fixed, georegression.struct.se.Se3_F64 worldToObject, int totalPoints)Declares the data structure for a rigid object.voidsetView(int which, boolean fixed, georegression.struct.se.Se3_F64 worldToView)Specifies the spacial transform for a view.-
Methods inherited from class boofcv.abst.geo.bundle.SceneStructureCommon
connectPointToView, getCameras, getObservationCount, getPoints, getUnknownCameraParameterCount, isHomogenous, removePoints, setCamera, setCamera, setCamera, setPoint, setPoint
-
-
-
-
Field Detail
-
views
public org.ddogleg.struct.FastQueue<SceneStructureMetric.View> views
-
rigids
public org.ddogleg.struct.FastQueue<SceneStructureMetric.Rigid> rigids
-
lookupRigid
public int[] lookupRigid
-
-
Method Detail
-
initialize
public void initialize(int totalCameras, int totalViews, int totalPoints)Call this function first. Specifies number of each type of data which is available.- Parameters:
totalCameras- Number of camerastotalViews- Number of viewstotalPoints- Number of points
-
initialize
public void initialize(int totalCameras, int totalViews, int totalPoints, int totalRigid)Call this function first. Specifies number of each type of data which is available.- Parameters:
totalCameras- Number of camerastotalViews- Number of viewstotalPoints- Number of pointstotalRigid- Number of rigid objects
-
assignIDsToRigidPoints
public void assignIDsToRigidPoints()
Assigns an ID to all rigid points. This function does not need to be called by the user as it will be called by the residual function if needed
-
hasRigid
public boolean hasRigid()
Returns true if the scene contains rigid objects
-
setView
public void setView(int which, boolean fixed, georegression.struct.se.Se3_F64 worldToView)Specifies the spacial transform for a view.- Parameters:
which- Which view is being specified/fixed- If these parameters are fixed or notworldToView- The transform from world to view reference frames. Internal copy is saved.
-
setRigid
public void setRigid(int which, boolean fixed, georegression.struct.se.Se3_F64 worldToObject, int totalPoints)Declares the data structure for a rigid object. Location of points are set by accessing the object directly. Rigid objects are useful in known scenes with calibration targets.- Parameters:
which- Index of rigid objectfixed- If the pose is known or notworldToObject- Initial estimated location of rigid objecttotalPoints- Total number of points attached to this rigid object
-
connectViewToCamera
public void connectViewToCamera(int viewIndex, int cameraIndex)Specifies that the view uses the specified camera- Parameters:
viewIndex- index of viewcameraIndex- index of camera
-
getUnknownCameraCount
public int getUnknownCameraCount()
Returns the number of cameras with parameters that are not fixed- Returns:
- non-fixed camera count
-
getUnknownViewCount
public int getUnknownViewCount()
Returns the number of view with parameters that are not fixed- Returns:
- non-fixed view count
-
getUnknownRigidCount
public int getUnknownRigidCount()
Returns the number of view with parameters that are not fixed- Returns:
- non-fixed view count
-
getTotalRigidPoints
public int getTotalRigidPoints()
Returns total number of points associated with rigid objects.
-
getParameterCount
public int getParameterCount()
Returns the total number of parameters which will be optimised- Returns:
- number of parameters
-
getViews
public org.ddogleg.struct.FastQueue<SceneStructureMetric.View> getViews()
-
getRigids
public org.ddogleg.struct.FastQueue<SceneStructureMetric.Rigid> getRigids()
-
-