Optical flow motion mask
Closed this issue · 2 comments
ErdosG commented
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ő
itberrios commented
Hello, yes that's a good catch! I believe normalizing would be effective
itberrios commented
Just added a note in the notebook for normalization.