finished writing everything, have yet to try running it though
grabcut now working, but does not handle the case of zero assignments to a cluster