Optimize-the-Codebook Here we use K-Means and LBG algorithms to find an optimal codebook. How to execute code Open the solution files i.e. KMeans.sln or LBG.sln in Visual Studio 2010. Run by pressing F5 or going to the menu bar.