Package io.scanbot.sdk.image
Class RawImageLoadOptions
java.lang.Object
io.scanbot.sdk.image.RawImageLoadOptions
Options for loading images that come from sensor.
-
Constructor Summary
ConstructorsConstructorDescriptionRawImageLoadOptions(boolean liveSource) Constructs RawImageLoadOptions with default parameters.RawImageLoadOptions(Rectangle cropRect, boolean liveSource, ImageOrigin origin, CanvasColor canvasColor, ImageRotation orientation) Constructs RawImageLoadOptions with the given params. -
Method Summary
Modifier and TypeMethodDescriptionGetter for canvasColor field.Getter for cropRect field.booleanGetter for liveSource field.Getter for orientation field.Getter for origin field.voidsetCanvasColor(CanvasColor canvasColor) Setter for canvasColor field.voidsetCropRect(Rectangle cropRect) Setter for cropRect field.voidsetLiveSource(boolean liveSource) Setter for liveSource field.voidsetOrientation(ImageRotation orientation) Setter for orientation field.voidsetOrigin(ImageOrigin origin) Setter for origin field.
-
Constructor Details
-
RawImageLoadOptions
public RawImageLoadOptions(Rectangle cropRect, boolean liveSource, ImageOrigin origin, CanvasColor canvasColor, ImageRotation orientation) Constructs RawImageLoadOptions with the given params.- Parameters:
cropRect- If the rect is not empty, the image will be cropped to this rect before processing.liveSource- True if the image should be processed in live mode by scanners configured with ProcessingMode.AUTO. Should be set to true for images that come from some video stream, e.g. from the camera or a video file.origin- Location of the image origin in the image coordinate system. During loading images are flipped such that after the flip their new origin is in their top-left corner. For example, an image coming from the front camera might have its origin set to the top-right, which will flip it along its vertical axis to create a mirror effect. The origin is interpreted net of the image orientation. The origin rotates together with the image. The origin value is interpreted and the resulting flip executed AFTER the image matrix has been reoriented to have a neutral orientation. Default is `TOP_LEFT`.canvasColor- CanvasColor color to use when converting images with alpha channel to images without alpha channel. Default is `WHITE`.orientation- Rotation that should be applied to the image to recover correct orientation. Is applied before cropping. Default is `NONE`.
-
RawImageLoadOptions
public RawImageLoadOptions(boolean liveSource) Constructs RawImageLoadOptions with default parameters.- Parameters:
liveSource- True if the image should be processed in live mode by scanners configured with ProcessingMode.AUTO. Should be set to true for images that come from some video stream, e.g. from the camera or a video file.
-
-
Method Details
-
getCropRect
Getter for cropRect field. See constructor documentation for more information about the field.- Returns:
- cropRect
-
setCropRect
Setter for cropRect field. See constructor documentation for more information about the field.- Parameters:
cropRect- Value to set.
-
getLiveSource
public boolean getLiveSource()Getter for liveSource field. See constructor documentation for more information about the field.- Returns:
- liveSource
-
setLiveSource
public void setLiveSource(boolean liveSource) Setter for liveSource field. See constructor documentation for more information about the field.- Parameters:
liveSource- Value to set.
-
getOrigin
Getter for origin field. See constructor documentation for more information about the field.- Returns:
- origin
-
setOrigin
Setter for origin field. See constructor documentation for more information about the field.- Parameters:
origin- Value to set.
-
getCanvasColor
Getter for canvasColor field. See constructor documentation for more information about the field.- Returns:
- canvasColor
-
setCanvasColor
Setter for canvasColor field. See constructor documentation for more information about the field.- Parameters:
canvasColor- Value to set.
-
getOrientation
Getter for orientation field. See constructor documentation for more information about the field.- Returns:
- orientation
-
setOrientation
Setter for orientation field. See constructor documentation for more information about the field.- Parameters:
orientation- Value to set.
-