Median filter on optic flow vectors
Hi all, I want to track moving objects in video. I choose optical flow. I got the flow vectors using cv2.calcOpticalFlowFarneback. Then i classify moving objects based on the magnitude. But it is not showing accurate results. It is not segmenting the moving objects properly. Now i want to apply median filter on the flow vectors. Anybody can help me?
"Then i classify moving objects based on the magnitude" - hmm, i'd rather group them by angle, and filter (out things too small) by magnitude.
can you show us some code ?
I color coded the vectors based on the angle. Now i have the hsv frames. Can you tell me how to convert hsv to binary. I think InRange is not possible because there are many hue values.
inRange is for filtering one special color region. can it be , you're looking for 'clustering' or similar ?
what would the median filter be good for here ?
(also, not sure, if i understand, what you're doing ...)
I am trying to track moving objects in video. Getting errors (showing non moving parts also as moving) when i follow the above mentioned procedure. So i thought of to remove those errors by filtering..