GdPicture.NET Reference Guide
FxDespeckle Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : FxDespeckle Method
GdPicture Image Identifier.
Performs a 3x3 despeckle filter (also known as median filter) on a GdPicture image or on an area of a GdPicture image defined by SetROI() method. It works as a noise removal filter, for Salt-And-Pepper like-noise, or varied dots around a document. It can remove black noise pixels from white backgrounds and visa versa. It also can remove random noise from multicolored backgrounds.
Syntax
'Declaration
 
Public Function FxDespeckle( _
   ByVal ImageID As Integer _
) As GdPictureStatus
public GdPictureStatus FxDespeckle( 
   int ImageID
)
public function FxDespeckle( 
    ImageID: Integer
): GdPictureStatus; 
public function FxDespeckle( 
   ImageID : int
) : GdPictureStatus;
public: GdPictureStatus FxDespeckle( 
   int ImageID
) 
public:
GdPictureStatus FxDespeckle( 
   int ImageID
) 

Parameters

ImageID
GdPicture Image Identifier.

Return Value

A member of the GdPictureStatus enumeration.
Remarks
This method is used in the "Image Processing" Demo.
Example
Removing noise from an image.
Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.png")
If imageId <> 0 Then
   oGdPictureImaging.FxDespeckle(ImageID)
   oGdPictureImaging.SaveAsPNG(ImageID, "output.png")
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
Else
   MessageBox.Show("Error: " + oGdPictureImaging.GetStat().ToString())
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
SetROI Method
ResetROI Method
FxDespeckleMore Method
FxMedian Method