// For complete examples and data files, please go to https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-java/ | |
String type = null; | |
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; | |
String url = null; | |
Path currentRelativePath = Paths.get(""); | |
String currentPath = currentRelativePath.toAbsolutePath().toString(); | |
Path filePath = Paths.get(currentPath, "data", "sample.png"); | |
File image = new File(String.valueOf(filePath)); | |
BarcodeResponseList response = | |
api.postBarcodeRecognizeFromUrlOrContent( | |
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,url,image); | |
assertNotNull(response); | |
assertFalse(response.getBarcodes().isEmpty()); | |
BarcodeResponse barcode = response.getBarcodes().get(0); | |
assertEquals(DecodeBarcodeType.CODE11.getValue(), barcode.getType()); | |
assertEquals("1234567812", barcode.getBarcodeValue()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment