Click or drag to resize

IMAGEINDEX Enumeration

Index of each image type in the Page object.

Namespace:  Kofax.OmniPageCSDK.IproPlus
Assembly:  Kofax.OmniPageCSDK.IproPlus (in Kofax.OmniPageCSDK.IproPlus.dll) Version: 1.0.0.0
Syntax
public enum IMAGEINDEX
Members
  Member nameValueDescription
II_UNDEFINED-1 Undefined (Not used)
II_BGLAYER0 Background layer
II_ORIGINAL1 Original image
II_CURRENT2 The current image
II_BW3 Black-and-white image
II_OCR4 OCR image
II_THUMBNAIL5 Thumbnail image
II_OUTPUT6 Reserved for output converters (Not used)
II_SIZE7 Number of image types (Not used)
II_RESERVED1100 Reserved for internal use (Not used)
II_RESERVED2101 Reserved for internal use (Not used)
Remarks

Page object may contain several images created from the same page source (e.g. scanner, image file, etc). These image types play different roles: distinct page processing phases run on them. You can refer to these image types using their indices.

Each image type may have different coordinate systems. In the page all the coordinates are stored referring to the coordinate system of the black-and-white image. However, coordinates passing to or getting from the functions can refer to the coordinate system of any image.

Due to the conversions between coordinate systems, a coordinate received from a function may differ from the previously set coordinate.

After preprocessing, rotating or deskewing, the difference between the coordinate systems of the current and original images is a geometric rotating transformation. Thus, if there is a rectangle (possibly a zone) specified with the coordinates from the original image its vertices are converted into the BW image and the bounding rectangle of the resulting points are stored. Therefore, the vertices of the stored rectangle can significantly differ from those of the original one.

The coordinate system of the BW image can differ from that of the current image only in a scalar factor viz. if the current one is not binary and resolution enhancement is used at binarization, the resulting image has a higher resolution.

The OCR and the BW images have the same coordinate systems.

Coordinates are specified in pixels. The origin is always in the top-left corner of the image with the coordinates (0,0). The bottom-right pixel has the coordinates (sx-1, sy-1), where sx is the horizontal and sy is the vertical size of the image in pixels.

Lifetime of different images:

  • II_ORIGINAL: this is created when the image is loaded. It is automatically deleted during the first operation that modifies the image unless the Document's KeepOriginalImage property is set to True.
  • II_CURRENT: this is created when the image is loaded (on HPAGE creation).
  • II_BW: It is created by the first operation that needs it. Preprocessing, page-layout decomposition and recognition processes always create it, but so does any other function that needs it providing that it receives the image index II_BW and they need this image.
  • II_OCR: It exists exclusively during the recognition process. Even if there has already been an OCR image at the start of recognition, it is always recreated. To keep it, the setting "Kernel.OcrMgr.Images.KeepOcrImage" must be set to True.
  • II_THUMBNAIL: It is created only when the image index II_THUMBNAIL is passed to a function and the function needs this image.

See Also