initial import from http://sourceforge.net/projects/cvprtoolbox/