Particle Swarm for Pattern Matching in Image Analysis