% add all needed function paths
try
    functionname='addpaths.m';
    functiondir=which(functionname);
%     functiondir='..\\nonrigid_version21b';
    functiondir=functiondir(1:end-length(functionname));
    addpath('randomforest\')
    addpath('rf_data\')
    addpath('randomforest\randomforest-matlab\RF_Class_C\')
    addpath([functiondir '/functions'])
	addpath([functiondir '/functions_affine'])
% 	addpath([functiondir '/functions_nonrigid'])
%     addpath([functiondir '/psotb'])
% 	addpath([functiondir '/methods'])
	addpath([functiondir '/images'])
catch end