Package boofcv.abst.geo.bundle
Class ScaleSceneStructure
java.lang.Object
boofcv.abst.geo.bundle.ScaleSceneStructure
Normalizes variables in the scene to improve optimization performance. Different normalization is applied
depending on the points being homogenous or not, metric or projective.
Homogenous:
Each point is normalized such that the F-norm is equal to 1. Same goes for translation if metric.
Regular:
If points are 3D then their mean and standard deviation are computed. The points are transformed such that
the set will have a mean of zero and a standard deviation of 1.
- Call applyScale() to compute and then apply the transform
- Call undoScale() to revert back to the original coordinate system
-
Field Summary
Modifier and TypeFieldDescriptionPixel scaling for each view -
Constructor Summary
ConstructorDescriptionScaleSceneStructure
(double desiredDistancePoint) Configures how scaling is applied -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyScale
(SceneStructureMetric structure, SceneObservations observations) Applies the scale transform to the input scene structure.void
applyScale
(SceneStructureProjective structure, SceneObservations observations) Applies the scale transform to the input scene structure.void
applyScaleToPixelsAndCameraMatrix
(SceneStructureProjective structure, SceneObservations observations) boolean
void
setScalePixelsUsingStats
(boolean scalePixelsUsingStats) void
undoScale
(SceneStructureMetric structure, SceneObservations observations) Undoes scale transform for metric.void
undoScale
(SceneStructureProjective structure, SceneObservations observations) Undoes scale transform for projective scenesvoid
undoScaleToPixelsAndCameraMatrix
(SceneStructureProjective structure, SceneObservations observations)
-
Field Details
-
pixelScaling
Pixel scaling for each view
-
-
Constructor Details
-
ScaleSceneStructure
public ScaleSceneStructure(double desiredDistancePoint) Configures how scaling is applied- Parameters:
desiredDistancePoint
- desired scale for points to have
-
ScaleSceneStructure
public ScaleSceneStructure()
-
-
Method Details
-
applyScale
Applies the scale transform to the input scene structure. Metric.- Parameters:
structure
- 3D sceneobservations
- Observations of the scene
-
applyScale
Applies the scale transform to the input scene structure. Metric.- Parameters:
structure
- 3D sceneobservations
- Observations of the scene
-
applyScaleToPixelsAndCameraMatrix
public void applyScaleToPixelsAndCameraMatrix(SceneStructureProjective structure, SceneObservations observations) -
undoScaleToPixelsAndCameraMatrix
public void undoScaleToPixelsAndCameraMatrix(SceneStructureProjective structure, SceneObservations observations) -
undoScale
Undoes scale transform for metric.- Parameters:
structure
- scene's structureobservations
- observations of the scene
-
undoScale
Undoes scale transform for projective scenes- Parameters:
structure
- scene's structureobservations
- observations of the scene
-
isScalePixelsUsingStats
public boolean isScalePixelsUsingStats() -
setScalePixelsUsingStats
public void setScalePixelsUsingStats(boolean scalePixelsUsingStats)
-