cellects.video.network_tracking
cellects.video.network_tracking
Video network detection and skeleton analysis for biological networks (such as Physarum polycephalum's) images.
This module uses network functions on images to track networks on a video.
Functions:
| Name | Description |
|---|---|
detect_network_dynamics: detect the network on every image of a video and use their temporality to improve accuracy |
|
detect_network_dynamics(converted_video, binary, arena_label=1, starting_time=0, visu=None, origin=None, smooth_segmentation_over_time=True, morphological_closing=True, edge_max_width=5, detect_pseudopods=True, save_coord_network=True, show_seg=False)
Detects and tracks dynamic features (e.g., pseudopods) in a biological network over time from video data.
Analyzes spatiotemporal dynamics of a network structure using binary masks and grayscale video data. Processes each frame to detect network components, optionally identifies pseudopods, applies temporal smoothing, and generates visualization overlays. Saves coordinate data for detected networks if enabled.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
converted_video
|
NDArray
|
Input video data array with shape (time x y x z) representing grayscale intensities. |
required |
binary
|
NDArray[uint8]
|
Binary mask array with shape (time x y x z) indicating filled regions in each frame. |
required |
arena_label
|
int
|
Unique identifier for the current processing arena/session to name saved output files. |
1
|
starting_time
|
int
|
Zero-based index of the first frame to begin network detection and analysis from. |
0
|
visu
|
NDArray
|
Visualization video array (time x y x z) with RGB channels for overlay rendering. |
None
|
origin
|
NDArray[uint8]
|
Binary mask defining a central region of interest to exclude from network detection. |
None
|
smooth_segmentation_over_time
|
(bool, optional(default=True))
|
Flag indicating whether to apply temporal smoothing using adjacent frame data. |
True
|
morphological_closing
|
(bool, optional(default=True))
|
Flag indicating whether to apply morphological closing on binary images of the network. |
True
|
edge_max_width
|
int
|
Maximal width of network edges. Defaults to 5. |
5
|
detect_pseudopods
|
(bool, optional(default=True))
|
Determines if pseudopod regions should be detected and merged with the network. |
True
|
save_coord_network
|
(bool, optional(default=True))
|
Controls saving of detected network/pseudopod coordinates as NumPy arrays. |
True
|
show_seg
|
(bool, optional(default=False))
|
Enables real-time visualization display during processing. |
False
|
Returns:
| Type | Description |
|---|---|
NDArray[uint8]
|
3D array containing detected network structures with shape (time x y x z). Uses:
- |
Notes
- Memory-intensive operations on large arrays may require system resources.
- Temporal smoothing effectiveness depends on network dynamics consistency between frames.
- Pseudopod detection requires sufficient contrast with the background in grayscale images.
Source code in src/cellects/video/network_tracking.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |