VintaSoft Twain .NET SDK 15.2: Documentation for .NET developer
Vintasoft.EsclImageScanning Namespace / EsclAcquiredImage Class / Deskew(EsclBorderColor,Int32,Int32) Method
Syntax Remarks Example Requirements SeeAlso
In This Topic
    Deskew(EsclBorderColor,Int32,Int32) Method (EsclAcquiredImage)
    In This Topic
    Deskew an image, i.e. detects a correct position of image.
    Syntax
    'Declaration
    
    Public Sub Deskew( _
    ByVal borderColor
    Free space around rotated image will be filled with this color.
    As Vintasoft.EsclImageScanning.ImageProcessing.EsclBorderColor, _
    ByVal scanIntervalX
    Specifies scan interval for X axis. Recommended value is 1.
    As Integer, _
    ByVal scanIntervalY
    Specifies scan interval for X axis. Recommended value is 1.
    As Integer _
    )

    Parameters

    borderColor
    Free space around rotated image will be filled with this color.
    scanIntervalX
    Specifies scan interval for X axis. Recommended value is 1.
    scanIntervalY
    Specifies scan interval for X axis. Recommended value is 1.
    Remarks

    Here is a "good" sequence of operations for image processing:
    1. Despeckle an image (Despeckle(Int32,Int32,Int32,Int32) method)
    2. Deskew an image (Deskew(EsclBorderColor,Int32,Int32) method)
    3. Detect image border (DetectBorder(Int32) method)

    Possible values for scanIntervalX and scanIntervalY parameters: 1 - every column (row) will be scanned, 2 - every second column (row) will be scanned, 3 - every third column (row) will be scanned, and so on. Big values of these parameters may speed up deskewing process, but may worsen results.

    Example

    Please see example here: EsclAcquiredImage.

    Requirements

    Target Platforms: .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5

    See Also