public static < T extends ImageGray < T > > InputToBinary < T > localOtsu ( ConfigLength regionWidth , double scale , boolean down , boolean otsu2 , double tuning , Class < T > inputType ) { if ( BOverrideFactoryThresholdBinary . localOtsu != null ) return BOverrideFactoryThresholdBinary . localOtsu . handle ( otsu2 , regionWidth , tuning , scale , down , inputType ) ; ThresholdLocalOtsu otsu ; if ( BoofConcurrency . USE_CONCURRENT ) { otsu = new ThresholdLocalOtsu_MT ( otsu2 , regionWidth , tuning , scale , down ) ; } else { otsu = new ThresholdLocalOtsu ( otsu2 , regionWidth , tuning , scale , down ) ; } return new InputToBinarySwitch <> ( otsu , inputType ) ; }
Applies a local Otsu threshold