Graph-based image segmentation using directional nearest neighbor graph