% add subfolders to path to search for functions
f = pwd;cd(erase(mfilename('fullpath'),extractAfter(mfilename('fullpath'),'matlab_code'))); addpath(genpath(pwd)); cd(f);

% start Model
if ~exist('M','var')
    img = 'terminator.jpg';
    p = erase(mfilename('fullpath'),extractAfter(mfilename('fullpath'),'matlab_code'));
    p = fullfile(p,'Model','img');
    mlsGrid = [10, 10];
    mlsType = 'Similarity';
    loadCtrlPoints = 1;
    M = Model(p,img,mlsGrid,mlsType,loadCtrlPoints);
    
end
clear mlsGrid mlsType loadCtrlPoints img f p 
