An Approach Towards Fast Gradient-based Image Segmentation