![]() |
Persistence 1D incl. Reconstruct1D
1.3
Finding extrema in one dimensional data, filtering them by persistence and reconstructing smooth functions
|
The Matlab folder cotains:
See also the examples persistence1d_example.m and persistence1d_example_sine.m as well as the documentation for run_persistence1d.cpp.
To compile with Mex, change the working directory to [persistence_base_directory]\matlab and run: mex run_persistence1d.cpp
Input and output format must adhere to this specified format.
[in] | data | A vector of data, sorted according to coordinates. This should contain only data values to be sorted. Assumes the data is one dimensional. Data format MUST be single. |
[out] | MinIndices | Vector of (Matlab compatible) indices of local maxima. |
[out] | MaxIndices | Vector of (Matlab compatible) indices of local minima. |
[out] | Persistence | Vector of persistence of the paired extrema whose indices live in MinIndices and MaxIndices |
[out] | GlobalMinIdx | Index (Matlab compatible) of global minimum. |
[out] | GlobalMinVal | Value of global minimum. |
This script is used to display results of Persistence1D runs which were saved to text files.
[in] | data_file | Name of the file which contains the raw data Persistence1D was run on, one value per row. |
[in] | res_file | A file with all indices of extrema to display. Assumes Matlab-compatible indexing. |
Creates a plot with markers at extrema specified by indices
[in] | data | One dimensional data vector. |
[in] | indices | One dimensional vector of indices (integer) values, all must be greater than 0 and less than or equal to the number of elemenets in data |
Returns a 3-column matrix [minIndex maxIndex persistence] of paired extrema whose persistence is greater than threshold
[in] | min | Vector of indices of minima. |
[in] | max | Vector of indices of maxima |
[in] | persistence | Vector of persistence of paired extrema. |
[in] | threshold | Persistence threshold for filtering |
[out] | filtered_pairs | Returns a matrix with all pairs whose persistence > threshold. |
Returns a vector with the indices of paired minima in a pairs matrix.
[in] | pairs | Paired extrema matrix, as per filter_features_by_persistence output. |
[out] | idx | Vector with minima indices. |
Returns a vector with the indices of paired maxima in a pairs matrix.
[in] | pairs | Paired extrema matrix, , as per filter_features_by_persistence output. |
[out] | idx | Vector with maxima indices. |