aseg1
From STX Wiki
< Programmer Guide | Command Reference | EVAL
Jump to navigationJump to search
This function implements a simple automatic signal segmentation based on the energy (rms) track of the signal.
- Usage 1
aseg1(x, 0, n, m, xmin, omax)
- x
- data vector (usally rms track in dB)
- n
- minimum length of a signal segment in frames; 0 < n <
nrow(x)
- m
- smoothing length; 0 <= m; if m is greater than zero, the segmentation is performed on a smoothed data vector xs.
xs[i] = avr(x[i-m], .., x[i+m]); with: i=0..nrow(x)
- xmin
- segment threshhold
- omax
- offset for segment center; 0 < omax
- Description
-
- A segment is a continuous range of x, where all values are greater than xmin
- The center of a segment is a continuous range of values inside a segment, where all values are greater than xmax-omax (with: xmax is the maximum value inside the segment).
- Result 1
- A matrix r with 4 rows. Each column of r defines one segment. Note that all values of r are frame indices (or row indices) of the data vector x.
r[0,i] beginning of the segment i r[1,i] beginning of the center of the segment i r[2,i] end of the center of the segment i r[3,i] end of the segment i
- with: i=0..
nrow(r)
- with: i=0..
- Usage 2
aseg1(x, 0, n, m, xmax, xmin)
- x
- data vector (usally rms track in dB)
- n
- minimum length of a signal segment in frames; 0 < n <
nrow(x)
- m
- smoothing length; 0 <= m; if m is greater than zero, the segmentation is performed on a smoothed data vector xs.
xs[i] = avr(x[i-m], .., x[i+m]); with: i=0..nrow(x)
- xmax
- maximum threshold; the maximum value of a segment must be greater than xmax
- xmin
- minimum threshold; all values of a segment must be greater than xmin
- Description
- segment detection:
- find a position i with x[i]>xon
- go backward while x[i-j]>xoff; last index i-j is the segment begin
- go forward while x[i+k]>xoff; last index i+k is the segment end
- Result 2
- A matrix r with 2 rows. Each column of r defines one segment. Note that all values of r are frame indices (or row indices) of the data vector x.
r[0,i] beginning of the segment i r[3,i] end of the segment i
- with: i=0..
nrow(r)
- with: i=0..