Splitted the parts of code into different functions. More will be added as needed. Perhaps we could have one .m file for each method, so it would be easy to compare the different approaches, as some of them are quite similar. The file vid_stabilize.m is still the main file. This can be modified for individual use and saved as your name like I have done with anders.m.