当前位置: 首页>>代码示例>>Java>>正文


Java GThresholdImageOps.localSauvola方法代码示例

本文整理汇总了Java中boofcv.alg.filter.binary.GThresholdImageOps.localSauvola方法的典型用法代码示例。如果您正苦于以下问题:Java GThresholdImageOps.localSauvola方法的具体用法?Java GThresholdImageOps.localSauvola怎么用?Java GThresholdImageOps.localSauvola使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在boofcv.alg.filter.binary.GThresholdImageOps的用法示例。


在下文中一共展示了GThresholdImageOps.localSauvola方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doInBackground

import boofcv.alg.filter.binary.GThresholdImageOps; //导入方法依赖的package包/类
@Override
protected Bitmap doInBackground(String... params) {

    Bitmap image = BitmapFactory.decodeFile(params[0]);

    Bitmap image2 = Bitmap.createScaledBitmap(image, 500, 500, false);

    // convert into a usable format
    ImageFloat32 input = ConvertBitmap.bitmapToGray(image2,(ImageFloat32)null,null);                    //(image, null, ImageFloat32.class);

    ImageUInt8 binary = new ImageUInt8(input.width,input.height);

    GThresholdImageOps.localSauvola(input, binary, progress, 0.3f, false);
    VisualizeImageData.binaryToBitmap(binary, false, image2, null);

    image = image2;
    return image;
}
 
开发者ID:acien101,项目名称:DiedricoApp,代码行数:19,代码来源:Thresholding.java

示例2: thresholdSauvola

import boofcv.alg.filter.binary.GThresholdImageOps; //导入方法依赖的package包/类
/**
 * @see GThresholdImageOps#localSauvola
 *
 * @param radius Radius of adaptive region
 * @param k Positive parameter used to tune threshold.  Try 0.3
 */
public SimpleBinary thresholdSauvola( int radius, double k , boolean down ) {
	return new SimpleBinary(GThresholdImageOps.localSauvola(image, null, radius, (float) k, down));
}
 
开发者ID:lessthanoptimal,项目名称:BoofProcessing,代码行数:10,代码来源:SimpleGray.java


注:本文中的boofcv.alg.filter.binary.GThresholdImageOps.localSauvola方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。