A method based on image segmentation for the analysis of the orientation of rod-like objects