CxTruncate Method
Syntax
CWIMAQVision.CxTruncate SourceImage, DestImage [, HighPass = False] [, TruncationFrequency = 10.0]
Return Type
On success, this method returns 0. On failure, this method returns a negative number.
Purpose
Truncates the frequencies of a complex image.
Remarks
All images must be Complex.
Parameters
SourceImage As CWIMAQImage
The source image.
DestImage As CWIMAQImage
The resulting image.
HighPass As Variant
[Optional] Determines which frequencies are truncated. Set this parameter to True to truncate the high frequencies or False to truncate the low frequencies.
This parameter has a default value of False.
TruncationFrequency As Variant
[Optional] The percentage of the frequencies retained within a Fourier transformed (complex) image. The default value is 10 percent. The percentage works in conjunction with the length of the diagonal of the FFT image and the parameter HighPass. For example, if you set HighPass to False and set TruncationFrequency to 10 percent, the method retains 10 percent of the frequencies starting from the center (low frequencies). If you set HighPass to True and set TruncationFrequency to 10 percent, the method retains 10 percent of the frequencies starting from the outer periphery.
This parameter has a default value of 10.0.
Example
Dim i As New CWIMAQImage ' Make i a Complex image i.Type = cwimaqImageTypeComplex ' Truncate the frequencies of the Complex image in Viewer1 at 25 percent. ' Store the result in i. CWIMAQVision1.CxTruncate CWIMAQViewer1.Image, i, , 25