public static EstimateNofPnP pnp_N ( EnumPNP which , int numIterations ) { MotionTransformPoint < Se3_F64 , Point3D_F64 > motionFit = FitSpecialEuclideanOps_F64 . fitPoints3D ( ) ; switch ( which ) { case P3P_GRUNERT : P3PGrunert grunert = new P3PGrunert ( PolynomialOps . createRootFinder ( 5 , RootFinderType . STURM ) ) ; return new WrapP3PLineDistance ( grunert , motionFit ) ; case P3P_FINSTERWALDER : P3PFinsterwalder finster = new P3PFinsterwalder ( PolynomialOps . createRootFinder ( 4 , RootFinderType . STURM ) ) ; return new WrapP3PLineDistance ( finster , motionFit ) ; case EPNP : Estimate1ofPnP epnp = pnp_1 ( which , numIterations , 0 ) ; return new Estimate1toNofPnP ( epnp ) ; case IPPE : Estimate1ofEpipolar H = FactoryMultiView . homographyTLS ( ) ; return new Estimate1toNofPnP ( new IPPE_to_EstimatePnP ( H ) ) ; } throw new IllegalArgumentException ( "Type " + which + " not known" ) ; }
Creates an estimator for the PnP problem that uses only three observations which is the minimal case and known as P3P .