VintaSoft Twain .NET SDK 15.0: Documentation for .NET developer
Vintasoft.Twain Namespace / AcquiredImage Class / DetectBorder(Int32) Method
Syntax Remarks Example Requirements SeeAlso
In This Topic
    DetectBorder(Int32) Method (AcquiredImage)
    In This Topic
    Detects the border around the image.
    Syntax
    'Declaration
    
    Public Sub DetectBorder( _
    ByVal borderSize
    Size of border around the image. Possible values: 0 - 100. Default value is 5.
    As Integer _
    )
    public void DetectBorder(
    int borderSize
    )
    public: void DetectBorder(
    int borderSize
    )
    public:
    void DetectBorder(
    int borderSize
    )

    Parameters

    borderSize
    Size of border around the image. Possible values: 0 - 100. Default value is 5.
    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(TwainBorderColor,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: AcquiredImage.

    Requirements

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

    See Also