Class PixelDepthLinearMetric


  • public class PixelDepthLinearMetric
    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

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PixelDepthLinearMetric

        public PixelDepthLinearMetric()
    • Method Detail

      • depthNView

        public 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. Pixel depth in the first frame.
        Parameters:
        obs - List of observations on a single feature in normalized coordinates
        motion - List of camera motions. Each index 'i' is the motion from view 0 to view i+1.
        Returns:
        depth of the pixels
      • depth2View

        public 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.
        Parameters:
        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.
        Returns:
        Pixel depth in first frame. In same units as T inside of fromAtoB.