|
// For complete examples and data files, please go to https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-java/ |
|
|
|
String fileName = "sample.png"; |
|
String remoteFolder = uploadFile(fileName); |
|
String storage = "Storage"; |
|
|
|
String type = DecodeBarcodeType.CODE11.getValue(); |
|
String checksumValidation = ChecksumValidation.OFF.toString(); |
|
Boolean detectEncoding = null; |
|
String preset = PresetType.HIGHPERFORMANCE.toString(); |
|
Integer rectX = null; |
|
Integer rectY = null; |
|
Integer rectWidth = null; |
|
Integer rectHeight = null; |
|
Boolean stripFNC = null; |
|
Integer timeout = null; |
|
Integer medianSmoothingWindowSize = null; |
|
Boolean allowMedianSmoothing = null; |
|
Boolean allowComplexBackground = null; |
|
Boolean allowDatamatrixIndustrialBarcodes = null; |
|
Boolean allowDecreasedImage = null; |
|
Boolean allowDetectScanGap = null; |
|
Boolean allowIncorrectBarcodes = null; |
|
Boolean allowInvertImage = null; |
|
Boolean allowMicroWhiteSpotsRemoving = null; |
|
Boolean allowOneDFastBarcodesDetector = null; |
|
Boolean allowOneDWipedBarsRestoration = null; |
|
Boolean allowQRMicroQrRestoration = null; |
|
Boolean allowRegularImage = null; |
|
Boolean allowSaltAndPepperFiltering = null; |
|
Boolean allowWhiteSpotsRemoving = null; |
|
Double regionLikelihoodThresholdPercent = null; |
|
List<Integer> scanWindowSizes = null; |
|
Double similarity = null; |
|
Boolean skipDiagonalSearch = null; |
|
String australianPostEncodingTable = null; |
|
String rectangleRegion = null; |
|
|
|
BarcodeResponseList response = |
|
api.getBarcodeRecognize( |
|
fileName,type,checksumValidation,detectEncoding,preset,rectX,rectY,rectWidth,rectHeight, |
|
stripFNC,timeout,medianSmoothingWindowSize,allowMedianSmoothing,allowComplexBackground, |
|
allowDatamatrixIndustrialBarcodes,allowDecreasedImage,allowDetectScanGap,allowIncorrectBarcodes, |
|
allowInvertImage,allowMicroWhiteSpotsRemoving,allowOneDFastBarcodesDetector,allowOneDWipedBarsRestoration, |
|
allowQRMicroQrRestoration,allowRegularImage,allowSaltAndPepperFiltering,allowWhiteSpotsRemoving, |
|
regionLikelihoodThresholdPercent,scanWindowSizes,similarity,skipDiagonalSearch, |
|
australianPostEncodingTable,rectangleRegion,storage,remoteFolder); |
|
|
|
assertNotNull(response); |
|
assertFalse(response.getBarcodes().isEmpty()); |
|
|
|
BarcodeResponse barcode = response.getBarcodes().get(0); |
|
assertEquals(type, barcode.getType()); |
|
assertEquals("1234567812", barcode.getBarcodeValue()); |