In block-based motion or depth estimation, a block is assigned a motion or depth
value as a result of minimizing the matching error over a limited set of candidate
values. The matching error for each element of the set is obtained by computing
the luminosity differences between a block of a first image (10) and an
area of a second image (11). It may occur that an object (12) is
partially obstructed by another object (15), so that a pixel (14)
in the block is not present in the corresponding area, because another pixel (16)
overlaps it. The method and system according to the invention determine which pixels
are not visible in the second image (11), and compute the matching error
over only the visible pixels. An apparatus for adapting a video signal (40)
uses the chosen candidate values to create an enhanced version of the video signal (40).