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_lengthpixels will be ignored.save_output (bool) – by default True
- Return type:
List[np.ndarray]
Notes
Warning
Here we use the
skimage.measure.find_contoursfunction 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 useyfor the first dimension andxfor the second dimension. For example, for plotting we useplt.plot(y, x).