Thanks Alan,
I was trying to mimick a Superresolution algorithm by tracing the optical flow for each frame then, frame by frame, deforming the previous and the next frame to match the current frame and merging everything toghether at 2x resolution then rescale to original resolution.
Ideally, should get a slight increment in definition but the vector map i'm getting out of the optical flow looks pretty unstable.
There is a tool called "Repair frame" that works in a similar fashion but looks way more stable in tracking.
Don't know what i'm doing bad.