Find that mask saving is problematic when using a new test image. By replacing method drawContours() to fillPoly(), the problem remains..
btw, problem in loading image solved by using another qimg constructor. Continue to work on visualizing pixelnode graph, leave alone bug in saving mask
Cost graph added in help menu list.