openalea.phenomenal.tracking.trackedPlant.TrackedPlant
- class openalea.phenomenal.tracking.trackedPlant.TrackedPlant(snapshots)[source]
Bases:
object
Main class for leaf tracking
- __init__(snapshots)[source]
- Parameters:
snapshots (list(TrackedSnapshot)) –
Methods
__init__
(snapshots)- param snapshots:
get_ref_skeleton
([nmax])Compute a median skeleton {rank : leaf}.
Tracking of growing leaves over time.
load
(segmentation_time_series)- param segmentation_time_series:
mature_leaf_tracking
([gap, ...])alignment and rank attributions in a time-series of sequences of leaves.
output
()- get_ref_skeleton(nmax=15)[source]
Compute a median skeleton {rank : leaf}. For each rank, the leaf whose vector is less distant to all other leaves from the same ranks is selected.
- Parameters:
nmax (int) – max number of leaves considered at a given rank (to avoid old leaves which can have senescence)
- growing_leaf_tracking()[source]
Tracking of growing leaves over time. To use AFTER self.align_mature()
- static load(segmentation_time_series)[source]
- Parameters:
segmentation_time_series (list) –
- list of dict {‘time’: float,
’polylines_sequence’: list of polylines, ‘features_sequence’: list of {‘mature’: bool, ‘azimuth’: float,
’height’: float, ‘length’: float}
}
- Return type:
- mature_leaf_tracking(gap=12.0, gap_extremity_factor=0.2, start=0, w_h=0.03, w_l=0.004, align_range=None, rank_attribution=True)[source]
alignment and rank attributions in a time-series of sequences of leaves. Step 1 : use a multiple sequence alignment algorithm to align the sequences. Step 2 (post-processing) : Detect and remove abnormal group of leaves ; final rank attribution.
- Parameters:
gap (float) – weight for pairwise sequence alignment
gap_extremity_factor (float) – parameter allowing to change the value of the gap penalty for terminal gaps (terminal gap penalty = gap * gap_extremity_factor)
start (int) – sequences are progressively added to the global alignment from sequences[start] to sequences[0], then from sequences[start + 1] to sequences[-1]
align_range (int) – When adding a new sequence to the global alignment, only the already aligned sequences with a distance inferior or equal to this parameter in the sequences order are used for the alignment.
w_h (float) – weight associated to insertion height feature in a leaf feature vector
w_l (float) – weight associated to length feature in a leaf feature vector
rank_attribution (bool) – choose if step 2 is done (True) or not (False)