GRAPHICAL MODELS AND IMAGE PROCESSING