Skip to content

Commit

Permalink
Added AllowAdditionalRestorations flag to reader params (#63)
Browse files Browse the repository at this point in the history
Added  DataMatrixVersion enum and  DataMatrixVersion param into DataMatrixParams
  • Loading branch information
ivankamkin authored Aug 30, 2023
1 parent 0244c5e commit 5decb48
Show file tree
Hide file tree
Showing 13 changed files with 449 additions and 10 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Freleases.aspose.cloud%2Fjava%2Frepo%2Fcom%2Faspose%2Faspose-barcode-cloud%2Fmaven-metadata.xml)](https://releases.aspose.cloud/java/repo/com/aspose/aspose-barcode-cloud/)

- API version: 3.0
- SDK version: 23.7.0
- SDK version: 23.8.0

## Demo applications

Expand Down Expand Up @@ -68,7 +68,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-barcode-cloud</artifactId>
<version>23.7.0</version>
<version>23.8.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -83,7 +83,7 @@ mvn clean package

Then manually install the following JARs:

- `target/aspose-barcode-cloud-23.7.0.jar`
- `target/aspose-barcode-cloud-23.8.0.jar`
- `target/lib/*.jar`

## Getting Started
Expand Down Expand Up @@ -213,6 +213,7 @@ Class | Method | HTTP request | Description
- [DataMatrixEccType](docs/DataMatrixEccType.md)
- [DataMatrixEncodeMode](docs/DataMatrixEncodeMode.md)
- [DataMatrixParams](docs/DataMatrixParams.md)
- [DataMatrixVersion](docs/DataMatrixVersion.md)
- [DecodeBarcodeType](docs/DecodeBarcodeType.md)
- [DiscUsage](docs/DiscUsage.md)
- [DotCodeEncodeMode](docs/DotCodeEncodeMode.md)
Expand Down
6 changes: 4 additions & 2 deletions docs/BarcodeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Name | Type | Description | Notes

## getBarcodeRecognize

> BarcodeResponseList getBarcodeRecognize(name, 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, checkMore1DVariants, fastScanOnly, regionLikelihoodThresholdPercent, scanWindowSizes, similarity, skipDiagonalSearch, readTinyBarcodes, australianPostEncodingTable, ignoreEndingFillingPatternsForCTable, storage, folder)
> BarcodeResponseList getBarcodeRecognize(name, 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, checkMore1DVariants, fastScanOnly, allowAdditionalRestorations, regionLikelihoodThresholdPercent, scanWindowSizes, similarity, skipDiagonalSearch, readTinyBarcodes, australianPostEncodingTable, ignoreEndingFillingPatternsForCTable, storage, folder)
Recognize barcode from a file on server.

Expand Down Expand Up @@ -166,6 +166,7 @@ Name | Type | Description | Notes
**allowWhiteSpotsRemoving** | **Boolean**| Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering. | [optional]
**checkMore1DVariants** | **Boolean**| Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False. | [optional]
**fastScanOnly** | **Boolean**| Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms. Default value: False. | [optional]
**allowAdditionalRestorations** | **Boolean**| Allows engine using additional image restorations to recognize corrupted barcodes. At this time, it is used only in MicroPdf417 barcode type. Default value: False. | [optional]
**regionLikelihoodThresholdPercent** | **Double**| Sets threshold for detected regions that may contain barcodes. Value 0.7 means that bottom 70% of possible regions are filtered out and not processed further. Region likelihood threshold must be between [0.05, 0.9] Use high values for clear images with few barcodes. Use low values for images with many barcodes or for noisy images. Low value may lead to a bigger recognition time. | [optional]
**scanWindowSizes** | **List&lt;Integer&gt;**| Scan window sizes in pixels. Allowed sizes are 10, 15, 20, 25, 30. Scanning with small window size takes more time and provides more accuracy but may fail in detecting very big barcodes. Combining of several window sizes can improve detection quality. | [optional]
**similarity** | **Double**| Similarity coefficient depends on how homogeneous barcodes are. Use high value for for clear barcodes. Use low values to detect barcodes that ara partly damaged or not lighten evenly. Similarity coefficient must be between [0.5, 0.9] | [optional]
Expand All @@ -182,7 +183,7 @@ Name | Type | Description | Notes

## postBarcodeRecognizeFromUrlOrContent

> BarcodeResponseList 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, checkMore1DVariants, fastScanOnly, regionLikelihoodThresholdPercent, scanWindowSizes, similarity, skipDiagonalSearch, readTinyBarcodes, australianPostEncodingTable, ignoreEndingFillingPatternsForCTable, url, image)
> BarcodeResponseList 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, checkMore1DVariants, fastScanOnly, allowAdditionalRestorations, regionLikelihoodThresholdPercent, scanWindowSizes, similarity, skipDiagonalSearch, readTinyBarcodes, australianPostEncodingTable, ignoreEndingFillingPatternsForCTable, url, image)
Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image with content-type \&quot;application/octet-stream\&quot;. An image can also be passed as a form field.

Expand Down Expand Up @@ -248,6 +249,7 @@ Name | Type | Description | Notes
**allowWhiteSpotsRemoving** | **Boolean**| Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering. | [optional]
**checkMore1DVariants** | **Boolean**| Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False. | [optional]
**fastScanOnly** | **Boolean**| Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms. Default value: False. | [optional]
**allowAdditionalRestorations** | **Boolean**| Allows engine using additional image restorations to recognize corrupted barcodes. At this time, it is used only in MicroPdf417 barcode type. Default value: False. | [optional]
**regionLikelihoodThresholdPercent** | **Double**| Sets threshold for detected regions that may contain barcodes. Value 0.7 means that bottom 70% of possible regions are filtered out and not processed further. Region likelihood threshold must be between [0.05, 0.9] Use high values for clear images with few barcodes. Use low values for images with many barcodes or for noisy images. Low value may lead to a bigger recognition time. | [optional]
**scanWindowSizes** | **List&lt;Integer&gt;**| Scan window sizes in pixels. Allowed sizes are 10, 15, 20, 25, 30. Scanning with small window size takes more time and provides more accuracy but may fail in detecting very big barcodes. Combining of several window sizes can improve detection quality. | [optional]
**similarity** | **Double**| Similarity coefficient depends on how homogeneous barcodes are. Use high value for for clear barcodes. Use low values to detect barcodes that ara partly damaged or not lighten evenly. Similarity coefficient must be between [0.5, 0.9] | [optional]
Expand Down
1 change: 1 addition & 0 deletions docs/DataMatrixParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Name | Type | Description | Notes
**dataMatrixEncodeMode** | [**DataMatrixEncodeMode**](DataMatrixEncodeMode.md) | Encode mode of Datamatrix barcode. Default value: DataMatrixEncodeMode.Auto. | [optional]
**rows** | **Integer** | DEPRECATED: Will be replaced with &#39;DataMatrix.Version&#39; in the next release Rows count. | [optional]
**macroCharacters** | [**MacroCharacter**](MacroCharacter.md) | Macro Characters 05 and 06 values are used to obtain more compact encoding in special modes. Can be used only with DataMatrixEccType.Ecc200 or DataMatrixEccType.EccAuto. Cannot be used with EncodeTypes.GS1DataMatrix Default value: MacroCharacters.None. | [optional]
**version** | [**DataMatrixVersion**](DataMatrixVersion.md) | Sets a Datamatrix symbol size. Default value: DataMatrixVersion.Auto. | [optional]



150 changes: 150 additions & 0 deletions docs/DataMatrixVersion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@

# DataMatrixVersion

## Enum


* `AUTO` (value: `"Auto"`)

* `ROWSCOLUMNS` (value: `"RowsColumns"`)

* `ECC000_9X9` (value: `"ECC000_9x9"`)

* `ECC000_050_11X11` (value: `"ECC000_050_11x11"`)

* `ECC000_100_13X13` (value: `"ECC000_100_13x13"`)

* `ECC000_100_15X15` (value: `"ECC000_100_15x15"`)

* `ECC000_140_17X17` (value: `"ECC000_140_17x17"`)

* `ECC000_140_19X19` (value: `"ECC000_140_19x19"`)

* `ECC000_140_21X21` (value: `"ECC000_140_21x21"`)

* `ECC000_140_23X23` (value: `"ECC000_140_23x23"`)

* `ECC000_140_25X25` (value: `"ECC000_140_25x25"`)

* `ECC000_140_27X27` (value: `"ECC000_140_27x27"`)

* `ECC000_140_29X29` (value: `"ECC000_140_29x29"`)

* `ECC000_140_31X31` (value: `"ECC000_140_31x31"`)

* `ECC000_140_33X33` (value: `"ECC000_140_33x33"`)

* `ECC000_140_35X35` (value: `"ECC000_140_35x35"`)

* `ECC000_140_37X37` (value: `"ECC000_140_37x37"`)

* `ECC000_140_39X39` (value: `"ECC000_140_39x39"`)

* `ECC000_140_41X41` (value: `"ECC000_140_41x41"`)

* `ECC000_140_43X43` (value: `"ECC000_140_43x43"`)

* `ECC000_140_45X45` (value: `"ECC000_140_45x45"`)

* `ECC000_140_47X47` (value: `"ECC000_140_47x47"`)

* `ECC000_140_49X49` (value: `"ECC000_140_49x49"`)

* `ECC200_10X10` (value: `"ECC200_10x10"`)

* `ECC200_12X12` (value: `"ECC200_12x12"`)

* `ECC200_14X14` (value: `"ECC200_14x14"`)

* `ECC200_16X16` (value: `"ECC200_16x16"`)

* `ECC200_18X18` (value: `"ECC200_18x18"`)

* `ECC200_20X20` (value: `"ECC200_20x20"`)

* `ECC200_22X22` (value: `"ECC200_22x22"`)

* `ECC200_24X24` (value: `"ECC200_24x24"`)

* `ECC200_26X26` (value: `"ECC200_26x26"`)

* `ECC200_32X32` (value: `"ECC200_32x32"`)

* `ECC200_36X36` (value: `"ECC200_36x36"`)

* `ECC200_40X40` (value: `"ECC200_40x40"`)

* `ECC200_44X44` (value: `"ECC200_44x44"`)

* `ECC200_48X48` (value: `"ECC200_48x48"`)

* `ECC200_52X52` (value: `"ECC200_52x52"`)

* `ECC200_64X64` (value: `"ECC200_64x64"`)

* `ECC200_72X72` (value: `"ECC200_72x72"`)

* `ECC200_80X80` (value: `"ECC200_80x80"`)

* `ECC200_88X88` (value: `"ECC200_88x88"`)

* `ECC200_96X96` (value: `"ECC200_96x96"`)

* `ECC200_104X104` (value: `"ECC200_104x104"`)

* `ECC200_120X120` (value: `"ECC200_120x120"`)

* `ECC200_132X132` (value: `"ECC200_132x132"`)

* `ECC200_144X144` (value: `"ECC200_144x144"`)

* `ECC200_8X18` (value: `"ECC200_8x18"`)

* `ECC200_8X32` (value: `"ECC200_8x32"`)

* `ECC200_12X26` (value: `"ECC200_12x26"`)

* `ECC200_12X36` (value: `"ECC200_12x36"`)

* `ECC200_16X36` (value: `"ECC200_16x36"`)

* `ECC200_16X48` (value: `"ECC200_16x48"`)

* `DMRE_8X48` (value: `"DMRE_8x48"`)

* `DMRE_8X64` (value: `"DMRE_8x64"`)

* `DMRE_8X80` (value: `"DMRE_8x80"`)

* `DMRE_8X96` (value: `"DMRE_8x96"`)

* `DMRE_8X120` (value: `"DMRE_8x120"`)

* `DMRE_8X144` (value: `"DMRE_8x144"`)

* `DMRE_12X64` (value: `"DMRE_12x64"`)

* `DMRE_12X88` (value: `"DMRE_12x88"`)

* `DMRE_16X64` (value: `"DMRE_16x64"`)

* `DMRE_20X36` (value: `"DMRE_20x36"`)

* `DMRE_20X44` (value: `"DMRE_20x44"`)

* `DMRE_20X64` (value: `"DMRE_20x64"`)

* `DMRE_22X48` (value: `"DMRE_22x48"`)

* `DMRE_24X48` (value: `"DMRE_24x48"`)

* `DMRE_24X64` (value: `"DMRE_24x64"`)

* `DMRE_26X40` (value: `"DMRE_26x40"`)

* `DMRE_26X48` (value: `"DMRE_26x48"`)

* `DMRE_26X64` (value: `"DMRE_26x64"`)



1 change: 1 addition & 0 deletions docs/ReaderParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Name | Type | Description | Notes
**allowWhiteSpotsRemoving** | **Boolean** | Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering. | [optional]
**checkMore1DVariants** | **Boolean** | Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False. | [optional]
**fastScanOnly** | **Boolean** | Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms. Default value: False. | [optional]
**allowAdditionalRestorations** | **Boolean** | Allows engine using additional image restorations to recognize corrupted barcodes. At this time, it is used only in MicroPdf417 barcode type. Default value: False. | [optional]
**regionLikelihoodThresholdPercent** | **Double** | Sets threshold for detected regions that may contain barcodes. Value 0.7 means that bottom 70% of possible regions are filtered out and not processed further. Region likelihood threshold must be between [0.05, 0.9] Use high values for clear images with few barcodes. Use low values for images with many barcodes or for noisy images. Low value may lead to a bigger recognition time. | [optional]
**scanWindowSizes** | **List&lt;Integer&gt;** | Scan window sizes in pixels. Allowed sizes are 10, 15, 20, 25, 30. Scanning with small window size takes more time and provides more accuracy but may fail in detecting very big barcodes. Combining of several window sizes can improve detection quality. | [optional]
**similarity** | **Double** | Similarity coefficient depends on how homogeneous barcodes are. Use high value for for clear barcodes. Use low values to detect barcodes that ara partly damaged or not lighten evenly. Similarity coefficient must be between [0.5, 0.9] | [optional]
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>aspose-barcode-cloud</artifactId>
<packaging>jar</packaging>
<name>aspose-barcode-cloud</name>
<version>23.7.0</version>
<version>23.8.0</version>
<url>https://www.aspose.cloud</url>
<description>Aspose.BarCode Cloud SDK for Java</description>
<scm>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/aspose/barcode/cloud/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
public class ApiClient {

public final String apiVersion = "v3.0";
public final String clientVersion = "23.7.0";
public final String clientVersion = "23.8.0";
private String baseUrl = "https://api.aspose.cloud";
private String clientId;
private String clientSecret;
Expand Down Expand Up @@ -99,7 +99,7 @@ protected ApiClient() {
json = new JSON();

// Set default User-Agent.
setUserAgent("Swagger-Codegen/23.7.0/java");
setUserAgent("Swagger-Codegen/23.8.0/java");

addDefaultHeader("x-aspose-client", "java sdk");
addDefaultHeader("x-aspose-client-version", clientVersion);
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/aspose/barcode/cloud/api/BarcodeApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,10 @@ protected com.squareup.okhttp.Call getBarcodeRecognizeCall(
apiClient.parameterToPair("CheckMore1DVariants", request.checkMore1DVariants));
if (request.fastScanOnly != null)
queryParams.addAll(apiClient.parameterToPair("FastScanOnly", request.fastScanOnly));
if (request.allowAdditionalRestorations != null)
queryParams.addAll(
apiClient.parameterToPair(
"AllowAdditionalRestorations", request.allowAdditionalRestorations));
if (request.regionLikelihoodThresholdPercent != null)
queryParams.addAll(
apiClient.parameterToPair(
Expand Down Expand Up @@ -688,6 +692,10 @@ protected com.squareup.okhttp.Call postBarcodeRecognizeFromUrlOrContentCall(
apiClient.parameterToPair("CheckMore1DVariants", request.checkMore1DVariants));
if (request.fastScanOnly != null)
queryParams.addAll(apiClient.parameterToPair("FastScanOnly", request.fastScanOnly));
if (request.allowAdditionalRestorations != null)
queryParams.addAll(
apiClient.parameterToPair(
"AllowAdditionalRestorations", request.allowAdditionalRestorations));
if (request.regionLikelihoodThresholdPercent != null)
queryParams.addAll(
apiClient.parameterToPair(
Expand Down
25 changes: 23 additions & 2 deletions src/main/java/com/aspose/barcode/cloud/model/DataMatrixParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public class DataMatrixParams {
@SerializedName(value = "macroCharacters")
private MacroCharacter macroCharacters = null;

@SerializedName(value = "version")
private DataMatrixVersion version = null;

/**
* Height/Width ratio of 2D BarCode module
*
Expand Down Expand Up @@ -167,6 +170,21 @@ public void setMacroCharacters(MacroCharacter macroCharacters) {
this.macroCharacters = macroCharacters;
}

/**
* Sets a Datamatrix symbol size. Default value: DataMatrixVersion.Auto.
*
* @return version
*/
@ApiModelProperty(
value = "Sets a Datamatrix symbol size. Default value: DataMatrixVersion.Auto.")
public DataMatrixVersion getVersion() {
return version;
}

public void setVersion(DataMatrixVersion version) {
this.version = version;
}

@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
Expand All @@ -182,7 +200,8 @@ public boolean equals(java.lang.Object o) {
&& Objects.equals(this.dataMatrixEcc, dataMatrixParams.dataMatrixEcc)
&& Objects.equals(this.dataMatrixEncodeMode, dataMatrixParams.dataMatrixEncodeMode)
&& Objects.equals(this.rows, dataMatrixParams.rows)
&& Objects.equals(this.macroCharacters, dataMatrixParams.macroCharacters);
&& Objects.equals(this.macroCharacters, dataMatrixParams.macroCharacters)
&& Objects.equals(this.version, dataMatrixParams.version);
}

@Override
Expand All @@ -194,7 +213,8 @@ public int hashCode() {
dataMatrixEcc,
dataMatrixEncodeMode,
rows,
macroCharacters);
macroCharacters,
version);
}

@Override
Expand All @@ -211,6 +231,7 @@ public String toString() {
.append("\n");
sb.append(" rows: ").append(toIndentedString(rows)).append("\n");
sb.append(" macroCharacters: ").append(toIndentedString(macroCharacters)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
Loading

0 comments on commit 5decb48

Please sign in to comment.