public static double autoScale ( List < Point3D_F64 > cloud , double target ) { Point3D_F64 mean = new Point3D_F64 ( ) ; Point3D_F64 stdev = new Point3D_F64 ( ) ; statistics ( cloud , mean , stdev ) ; double scale = target / ( Math . max ( Math . max ( stdev . x , stdev . y ) , stdev . z ) ) ; int N = cloud . size ( ) ; for ( int i = 0 ; i < N ; i ++ ) { cloud . get ( i ) . scale ( scale ) ; } return scale ; }
Automatically rescales the point cloud based so that it has a standard deviation of target