random select feature pixel coordinates and nearest index