move depthmap algorithms to chapter 4