performance optimizations on PHOG and CannyEdgeDetector

git-svn-id: http://lire.googlecode.com/svn/trunk@174 f280a053-6817-128d-8a7e-cdf98506035a