Graphical models and image processing (Academic Press)