Work
Components
The interface for GrabCut was the first piece I worked on, which I built up from a stripped down version of Lazy Snapping's UI to start, and eventually re-tooled it into something that carries very little resemblance with its counterpart. The idea was to make the user interaction as straight-forward as possible.
Writing the interface for Bouman's Gaussian Mixture modeling code was the next piece I worked on. The ultimate goal was to work his source code into a referencable C++ extension class rather than a compilable executable. In the process of doing this, I encountered several compatibility issues between his C source code and my C++ wrapper class. I was able to compile his source code by itself just fine, but in the end I didn't have the time to get the full conversion working. Instead, I built by GrabCut GMM algorithm steps around the file I/O and remote execution calls to the GaussMixture.exe compilation. I found the execution speeds to be more than sufficient and the overhead of reading and writing text files was marginal enough to justify working on the more important issue of getting GrabCut up and running before tweaking the GMM tools.
Following the GMM implementation piece was data structure design and core algorithm implementation, including the steps of pixel mixture component assignment, GMM re-learning, and graph cut.
As a post-development addition, I also added a secondary output window that visually displayed the final gaussian mixture models for the foreground and background components. This was done for debugging purposes and also to verify that my learning step was indeed updating the models properly. To verify this, I stepped through code and manually outputted the progressing snapshots of the models. My final implementation only outputs the final models rather than all intermediate models.
Exclusions
The pieces of GrabCut I wasn't able to implement are the post-process user interaction where the user is allowed to tune the initial cutout by explicitly marking foreground and background regions using paint strokes similar to the way Lazy Snapping functions, and also the border matting where the edges of the cutout are alpha blended.
Time Division
Writing the interface for Bouman's GMM code took a bit of work, especially after I decided not to pursue the full C++ extension wrapper of the source code and instead use text files for inputting and outputting the model data. It was not trivial to write my own file parser either. Verifying that the data was correct also took a notable amount of effort.
Writing the actual GrabCut UI and algorithm actually went fairly quickly. I had no problem visualizing the structure and how the individual algorithm sub-pieces fit together.
The vast majority of my time was spent in the debugging stage. Many of the problems I encountered arose from a lack of explanation in the reference papers. Before I had the "Implementing GrabCut" paper, it was not entirely clear to me what to use for edge weights in the graph model. However, once that problem was resolved, other issues regarding my interpretation of the mathematical equations came up. I struggled with finding ways to numerically verify my results and intermediate calculations. In an attempt to rectify this, I created the visual Gaussian model graph. Still, despite its usefulness, it did not help me resolve all of my problems.
A lot of my time was spent creating ways of analyzing my results in an attempt to find out where the problem was. I tried very hard not to rely on random permutations of code to fix my problem. I worked very hard to grasp an understanding of my work and only pursue courses of action that I felt I could evidentially support.
Trying to debug a system with such complicated equations was certainly the hardest part of this project. And in the end, I believe that my results are still incorrect because of my own misinterpretation of equation (5) in the original paper, or in the assumption I made about being able to truncate the color samples I use to model the gaussian mixture (which the reference papers give no direction on).