[ANGLÈS] Image matting aims at softly extracting foreground objects from an image by means of the alpha value estimation where the alpha matting is the opacity of the input image. Natural image matting is a difficult problem for computer vision because its foreground and background colors are arbitrary. It often requires a user interaction, a trimap, specifying initial definitive known foreground and background pixel regions. The pixels outside this range are classified as unknown. Current methods use local or global image properties of these definite regions to estimate the alpha matte for the unknown region. In this thesis we propose a novel definition of the cost function that improves the performance of existing techniques. The cost function is the main and most important tool in non-parametric sampling-based methods. These methods obtain the best results at present and therefore, an improvement to the cost function is also an important improvement to the whole technique.