public class PixelDepthLinear
extends java.lang.Object
Computes the depth (value of z-axis in frame A) for a single point feature given N observations and N-1 rigid camera transforms. The estimate will be optimal an algebraic sense, but not in a Euclidean sense. Two variants are provided in this class, for 2 views and N>1 views. All pixel coordinates are in calibrated units.
This linear estimation of pixel depth is done using the following equation:
λ1*hat(x2)*R*x1 + hat(x2)*T = 0
where λ1 is the pixel depth in the first image, x is an observation in calibrated
homogeneous coordinates, and (R,T) is a rigid body transformation. Modified implementation of the algorithm
described in [1].
To go from pixel depth to a 3D coordinate simply multiply the observation in calibrated (z=1) homogeneous coordinates by the returned depth.
[1] Page 267 in Y. Ma, S. Soatto, J. Kosecka, and S. S. Sastry, "An Invitation to 3-D Vision" Springer-Verlad, 2004
| Constructor and Description |
|---|
PixelDepthLinear() |
| Modifier and Type | Method and Description |
|---|---|
double |
depth2View(georegression.struct.point.Point2D_F64 a,
georegression.struct.point.Point2D_F64 b,
georegression.struct.se.Se3_F64 fromAtoB)
Computes pixel depth in image 'a' from two observations.
|
double |
depthNView(java.util.List<georegression.struct.point.Point2D_F64> obs,
java.util.List<georegression.struct.se.Se3_F64> motion)
Computes the pixel depth from N views of the same object.
|
public double depthNView(java.util.List<georegression.struct.point.Point2D_F64> obs,
java.util.List<georegression.struct.se.Se3_F64> motion)
obs - List of observations on a single feature in normalized coordinatesmotion - List of camera motions. Each index 'i' is the motion from view 0 to view i+1.public double depth2View(georegression.struct.point.Point2D_F64 a,
georegression.struct.point.Point2D_F64 b,
georegression.struct.se.Se3_F64 fromAtoB)
a - Observation in first frame. In calibrated coordinates. Not modified.b - Observation in second frame. In calibrated coordinates. Not modified.fromAtoB - Transform from frame a to frame b.