finished meanShiftFilter method