Image Recognition Using Artificial Neural Networks with Particle Swarm Optimization Based on Hardware FPGA Assist