VintaSoftTwain Control v6.0
VintaSoftTwain Object / AcquiredImages_Despeckle Method
Zero-based index of image in acquired image collection. Valid values are from 0 to (AcquiredImages_Count-1).
Maximal quantity of pixels in small noise. Possible values: 0 - 100. Default value is 8. What is "small noise" see below.
Maximal quantity of pixels in medium noise. Possible values: 0 - 100. Default value is 25. What is "medium noise" see below.
Radius of area around medium noise in which there are no "good objects". Possible values: 0 - 100. Default value is 30. What is "good objects" see below.
Maximal quantity of pixels in "border" noise. Possible values: 0 - 3000. Default value is 400. What is "border noise" see below.
In This Topic
    AcquiredImages_Despeckle Method
    In This Topic
    Description
    Removes noise from image.
    Syntax
    Visual Basic
    Public Function AcquiredImages_Despeckle( _
       ByVal index As Long, _
       ByVal level1 As Integer, _
       ByVal level2 As Integer, _
       ByVal radius As Integer, _
       ByVal level3 As Integer _
    ) As Boolean
    Parameters
    index
    Zero-based index of image in acquired image collection. Valid values are from 0 to (AcquiredImages_Count-1).
    level1
    Maximal quantity of pixels in small noise. Possible values: 0 - 100. Default value is 8. What is "small noise" see below.
    level2
    Maximal quantity of pixels in medium noise. Possible values: 0 - 100. Default value is 25. What is "medium noise" see below.
    radius
    Radius of area around medium noise in which there are no "good objects". Possible values: 0 - 100. Default value is 30. What is "good objects" see below.
    level3
    Maximal quantity of pixels in "border" noise. Possible values: 0 - 3000. Default value is 400. What is "border noise" see below.
    Return Type
    TRUE (1) if image is processed successfully, FALSE (0) otherwise.
    Remarks
    This method removes noise from image. Current algorithm removes three types of noise:

    1. Small noise - a set of pixels (non background pixels) with quantity of pixels less than value of level1 parameter. This set of pixels will be replaced to background pixels.

    2. Medium noise - a set of pixels (non background pixels) with quantity of pixels less than value of level2 parameter. This set of pixels will be replaced to background pixels if around this set of pixels in a region with radius of value of radius parameter there is no "good objects". "Good object" - not a noise.

    3. "Border" noise - a set of pixels (non background pixels) with quantity of pixels less than value of level3 parameter. This set of pixels will be replaced to background pixels if at least one pixel from this set of pixels is located on an image border.

    Here is a "good" sequence of operations for image processing:
    1. Despeckle an image (AcquiredImages_Despeckle method)
    2. Deskew an image (AcquiredImages_Deskew method)
    3. Detect image border (AcquiredImages_DetectBorder method)

    Information about error that occurs during method execution can be get using the Error and ErrorString properties.
    Example
    Please see example here.
    See Also