say I have some frames of a CG animation and wish to apply motion blur as a post-processing effect (simulated by this waterfall)
I could use dense optical flow to generate a vector field, which might look like this:
now I'd like to blur the original image in the direction of the vector field for the motion blur effect. What's the best way to do this?
my first thought is to apply a convolution filter for motion blur, but the kernel will have to change based on the value of the vector field. I'm hoping there's some function in opencv that does this that I'm ignorant of, or I'll have to implement the convolution myself in a loop?