public void undoScale ( SceneStructureMetric structure , SceneObservations observations ) { if ( structure . homogenous ) return ; double scale = desiredDistancePoint / medianDistancePoint ; undoNormPoints3D ( structure , scale ) ; Point3D_F64 c = new Point3D_F64 ( ) ; for ( int i = 0 ; i < structure . views . length ; i ++ ) { SceneStructureMetric . View view = structure . views [ i ] ; // X_w = R'*(X_c - T) let X_c = 0 then X_w = -R'*T is center of camera in world GeometryMath_F64 . multTran ( view . worldToView . R , view . worldToView . T , c ) ; // Apply transform c . x = ( - c . x / scale + medianPoint . x ) ; c . y = ( - c . y / scale + medianPoint . y ) ; c . z = ( - c . z / scale + medianPoint . z ) ; // -R*T GeometryMath_F64 . mult ( view . worldToView . R , c , view . worldToView . T ) ; view . worldToView . T . scale ( - 1 ) ; } }
Undoes scale transform for metric .