Initial commit of rectangle detection code