Class RawImageLoadOptions

java.lang.Object
io.scanbot.sdk.image.RawImageLoadOptions

public class RawImageLoadOptions extends Object
Options for loading images that come from sensor.
  • 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

      public Rectangle getCropRect()
      Getter for cropRect field. See constructor documentation for more information about the field.
      Returns:
      cropRect
    • setCropRect

      public void setCropRect(Rectangle cropRect)
      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

      public ImageOrigin getOrigin()
      Getter for origin field. See constructor documentation for more information about the field.
      Returns:
      origin
    • setOrigin

      public void setOrigin(ImageOrigin origin)
      Setter for origin field. See constructor documentation for more information about the field.
      Parameters:
      origin - Value to set.
    • getCanvasColor

      public CanvasColor getCanvasColor()
      Getter for canvasColor field. See constructor documentation for more information about the field.
      Returns:
      canvasColor
    • setCanvasColor

      public void setCanvasColor(CanvasColor canvasColor)
      Setter for canvasColor field. See constructor documentation for more information about the field.
      Parameters:
      canvasColor - Value to set.
    • getOrientation

      public ImageRotation getOrientation()
      Getter for orientation field. See constructor documentation for more information about the field.
      Returns:
      orientation
    • setOrientation

      public void setOrientation(ImageRotation orientation)
      Setter for orientation field. See constructor documentation for more information about the field.
      Parameters:
      orientation - Value to set.