SMS: Combinatorial Image Analysis