several fast image analysis functions