VintaSoft Twain .NET SDK 15.4: Documentation for Web developer
Vintasoft.Twain Namespace / WebAcquiredImageJS type / despeckleAsync Property
Syntax Exceptions Remarks BrowserCompatibility SeeAlso
In This Topic
despeckleAsync Method
In This Topic
Sends an asynchronous request to despeckle an image.
Syntax
var instance = new Vintasoft.Twain.WebAcquiredImageJS(twainDeviceManager, imageId, imageInfo);

var value; // Type: any

// Parameters
var level1; // Type: number
var level2; // Type: number
var radius; // Type: number
var level3; // Type: number
var successFunc; // Type: function
var errorFunc; // Type: function

value = instance.despeckleAsync(level1, level2, radius, level3, successFunc, errorFunc);

Parameters

level1
Maximum quantity of pixels in small noise. Possible values: 0 - 100. Default value is 8.
level2
Maximum quantity of pixels in medium noise. Possible values: 0 - 100. Default value is 25.
radius
Radius of area around medium noise in which there are no "good objects". Possible values: 0 - 100. Default value is 30.
level3
Maximum quantity of pixels in "border" noise. Possible values: 0 - 3000. Default value is 400.
successFunc
A function that will be executed if request is executed successfully. Function prototype: "successFunc(image)", where 'image' parameter is an instance of WebAcquiredImageJS class.
errorFunc
A function that will be executed if request is failed. Function prototype: "errorFunc(image, errorMessage)", where 'image' parameter is an instance of WebAcquiredImageJS class, 'errorMessage' parameter is string that describes error.
Exceptions
ExceptionDescription
Thrown if arguments have wrong type OR image is in processing now OR image processing is failed.
Remarks

This function sends an asynchronous request to despeckle an image. If you want to use synchronous request instead of asynchronous request, please use WebAcquiredImageJS.despeckle function.

Browser Compatibility
9
See Also