Class PnPDistanceReprojectionSq

  • All Implemented Interfaces:
    DistanceFromModelMultiView<georegression.struct.se.Se3_F64,​Point2D3D>, org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.se.Se3_F64,​Point2D3D>

    public class PnPDistanceReprojectionSq
    extends java.lang.Object
    implements DistanceFromModelMultiView<georegression.struct.se.Se3_F64,​Point2D3D>

    Computes the reprojection error squared for a given motion and Point2D3D. If the intrinsic parameters are provided then the error will be computed in pixels. Observations are assumed to be in normalized image coordinates.

    error = (x'-x)^2 + (y' - y)^2

    where (x,y) is the observed point location and (x',y') is the reprojected point from the 3D coordinate and coordinate transformation.

    • Constructor Detail

      • PnPDistanceReprojectionSq

        public PnPDistanceReprojectionSq()
    • Method Detail

      • setModel

        public void setModel​(georegression.struct.se.Se3_F64 worldToCamera)
        Specified by:
        setModel in interface org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.se.Se3_F64,​Point2D3D>
      • computeDistance

        public double computeDistance​(Point2D3D pt)
        Specified by:
        computeDistance in interface org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.se.Se3_F64,​Point2D3D>
      • computeDistance

        public void computeDistance​(java.util.List<Point2D3D> observations,
                                    double[] distance)
        Specified by:
        computeDistance in interface org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.se.Se3_F64,​Point2D3D>
      • getPointType

        public java.lang.Class<Point2D3D> getPointType()
        Specified by:
        getPointType in interface org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.se.Se3_F64,​Point2D3D>
      • getModelType

        public java.lang.Class<georegression.struct.se.Se3_F64> getModelType()
        Specified by:
        getModelType in interface org.ddogleg.fitting.modelset.DistanceFromModel<georegression.struct.se.Se3_F64,​Point2D3D>