my own MATLAB implementation of the selective search algorithm