National Instruments Car Stereo System 320571-01 用户手册

下载
页码 157
NI-DSP Analysis VI Reference 
Chapter 2
Part 3:  NI-DSP Function Reference 
2-54
NI-DSP SRM for LabVIEW for Windows
DSP Median Filter
Applies a median filter of rank to the
input sequence X.  The median filter is a
nonlinear filter that combines lowpass
filters characteristics (to remove high-
frequency noise) and high-frequency
characteristics (to detect edges).
If Y represents the output sequence
Filtered Data, if J
i
 represents a subset
of the input sequence X centered about the i
th 
element of x:
J
i
  =  {x
i-r
, x
i-r+1
, …, x
i-1
, x
i
, x
i+1
, …, x
i+r-1
, x
i+r
},
and if the indexed elements outside the range of X equal zero, the VI obtains the elements of Y using:
y
i
  =  Median(J
i
)
for  i = 0, 1, 2, …, n-1,
where n is the number of elements in the input sequence X, and
r is the filter rank.
X is a DSP Handle Cluster that indicates the memory buffer on the DSP board that contains the input
data array.  The number of elements in X must be greater than the rank:
n>r
0.
If the number of elements in X is less than or equal to rank, the VI returns an error.
rank must be greater than or equal to zero.  If rank is less than zero, the VI returns an error.  rank
defaults to 2.
Filtered Data in is a DSP Handle Cluster that indicates the memory buffer on the DSP board that will
contain the filtered data output.
Filtered Data out is a DSP Handle Cluster that is identical to Filtered Data in, but with the filtered data
already stored in the memory buffer on the DSP board.
error in (no error) contains the error information from a previous VI.  If an error occurs, it is passed out
error out and no other calls are made.
error out contains the error information for this call.
The operation cannot be performed in place; that is, the input X and the output Filtered Data cannot be the same
DSP Handle Cluster.