image processing - OpenCV persistent object tracking and hysteresis strategy -


i'm building object tracking api team.

my code recognize foreground objects in camera scene. on time, call methods addobject(id, pos), updateobject(id, newpos), , removeobject(id) on instances implement listener interface. these post frame-processing events -- might occur 30 times second.

how can make sure objects don't flicker in , out of existence? need give objects minimum lifetime. if object disappears 1 frame , reappears in same spot in next frame new id, undesired flickering.


(my thoughts far) have thought using object mask accumulator basis instantiation. imagine grayscale image, candidate regions objects intensified in accumulator each frame, object region exceeds threshold, gets instantiated , call addobject(id, pos) method. now, problem is, object can hover around threshold in accumulator , can still exhibit flickery behavior. then, add constant value object region instantiated have lifetime in accumulator. constant subtracted when region crosses below accumulator threshold.

i ended using solution described in question, without further tweaks. worked doing. necessary keep copy of previous accumulator state, though, determine whether pixel values rising or falling across threshold value.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -