Dirt detection in containers