Package net.webpdf.wsclient.openapi
Class OperationImageOptimization
- java.lang.Object
-
- net.webpdf.wsclient.openapi.OperationImageOptimization
-
public class OperationImageOptimization extends Object
The optimization element allows to correct the images of the pages to optimize them for OCR. Except for the \"deskew\" parameter, none of the optimizations are actually visible in the generated documents. The other optimizations are only used to improve the text recognition.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOperationImageOptimization.EdgeAccentuationEnumIf this value is set, edge sharpening is applied to the image.static classOperationImageOptimization.GammaCorrectionEnumIf this value is set, edge sharpening is applied to the image.static classOperationImageOptimization.IncreaseContrastEnumIf this value is set, edge sharpening is applied to the image.static classOperationImageOptimization.MedianFilterEnumIf this value is set, edge sharpening is applied to the image.static classOperationImageOptimization.NoiseReductionEnumIf this value is set, edge sharpening is applied to the image.static classOperationImageOptimization.SharpenEnumIf this value is set, edge sharpening is applied to the image.
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_DESKEWstatic StringJSON_PROPERTY_DESPECKLEstatic StringJSON_PROPERTY_EDGE_ACCENTUATIONstatic StringJSON_PROPERTY_EDGE_ACCENTUATION_VALUEstatic StringJSON_PROPERTY_GAMMA_CORRECTIONstatic StringJSON_PROPERTY_GAMMA_CORRECTION_VALUEstatic StringJSON_PROPERTY_INCREASE_CONTRASTstatic StringJSON_PROPERTY_INCREASE_CONTRAST_VALUEstatic StringJSON_PROPERTY_MEDIAN_FILTERstatic StringJSON_PROPERTY_MEDIAN_FILTER_VALUEstatic StringJSON_PROPERTY_NOISE_REDUCTIONstatic StringJSON_PROPERTY_NOISE_REDUCTION_VALUEstatic StringJSON_PROPERTY_REDUCE_DITHERINGstatic StringJSON_PROPERTY_SHARPENstatic StringJSON_PROPERTY_SHARPEN_VALUE
-
Constructor Summary
Constructors Constructor Description OperationImageOptimization()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OperationImageOptimizationdeskew(Boolean deskew)OperationImageOptimizationdespeckle(Boolean despeckle)OperationImageOptimizationedgeAccentuation(OperationImageOptimization.EdgeAccentuationEnum edgeAccentuation)OperationImageOptimizationedgeAccentuationValue(Integer edgeAccentuationValue)booleanequals(Object o)OperationImageOptimizationgammaCorrection(OperationImageOptimization.GammaCorrectionEnum gammaCorrection)OperationImageOptimizationgammaCorrectionValue(Float gammaCorrectionValue)@Nullable BooleangetDeskew()Straight scans of pages can be created with a slight skew.@Nullable BooleangetDespeckle()If this mode is set, impurities and stains are reduced.@Nullable OperationImageOptimization.EdgeAccentuationEnumgetEdgeAccentuation()If this value is set, edge sharpening is applied to the image.@Nullable IntegergetEdgeAccentuationValue()Allows in combination with the edgeAccentuation mode \"value\" the free choice of a value for this optimization.@Nullable OperationImageOptimization.GammaCorrectionEnumgetGammaCorrection()If this value is set, edge sharpening is applied to the image.@Nullable FloatgetGammaCorrectionValue()Allows in combination with the gammaCorrection mode \"value\" the free choice of a value for this optimization.@Nullable OperationImageOptimization.IncreaseContrastEnumgetIncreaseContrast()If this value is set, edge sharpening is applied to the image.@Nullable IntegergetIncreaseContrastValue()Allows in combination with the increaseContrast mode \"value\" the free choice of a value for this optimization.@Nullable OperationImageOptimization.MedianFilterEnumgetMedianFilter()If this value is set, edge sharpening is applied to the image.@Nullable IntegergetMedianFilterValue()Allows, in combination with the medianFilter mode \"value\", the free choice of a value for this optimization.@Nullable OperationImageOptimization.NoiseReductionEnumgetNoiseReduction()If this value is set, edge sharpening is applied to the image.@Nullable FloatgetNoiseReductionValue()Allows in combination with the noiseReduction mode \"value\" the free choice of a value for this optimization.@Nullable BooleangetReduceDithering()In black and white images (including black and white scans), color values are often represented by a halftone according to their brightness (dithering / moiré effect).@Nullable OperationImageOptimization.SharpenEnumgetSharpen()If this value is set, edge sharpening is applied to the image.@Nullable FloatgetSharpenValue()Allows in combination with the sharpen mode \"value\" the free choice of a value for this optimization.inthashCode()OperationImageOptimizationincreaseContrast(OperationImageOptimization.IncreaseContrastEnum increaseContrast)OperationImageOptimizationincreaseContrastValue(Integer increaseContrastValue)OperationImageOptimizationmedianFilter(OperationImageOptimization.MedianFilterEnum medianFilter)OperationImageOptimizationmedianFilterValue(Integer medianFilterValue)OperationImageOptimizationnoiseReduction(OperationImageOptimization.NoiseReductionEnum noiseReduction)OperationImageOptimizationnoiseReductionValue(Float noiseReductionValue)OperationImageOptimizationreduceDithering(Boolean reduceDithering)voidsetDeskew(Boolean deskew)voidsetDespeckle(Boolean despeckle)voidsetEdgeAccentuation(OperationImageOptimization.EdgeAccentuationEnum edgeAccentuation)voidsetEdgeAccentuationValue(Integer edgeAccentuationValue)voidsetGammaCorrection(OperationImageOptimization.GammaCorrectionEnum gammaCorrection)voidsetGammaCorrectionValue(Float gammaCorrectionValue)voidsetIncreaseContrast(OperationImageOptimization.IncreaseContrastEnum increaseContrast)voidsetIncreaseContrastValue(Integer increaseContrastValue)voidsetMedianFilter(OperationImageOptimization.MedianFilterEnum medianFilter)voidsetMedianFilterValue(Integer medianFilterValue)voidsetNoiseReduction(OperationImageOptimization.NoiseReductionEnum noiseReduction)voidsetNoiseReductionValue(Float noiseReductionValue)voidsetReduceDithering(Boolean reduceDithering)voidsetSharpen(OperationImageOptimization.SharpenEnum sharpen)voidsetSharpenValue(Float sharpenValue)OperationImageOptimizationsharpen(OperationImageOptimization.SharpenEnum sharpen)OperationImageOptimizationsharpenValue(Float sharpenValue)StringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_DESKEW
public static final String JSON_PROPERTY_DESKEW
- See Also:
- Constant Field Values
-
JSON_PROPERTY_DESPECKLE
public static final String JSON_PROPERTY_DESPECKLE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_EDGE_ACCENTUATION
public static final String JSON_PROPERTY_EDGE_ACCENTUATION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_EDGE_ACCENTUATION_VALUE
public static final String JSON_PROPERTY_EDGE_ACCENTUATION_VALUE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_GAMMA_CORRECTION
public static final String JSON_PROPERTY_GAMMA_CORRECTION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_GAMMA_CORRECTION_VALUE
public static final String JSON_PROPERTY_GAMMA_CORRECTION_VALUE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_INCREASE_CONTRAST
public static final String JSON_PROPERTY_INCREASE_CONTRAST
- See Also:
- Constant Field Values
-
JSON_PROPERTY_INCREASE_CONTRAST_VALUE
public static final String JSON_PROPERTY_INCREASE_CONTRAST_VALUE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_MEDIAN_FILTER
public static final String JSON_PROPERTY_MEDIAN_FILTER
- See Also:
- Constant Field Values
-
JSON_PROPERTY_MEDIAN_FILTER_VALUE
public static final String JSON_PROPERTY_MEDIAN_FILTER_VALUE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_NOISE_REDUCTION
public static final String JSON_PROPERTY_NOISE_REDUCTION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_NOISE_REDUCTION_VALUE
public static final String JSON_PROPERTY_NOISE_REDUCTION_VALUE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REDUCE_DITHERING
public static final String JSON_PROPERTY_REDUCE_DITHERING
- See Also:
- Constant Field Values
-
JSON_PROPERTY_SHARPEN
public static final String JSON_PROPERTY_SHARPEN
- See Also:
- Constant Field Values
-
JSON_PROPERTY_SHARPEN_VALUE
public static final String JSON_PROPERTY_SHARPEN_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
deskew
public OperationImageOptimization deskew(Boolean deskew)
-
getDeskew
@Nullable public @Nullable Boolean getDeskew()
Straight scans of pages can be created with a slight skew. If this value is set to true, an attempt is made to counter-rotate this skew and thus \"deskew\" the page. The results of this manipulation are visible in the resulting document.- Returns:
- deskew
-
setDeskew
public void setDeskew(Boolean deskew)
-
despeckle
public OperationImageOptimization despeckle(Boolean despeckle)
-
getDespeckle
@Nullable public @Nullable Boolean getDespeckle()
If this mode is set, impurities and stains are reduced. These are caused, for example, by dust or dirt on the pane of a scanner. It is recommended to activate this optimization.- Returns:
- despeckle
-
setDespeckle
public void setDespeckle(Boolean despeckle)
-
edgeAccentuation
public OperationImageOptimization edgeAccentuation(OperationImageOptimization.EdgeAccentuationEnum edgeAccentuation)
-
getEdgeAccentuation
@Nullable public @Nullable OperationImageOptimization.EdgeAccentuationEnum getEdgeAccentuation()
If this value is set, edge sharpening is applied to the image. This optimization usually leads to significantly better recognition results, but can also lead to information loss. * off = Do not apply this optimization * value = Select your own value * low = Apply optimization only with low intensity to avoid information loss. * medium = Perform optimization with medium intensity. * high = Perform optimization with strong intensity and accept possible information losses.- Returns:
- edgeAccentuation
-
setEdgeAccentuation
public void setEdgeAccentuation(OperationImageOptimization.EdgeAccentuationEnum edgeAccentuation)
-
edgeAccentuationValue
public OperationImageOptimization edgeAccentuationValue(Integer edgeAccentuationValue)
-
getEdgeAccentuationValue
@Nullable public @Nullable Integer getEdgeAccentuationValue()
Allows in combination with the edgeAccentuation mode \"value\" the free choice of a value for this optimization. An integer percentage value indicates the intensity of the edge accentuation. The actual image is overlaid with a corresponding sharpening filter for the edge accentuation - this percentage value specifies how intensively this effect should be emphasized compared to the original image. The predefined values range between 100 (low) and 200 percent (high). minimum: 0- Returns:
- edgeAccentuationValue
-
setEdgeAccentuationValue
public void setEdgeAccentuationValue(Integer edgeAccentuationValue)
-
gammaCorrection
public OperationImageOptimization gammaCorrection(OperationImageOptimization.GammaCorrectionEnum gammaCorrection)
-
getGammaCorrection
@Nullable public @Nullable OperationImageOptimization.GammaCorrectionEnum getGammaCorrection()
If this value is set, edge sharpening is applied to the image. This optimization usually leads to significantly better recognition results, but can also lead to information loss. * off = Do not apply this optimization * value = Select your own value * low = Apply optimization only with low intensity to avoid information loss. * medium = Perform optimization with medium intensity. * high = Perform optimization with strong intensity and accept possible information losses.- Returns:
- gammaCorrection
-
setGammaCorrection
public void setGammaCorrection(OperationImageOptimization.GammaCorrectionEnum gammaCorrection)
-
gammaCorrectionValue
public OperationImageOptimization gammaCorrectionValue(Float gammaCorrectionValue)
-
getGammaCorrectionValue
@Nullable public @Nullable Float getGammaCorrectionValue()
Allows in combination with the gammaCorrection mode \"value\" the free choice of a value for this optimization. A comma value greater than 0 specifies the value to be applied to the image as gamma correction. The predefined values range between 1.5 (low) and 2.5 (high). minimum: 0.0- Returns:
- gammaCorrectionValue
-
setGammaCorrectionValue
public void setGammaCorrectionValue(Float gammaCorrectionValue)
-
increaseContrast
public OperationImageOptimization increaseContrast(OperationImageOptimization.IncreaseContrastEnum increaseContrast)
-
getIncreaseContrast
@Nullable public @Nullable OperationImageOptimization.IncreaseContrastEnum getIncreaseContrast()
If this value is set, edge sharpening is applied to the image. This optimization usually leads to significantly better recognition results, but can also lead to information loss. * off = Do not apply this optimization * value = Select your own value * low = Apply optimization only with low intensity to avoid information loss. * medium = Perform optimization with medium intensity. * high = Perform optimization with strong intensity and accept possible information losses.- Returns:
- increaseContrast
-
setIncreaseContrast
public void setIncreaseContrast(OperationImageOptimization.IncreaseContrastEnum increaseContrast)
-
increaseContrastValue
public OperationImageOptimization increaseContrastValue(Integer increaseContrastValue)
-
getIncreaseContrastValue
@Nullable public @Nullable Integer getIncreaseContrastValue()
Allows in combination with the increaseContrast mode \"value\" the free choice of a value for this optimization. An integer value between -100 and +100 specifies the intensity of the contrast enhancement. The predefined values range between 25 (low) and 75 (high). minimum: -100 maximum: 100- Returns:
- increaseContrastValue
-
setIncreaseContrastValue
public void setIncreaseContrastValue(Integer increaseContrastValue)
-
medianFilter
public OperationImageOptimization medianFilter(OperationImageOptimization.MedianFilterEnum medianFilter)
-
getMedianFilter
@Nullable public @Nullable OperationImageOptimization.MedianFilterEnum getMedianFilter()
If this value is set, edge sharpening is applied to the image. This optimization usually leads to significantly better recognition results, but can also lead to information loss. * off = Do not apply this optimization * value = Select your own value * low = Apply optimization only with low intensity to avoid information loss. * medium = Perform optimization with medium intensity. * high = Perform optimization with strong intensity and accept possible information losses.- Returns:
- medianFilter
-
setMedianFilter
public void setMedianFilter(OperationImageOptimization.MedianFilterEnum medianFilter)
-
medianFilterValue
public OperationImageOptimization medianFilterValue(Integer medianFilterValue)
-
getMedianFilterValue
@Nullable public @Nullable Integer getMedianFilterValue()
Allows, in combination with the medianFilter mode \"value\", the free choice of a value for this optimization. An integer value greater than 0 specifies the grid size with which the effect is to be applied to the image. The predefined values range between 1 (low) and 3 (high). minimum: 0- Returns:
- medianFilterValue
-
setMedianFilterValue
public void setMedianFilterValue(Integer medianFilterValue)
-
noiseReduction
public OperationImageOptimization noiseReduction(OperationImageOptimization.NoiseReductionEnum noiseReduction)
-
getNoiseReduction
@Nullable public @Nullable OperationImageOptimization.NoiseReductionEnum getNoiseReduction()
If this value is set, edge sharpening is applied to the image. This optimization usually leads to significantly better recognition results, but can also lead to information loss. * off = Do not apply this optimization * value = Select your own value * low = Apply optimization only with low intensity to avoid information loss. * medium = Perform optimization with medium intensity. * high = Perform optimization with strong intensity and accept possible information losses.- Returns:
- noiseReduction
-
setNoiseReduction
public void setNoiseReduction(OperationImageOptimization.NoiseReductionEnum noiseReduction)
-
noiseReductionValue
public OperationImageOptimization noiseReductionValue(Float noiseReductionValue)
-
getNoiseReductionValue
@Nullable public @Nullable Float getNoiseReductionValue()
Allows in combination with the noiseReduction mode \"value\" the free choice of a value for this optimization. A decimal value greater than 0 indicates the intensity with which the effect is to be applied to the image. The predefined values range between 1.0 (low) and 3.0 (high). minimum: 0.0- Returns:
- noiseReductionValue
-
setNoiseReductionValue
public void setNoiseReductionValue(Float noiseReductionValue)
-
reduceDithering
public OperationImageOptimization reduceDithering(Boolean reduceDithering)
-
getReduceDithering
@Nullable public @Nullable Boolean getReduceDithering()
In black and white images (including black and white scans), color values are often represented by a halftone according to their brightness (dithering / moiré effect). These halftones/hatchings translate a color value into a uniform sequence of black and white areas that visually appear to be a uniform area of the same color/brightness. Such patterns can be very difficult to delineate against actual text that may be in such a \"colored\" area. Setting this value to true will try to reduce such dithering patterns. This mode should only be set if absolutely necessary, as this process can be very lossy.- Returns:
- reduceDithering
-
setReduceDithering
public void setReduceDithering(Boolean reduceDithering)
-
sharpen
public OperationImageOptimization sharpen(OperationImageOptimization.SharpenEnum sharpen)
-
getSharpen
@Nullable public @Nullable OperationImageOptimization.SharpenEnum getSharpen()
If this value is set, edge sharpening is applied to the image. This optimization usually leads to significantly better recognition results, but can also lead to information loss. * off = Do not apply this optimization * value = Select your own value * low = Apply optimization only with low intensity to avoid information loss. * medium = Perform optimization with medium intensity. * high = Perform optimization with strong intensity and accept possible information losses.- Returns:
- sharpen
-
setSharpen
public void setSharpen(OperationImageOptimization.SharpenEnum sharpen)
-
sharpenValue
public OperationImageOptimization sharpenValue(Float sharpenValue)
-
getSharpenValue
@Nullable public @Nullable Float getSharpenValue()
Allows in combination with the sharpen mode \"value\" the free choice of a value for this optimization. A comma value greater than 0 indicates the intensity with which the effect is to be applied to the image. The predefined values range between 1.0 (low) and 3.0 (high). minimum: 0.0- Returns:
- sharpenValue
-
setSharpenValue
public void setSharpenValue(Float sharpenValue)
-
-