public class SceneStructureMetric extends SceneStructureCommon
BundleAdjustment.
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.| Modifier and Type | Class and Description |
|---|---|
static class |
SceneStructureMetric.Camera
Camera which is viewing the scene.
|
static class |
SceneStructureMetric.Rigid
A set of connected points that form a rigid structure.
|
static class |
SceneStructureMetric.View
Observations from a camera of points.
|
SceneStructureCommon.Point| Modifier and Type | Field and Description |
|---|---|
SceneStructureMetric.Camera[] |
cameras |
int[] |
lookupRigid |
SceneStructureMetric.Rigid[] |
rigids |
SceneStructureMetric.View[] |
views |
homogenous, points, pointSize| Constructor and Description |
|---|
SceneStructureMetric(boolean homogenous)
Configure bundle adjustment
|
| Modifier and Type | Method and Description |
|---|---|
void |
assignIDsToRigidPoints()
Assigns an ID to all rigid points.
|
void |
connectViewToCamera(int viewIndex,
int cameraIndex)
Specifies that the view uses the specified camera
|
SceneStructureMetric.Camera[] |
getCameras() |
int |
getParameterCount()
Returns the total number of parameters which will be optimised
|
SceneStructureMetric.Rigid[] |
getRigids() |
int |
getTotalRigidPoints()
Returns total number of points associated with rigid objects.
|
int |
getUnknownCameraCount()
Returns the number of cameras with parameters that are not fixed
|
int |
getUnknownCameraParameterCount()
Counts the total number of unknown camera parameters that will be optimized/
|
int |
getUnknownRigidCount()
Returns the number of view with parameters that are not fixed
|
int |
getUnknownViewCount()
Returns the number of view with parameters that are not fixed
|
SceneStructureMetric.View[] |
getViews() |
boolean |
hasRigid()
Returns true if the scene contains rigid objects
|
void |
initialize(int totalCameras,
int totalViews,
int totalPoints)
Call this function first.
|
void |
initialize(int totalCameras,
int totalViews,
int totalPoints,
int totalRigid)
Call this function first.
|
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 |
setRigid(int which,
boolean fixed,
georegression.struct.se.Se3_F64 worldToObject,
int totalPoints)
Declares the data structure for a rigid object.
|
void |
setView(int which,
boolean fixed,
georegression.struct.se.Se3_F64 worldToView)
Specifies the spacial transform for a view.
|
connectPointToView, getObservationCount, getPoints, isHomogenous, removePoints, setPoint, setPointpublic SceneStructureMetric.Camera[] cameras
public SceneStructureMetric.View[] views
public SceneStructureMetric.Rigid[] rigids
public int[] lookupRigid
public SceneStructureMetric(boolean homogenous)
homogenous - if true then homogeneous coordinates are usedpublic void initialize(int totalCameras,
int totalViews,
int totalPoints)
totalCameras - Number of camerastotalViews - Number of viewstotalPoints - Number of pointspublic void initialize(int totalCameras,
int totalViews,
int totalPoints,
int totalRigid)
totalCameras - Number of camerastotalViews - Number of viewstotalPoints - Number of pointstotalRigid - Number of rigid objectspublic void assignIDsToRigidPoints()
public boolean hasRigid()
public void setCamera(int which,
boolean fixed,
BundleAdjustmentCamera model)
which - Which camera is being specifiedfixed - If these parameters are constant or notmodel - The camera modelpublic void setCamera(int which,
boolean fixed,
CameraPinhole intrinsic)
public void setCamera(int which,
boolean fixed,
CameraPinholeBrown intrinsic)
public void setView(int which,
boolean fixed,
georegression.struct.se.Se3_F64 worldToView)
which - Which view is being specified/fixed - If these parameters are fixed or notworldToView - The transform from world to view reference framespublic void setRigid(int which,
boolean fixed,
georegression.struct.se.Se3_F64 worldToObject,
int totalPoints)
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 objectpublic void connectViewToCamera(int viewIndex,
int cameraIndex)
viewIndex - index of viewcameraIndex - index of camerapublic int getUnknownCameraCount()
public int getUnknownViewCount()
public int getUnknownRigidCount()
public int getUnknownCameraParameterCount()
public int getTotalRigidPoints()
public int getParameterCount()
public SceneStructureMetric.Camera[] getCameras()
public SceneStructureMetric.View[] getViews()
public SceneStructureMetric.Rigid[] getRigids()