Rotation invariant features

- added histogram transformations
- performance improvements
- code refactoring