Multilevel Thresholding for Image Segmentation Using an Improved Electromagnetism Optimization Algorithm