private Intrinsic solveForCalibration ( DMatrixRMaj w ) { Intrinsic calib = new Intrinsic ( ) ; // CholeskyDecomposition_F64<DMatrixRMaj> chol = DecompositionFactory_DDRM.chol(false); // // chol.decompose(w.copy()); // DMatrixRMaj R = chol.getT(w); // R.print(); if ( zeroSkew ) { calib . skew = 0 ; calib . fy = Math . sqrt ( w . get ( 1 , 1 ) ) ; if ( knownAspect ) { calib . fx = calib . fy / aspectRatio ; } else { calib . fx = Math . sqrt ( w . get ( 0 , 0 ) ) ; } } else if ( knownAspect ) { calib . fy = Math . sqrt ( w . get ( 1 , 1 ) ) ; calib . fx = calib . fy / aspectRatio ; calib . skew = w . get ( 0 , 1 ) / calib . fy ; } else { calib . fy = Math . sqrt ( w . get ( 1 , 1 ) ) ; calib . skew = w . get ( 0 , 1 ) / calib . fy ; calib . fx = Math . sqrt ( w . get ( 0 , 0 ) - calib . skew * calib . skew ) ; } return calib ; }
Given the solution for w and the constraints solve for the remaining parameters