Class ImageProcessing
Provides managed wrappers around the native image processing pipeline, exposing document correction and binarization helpers.
Namespace: ImageSdkWrapper Assembly: ImageSdkWrapper.MAUI
Inheritance: object
public class ImageProcessing : IDisposable
Method
CorrectDocument(MetaImage, Corners)
Performs perspective correction using detected document corners.
public MetaImage CorrectDocument(MetaImage sourceBitmap, Corners corners)
Parameters
sourceBitmap(MetaImage): Input image.corners(Corners): Detected document corners; when omitted the original image is returned.
Returns
- MetaImage: Corrected image or
nullif refinement fails.
DetectDocumentCorners(MetaImage)
Detects document corners for the supplied image.
public Corners DetectDocumentCorners(MetaImage sourceBitmap)
Parameters
sourceBitmap(MetaImage): Input image prepared with the native SDK.
Returns
- Corners: Corner structure when detection succeeds; otherwise
null.
Dispose()
Disposes of native resources retained by the processing instance. No-op because the wrapper does not own handles.
public void Dispose()
ImageBWBinarization(MetaImage)
Produces a high-contrast black-and-white rendition of the supplied image.
public MetaImage ImageBWBinarization(MetaImage sourceBitmap)
Parameters
sourceBitmap(MetaImage): Input image.
Returns
- MetaImage: Refined meta image or
nullif the native call fails.
ImageColorBinarization(MetaImage)
Produces a color-enhanced binarised copy suitable for preserving highlights in colour documents.
public MetaImage ImageColorBinarization(MetaImage sourceBitmap)
Parameters
sourceBitmap(MetaImage): Input image.
Returns
- MetaImage: Refined meta image or
nullif the native call fails.
ImageGrayBinarization(MetaImage)
Produces a grayscale binarised copy that retains tonal detail while enhancing readability.
public MetaImage ImageGrayBinarization(MetaImage sourceBitmap)
Parameters
sourceBitmap(MetaImage): Input image.
Returns
- MetaImage: Refined meta image or
nullif the native call fails.
ImageOriginal(MetaImage)
Applies orientation compensation to the provided MetaImage and returns a refined copy.
public MetaImage ImageOriginal(MetaImage sourceBitmap)
Parameters
sourceBitmap(MetaImage): Source image; must not benull.
Returns
- MetaImage: The refined image or
nullwhen the native SDK fails to process it.
ImageWithoutRotation(MetaImage)
Returns the original image without applying additional rotation (legacy helper).
[Obsolete("Deprecated")]
public MetaImage ImageWithoutRotation(MetaImage sourceBitmap)
Parameters
sourceBitmap(MetaImage)
Returns
- MetaImage
SupportImageSize(PxlPoint)
Returns the supplied size unchanged. Kept for API compatibility with legacy platforms.
public PxlPoint SupportImageSize(PxlPoint imageSize)
Parameters
imageSize(PxlPoint): Input image bounds.
Returns
- PxlPoint