[−][src]Function opencv::optflow::update_motion_history
pub fn update_motion_history(
silhouette: &dyn ToInputArray,
mhi: &mut dyn ToInputOutputArray,
timestamp: f64,
duration: f64
) -> Result<()>
Updates the motion history image by a moving silhouette.
Parameters
- silhouette: Silhouette mask that has non-zero pixels where the motion occurs.
- mhi: Motion history image that is updated by the function (single-channel, 32-bit floating-point).
- timestamp: Current time in milliseconds or other units.
- duration: Maximal duration of the motion track in the same units as timestamp .
The function updates the motion history image as follows:
That is, MHI pixels where the motion occurs are set to the current timestamp , while the pixels where the motion happened last time a long time ago are cleared.
The function, together with calcMotionGradient and calcGlobalOrientation , implements a motion templates technique described in Davis97 and Bradski00 .