prominenceai/deepstream-services-library

Implement new snap-label-to-grid ODE Action - dsl_ode_action_label_snap_to_grid_new

rjhowell44 opened this issue · 1 comments

Objects labels are anchored to the Object's bbox which can fluctuate greatly from frame to frame. This make reading the object label difficult as it jumps around in view with the upper left corner of the bbox.

New ODE Action to snap the Object label to the closest point on a defined 2D grid. This has the effect stabilizing the box and only moving it as the object moves through the frame.

/**
 * @brief Creates a uniquely named "Snap Object Label to Grid " ODE Action that moves 
 * the object label to the closes location on a 2D grid measured over the frame. 
 * @param[in] name unique name for the "Snap Object Label to Grid ODE Action. 
 * @param[in] module_width width of each module (square) in the grid in pixels.
 * @param[in] module_height height of each module (square) in the grid in pixels. 
 * @return DSL_RESULT_SUCCESS on success, one of DSL_RESULT_ODE_ACTION_RESULT otherwise.
 */
DslReturnType dsl_ode_action_label_snap_to_grid_new(const wchar_t* name,  
    uint module_width, uint module_height);

Merged into the v0.30.alpha dev branch