Click or drag to resize

OcrPageIteratorGetImage Method

Get an image of the current object at the given level in greyscale if available in the input.

Namespace: Patagames.Ocr
Assembly: Patagames.Ocr (in Patagames.Ocr.dll) Version: 4.6.411
Syntax
public OcrPix GetImage(
	PageIteratorLevel level,
	int padding,
	OcrPix origImage,
	out int left,
	out int top
)

Parameters

level  PageIteratorLevel
Type of element of the page hierarchy.
padding  Int32
Padding for original image. See remarks for detail.
origImage  OcrPix
If not null, then extract from the original image instead of the binary image.
left  Int32
Left position of returned image
top  Int32
Top position of returned image

Return Value

OcrPix
an image of the current object at the given level.
Remarks
To guarantee a binary image use GetBinaryImage(PageIteratorLevel).
Note  Note
NOTE that in order to give the best possible image, the bounds are expanded slightly over the binary connected component, by the supplied padding, so the top-left position of the returned image is returned in (left,top). These will most likely not match the coordinates returned by GetBoundingBox(PageIteratorLevel).
If you do not supply an original image, you will get a binary one.
See Also