Enum ImageType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ImageType>

    public enum ImageType
    extends java.lang.Enum<ImageType>
    Defines the type of image that is being returned. Not to be mixed with image format.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DEBUG_DETECTION
      This is the image that was used as scratch surface to display document detection process (if any).
      DEBUG_DEWARPED
      This is the dewarped image that is obtained after performing perspecitve correction of each element that needs to be scanned.
      DEBUG_MARKED_DEWARPED
      This is same as DEBUG_DEWARPED, except it also contains visualisation of OCR result layered onto image.
      DEBUG_OCR_INPUT
      This is grayscale image preprocessed with OCR engine.
      DEWARPED
      This is the dewarped image that is obtained after performing perspective correction of the detected item.
      ORIGINAL
      This is the original image that arrived from camera.
      SUCCESSFUL_SCAN
      This is the original image that arrived from camera that was used to recognize item.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ImageType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ImageType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • ORIGINAL

        public static final ImageType ORIGINAL
        This is the original image that arrived from camera. If scanning region is set, you should also check getRoi method of the Image object because usually original images are in YUV_NV21 format.
      • SUCCESSFUL_SCAN

        public static final ImageType SUCCESSFUL_SCAN
        This is the original image that arrived from camera that was used to recognize item. If scanning region is set, you should also check getRoi method of the Image object because usually original images are in YUV_NV21 format.
      • DEWARPED

        public static final ImageType DEWARPED
        This is the dewarped image that is obtained after performing perspective correction of the detected item. This image is usually in format BGRA_888, but might also be in ALPHA_8. This image is not always available - this depends on enabled recognizers and their settings.
      • DEBUG_DETECTION

        public static final ImageType DEBUG_DETECTION
        This is the image that was used as scratch surface to display document detection process (if any). It is generally used for debugging detection process.
      • DEBUG_OCR_INPUT

        public static final ImageType DEBUG_OCR_INPUT
        This is grayscale image preprocessed with OCR engine. This is the image that will be used for segmentation and classification of characters. It is generally used for debugging OCR process.
      • DEBUG_DEWARPED

        public static final ImageType DEBUG_DEWARPED
        This is the dewarped image that is obtained after performing perspecitve correction of each element that needs to be scanned. This image is usually in format ALPHA_8, but sometimes can also be in BGRA_8888.
      • DEBUG_MARKED_DEWARPED

        public static final ImageType DEBUG_MARKED_DEWARPED
        This is same as DEBUG_DEWARPED, except it also contains visualisation of OCR result layered onto image. This image is always in BGRA_8888 format.
    • Method Detail

      • values

        public static ImageType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ImageType c : ImageType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ImageType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null