itberrios/CV_projects

Optical flow motion mask

Closed this issue · 2 comments

Hello,

in the detection_with_optical_flow.ipynb notebook, the line
mask = get_motion_mask(mag, motion_thresh=motion_thresh)
produces strange results on my own frames. Based on my understanding, I have modified it to
mask = get_motion_mask(mag/mag.max(), motion_thresh=motion_thresh)
to normalize the magnitudes to be between 0 and 1 fitting in the range of the motion treshold function.
Seems to work better on my frames this way. Is my understanding correct? If so might worth fixing.
Thanks for the notebook, it was a great head start in the topic.

BR Gergő

Hello, yes that's a good catch! I believe normalizing would be effective

Just added a note in the notebook for normalization.