In this work, we propose a robust iris segmentation method for non-ideal ocular images, referred to as Polar Spline RANSAC, which robustly approximate the iris shape as a closed curve with arbitrary degrees of freedom. The method is robust to several nonidealities, such as poor contrast, occlusions, gaze deviations, pupil dilation, motion blur, poor focus, frame interlacing, differences in image resolution, specular reflections, and shadows. Differently from most methods in the literature, the proposed method obtains good performance in harsh conditions with different wavelengths and datasets. We also investigate the role of different illumination compensation techniques on the iris segmentation process. The experiments showed that the prop...