private boolean extractCalibration ( DMatrixRMaj x , CameraPinhole calibration ) { double s = x . data [ 5 ] ; double cx = calibration . cx = x . data [ 2 ] / s ; double cy = calibration . cy = x . data [ 4 ] / s ; double fy = calibration . fy = Math . sqrt ( x . data [ 3 ] / s - cy * cy ) ; double sk = calibration . skew = ( x . data [ 1 ] / s - cx * cy ) / fy ; calibration . fx = Math . sqrt ( x . data [ 0 ] / s - sk * sk - cx * cx ) ; if ( calibration . fx < 0 || calibration . fy < 0 ) return false ; if ( UtilEjml . isUncountable ( fy ) || UtilEjml . isUncountable ( calibration . fx ) ) return false ; if ( UtilEjml . isUncountable ( sk ) ) return false ; return true ; }
Extracts camera parameters from the solution . Checks for errors