sarcgraph.sg.SarcGraph._detect_contours

SarcGraph._detect_contours(filtered_frames, min_length=8, save_output=True)[source]

Returns contours of detected zdiscs in each frame.

Parameters:
  • filtered_frames (np.ndarray, shape=(frames, dim_1, dim_2)) –

  • min_length (int) – Zdisc contours shorter than min_length pixels will be ignored.

  • save_output (bool) – by default True

Return type:

List[np.ndarray]

Notes

Warning

Here we use the skimage.measure.find_contours function to find contours. This function returns contours with coordinates in (row, column) order, which corresponds to (y, x) in Cartesian coordinates. Therefore, in the rest of the code, we use y for the first dimension and x for the second dimension. For example, for plotting we use plt.plot(y, x).