https://github.com/cxf2015/slic-python-implementation/commit/59b98988027dfa384310a0f7bf203ce0fa81fd10