class function GetThresholder(thresholderName: string; settings: string; bitmap: IImageAdapter): Thresholder; overload;
Factory method that produces needed thresholder.Where thresholderName on of const THRESHOLDER_KEY_AVG = 'AVERAGE'; THRESHOLDER_KEY_MAXIMUM_ENTROPY = 'MAXIMUM ENTROPY'; THRESHOLDER_KEY_OTSU = 'OTSU'; HRESHOLDER_KEY_SIMPLE = 'SIMPLE'; HRESHOLDER_KEY_TRIANGLE = 'TRIANGLE'; HRESHOLDER_KEY_MINMAX = 'MINMAX';
and settings are comma separated values required by thresholder. SIMPLE thresholder needs an integer threshold value (default 127) MINMAX thresholder needs 2 integers: Neighborhood size (3..7) default is 4, and bias value (0..255) default is 0;
aThresholder = ThresholderFactory.GetThresholder('AVERAGE','',bitmap); aThresholder = ThresholderFactory.GetThresholder('Simple','100',bitmap); //Note: Thresholder name is eys are case insensetive. aThresholder = ThresholderFactory.GetThresholder('MinMax','4,10',bitmap);