API Reference

This section covers the autogenerated API documentation for HeartCV. For more examples and information, refer to the relevant guides in the User Guide.

Localisation

mpx_grid(frames, binsize)

Compute a mean pixel value grid for a sequence of frames at a given binsize.

epts(mpx, fs)

Compute the energy proxy traits for a mean pixel value grid.

spectral_map(epts, frequencies)

Create a heatmap based on the spectral energy in the supplied energy proxy traits (EPTs)

identify_frequencies(video, epts[, rotate, ...])

Launch a user interface to identify frequencies of interest in the supplied energy proxy traits.

detect_largest(map)

Detect the largest polygon in a heatmap produced by spectral_map.

segment(frames, roi[, invert])

Segment to the supplied ROI.

Peak detection

find_peaks(x[, plot])

Python implementation of automatic multiscale peak detection (AMPD).

Quantification of cardiac traits

bpm(num_peaks, sample_length, fs)

Calculate beats per minute based on detected peaks.

b2b_intervals(peaks, fs)

Calculate beat to beat intervals based on peaks detected.

stats(peaks, sample_length, fs[, windows])

Calculate cardiac statistics for the peaks detected.

Utilities

minmax_scale(vals)

Convenience function for performing min/max normalization.