VintaSoft Twain .NET SDK 15.0: Documentation for .NET developer
Vintasoft.Sane Namespace / SaneAcquiredImage Class / Deskew(SaneBorderColor,Int32,Int32) Method
Syntax Remarks Example Requirements SeeAlso
In This Topic
    Deskew(SaneBorderColor,Int32,Int32) Method (SaneAcquiredImage)
    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.Sane.ImageProcessing.SaneBorderColor, _
    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(SaneBorderColor,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: SaneAcquiredImage.

    Requirements

    Target Platforms: .NET 8, .NET 7; .NET 6

    See Also