本文整理汇总了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;
}
示例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));
}