Search in sources :

Example 1 with ConfigThresholdLocalOtsu

use of boofcv.factory.filter.binary.ConfigThresholdLocalOtsu in project BoofCV by lessthanoptimal.

the class ThresholdControlPanel method createConfig.

public ConfigThreshold createConfig() {
    ConfigThreshold config;
    if (type == ThresholdType.BLOCK_MIN_MAX) {
        ConfigThresholdBlockMinMax _config = new ConfigThresholdBlockMinMax();
        _config.minimumSpread = minimumSpread;
        config = _config;
    } else if (type == ThresholdType.BLOCK_OTSU || type == ThresholdType.LOCAL_OTSU) {
        ConfigThresholdLocalOtsu _config = new ConfigThresholdLocalOtsu();
        _config.tuning = otsuTuning;
        _config.useOtsu2 = useOtsu2;
        config = _config;
    } else {
        config = new ConfigThreshold();
        config.fixedThreshold = fixedThreshold;
    }
    config.type = type;
    config.scale = scale;
    config.down = down;
    config.width = regionWidth.copy();
    config.savolaK = savolaK;
    config.minPixelValue = minPixelValue;
    config.maxPixelValue = maxPixelValue;
    config.thresholdFromLocalBlocks = thresholdLocalBlocks;
    return config;
}
Also used : ConfigThreshold(boofcv.factory.filter.binary.ConfigThreshold) ConfigThresholdLocalOtsu(boofcv.factory.filter.binary.ConfigThresholdLocalOtsu) ConfigThresholdBlockMinMax(boofcv.factory.filter.binary.ConfigThresholdBlockMinMax)

Aggregations

ConfigThreshold (boofcv.factory.filter.binary.ConfigThreshold)1 ConfigThresholdBlockMinMax (boofcv.factory.filter.binary.ConfigThresholdBlockMinMax)1 ConfigThresholdLocalOtsu (boofcv.factory.filter.binary.ConfigThresholdLocalOtsu)1