update training and parameters for grabcut.