Simply run start2 and follow the same process as in Part 2. The gui is exactly the same. Under the hood, the program is using your initial boundary region as initialization for GrabCut (from SegTool toolkit), and will find an inner boundary of the object. However, this external toolkit will not always give the best inner boundary, so sometimes you will need to restart and try again, results vary based on the automatically found boundary. I set its lambda theshold to be tight to the object, but its not always the case. Below is the original boundary drawn by the user, and then the tight, inner boundary calculated by GrabCut
Then I use the outer boundary to calculate k. And then I calculate the cut C that minimizes the number of times we have to run dykstras algorithm. The cut is shown below -- red is the outer boundary, green is the inner boundary, and the blue line is the cut.
Dykstras algorithm is then run using the estimated k. This is VERY SLOW, as there are many nodes in the graph, and we are doing it in a loop for all pixels along the cut. Finally Poisson Image Editing from Part 1 is run using this boundary. Note that even though the user defined boundary overlaps the mountain, there is no blur because the boundary has been fixed.