Text this: Development of a new algorithm for segmentation of flotation froth images