本文整理汇总了Java中com.google.zxing.common.BitMatrix.clone方法的典型用法代码示例。如果您正苦于以下问题:Java BitMatrix.clone方法的具体用法?Java BitMatrix.clone怎么用?Java BitMatrix.clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.zxing.common.BitMatrix
的用法示例。
在下文中一共展示了BitMatrix.clone方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: detect
import com.google.zxing.common.BitMatrix; //导入方法依赖的package包/类
/**
* <p>Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.</p>
*
* @param image barcode image to decode
* @param hints optional hints to detector
* @param multiple if true, then the image is searched for multiple codes. If false, then at most one code will
* be found and returned
* @return {@link PDF417DetectorResult} encapsulating results of detecting a PDF417 code
* @throws NotFoundException if no PDF417 Code can be found
*/
public static PDF417DetectorResult detect(BinaryBitmap image, Map<DecodeHintType,?> hints, boolean multiple)
throws NotFoundException {
// TODO detection improvement, tryHarder could try several different luminance thresholds/blackpoints or even
// different binarizers
//boolean tryHarder = hints != null && hints.containsKey(DecodeHintType.TRY_HARDER);
BitMatrix bitMatrix = image.getBlackMatrix();
List<ResultPoint[]> barcodeCoordinates = detect(multiple, bitMatrix);
if (barcodeCoordinates.isEmpty()) {
bitMatrix = bitMatrix.clone();
bitMatrix.rotate180();
barcodeCoordinates = detect(multiple, bitMatrix);
}
return new PDF417DetectorResult(bitMatrix, barcodeCoordinates);
}
示例2: detect
import com.google.zxing.common.BitMatrix; //导入方法依赖的package包/类
public static PDF417DetectorResult detect(BinaryBitmap image, Map<DecodeHintType, ?> map,
boolean multiple) throws NotFoundException {
BitMatrix bitMatrix = image.getBlackMatrix();
List<ResultPoint[]> barcodeCoordinates = detect(multiple, bitMatrix);
if (barcodeCoordinates.isEmpty()) {
bitMatrix = bitMatrix.clone();
bitMatrix.rotate180();
barcodeCoordinates = detect(multiple, bitMatrix);
}
return new PDF417DetectorResult(bitMatrix, barcodeCoordinates);
}