the process of racing objects and characters in order to remove or edit them from footage.
I firstly added an adjustment layer so it wont affect the original clip. I then used the pen tool to trace around the hat and created two simple shapes that were easy to move. I keyframed the masks path
To do it automatically, I right clicked the mask and clicked track mask. put the method as perspective and clicked play.
I applied another video on top of the other video by toggle mods, then selected difference on the second video, then effect, channel, set matte.