Simple CUDA image segmentation implementation