images from r to latex
minor refactoring
region classification
minor refactor