DLCV 11A · Is a bigger matching window always better?
AdvancedDLCV 11A · Depth Estimation and Optical FlowImage lab
Description
Run block matching on a synthetic stereo pair with known disparity, and see small windows turn noisy while large windows fatten the foreground.
Try this: At the default 3 × 3 window the map is noisy, most of all inside the textureless patch. Grow the window one step at a time and watch the three curves: where is the all-pixel error lowest? What happens to the white outline of the disc once the window reaches 31 × 31? Then raise the noise to 0.06 and see how much a 3 × 3 window suffers. Finally switch the left–right check on: which pixels turn pink, and what happens to bad-1?
Explanation
Answer the prediction first, or open the explanation when you are ready.
Show the explanation
It falls, then rises. A small window has too little texture to decide on (and sees mostly noise), so most of the textureless patch is wrong. A large window fixes the patch but mixes pixels of both depths near the edge, and there the textured, brighter disc wins: it spreads into the background. Bad-1 is lowest for windows around 7 × 7 to 11 × 11 here, and 31 × 31 is worse than those although it is still better than 3 × 3. The all-pixel error hides that two different errors trade off against each other.
Lab · DLCV 11A · Is a bigger matching window always better?
Loading image…
Try this: At the default 3 × 3 window the map is noisy, most of all inside the textureless patch. Grow the window one step at a time and watch the three curves: where is the all-pixel error lowest? What happens to the white outline of the disc once the window reaches 31 × 31? Then raise the noise to 0.06 and see how much a 3 × 3 window suffers. Finally switch the left–right check on: which pixels turn pink, and what happens to bad-1?
Synthetic and tiny on purpose: the left image is 128 × 96 and is drawn by code, with fixed seeds so nothing flickers. A textured background plane has disparity 4, a brighter textured disc has disparity 12, and a flat gray rectangle lies on the background. The right image shifts every left pixel left by its disparity (the nearer surface wins) and fills the uncovered pixels with fresh texture; Gaussian sensor noise with the chosen standard deviation is added to both images. The matcher is the one of the chapter: for every disparity 0 to 15 the cost of a window is the mean absolute difference (SAD, normalized by the number of pixels that have a partner), and the winner-take-all rule takes the lowest cost. Bad-1 is the percentage of scored pixels whose disparity is off by more than 1 pixel. Scored pixels are those visible in both views and at least 16 columns from the left border (washed out in the pictures). The check matches again with the right image as reference and invalidates a pixel whose two answers differ by more than 1; bad-1 and the flat-patch score are then taken over the kept pixels. Disc fattening counts the visible background pixels labelled with the disc’s disparity (within 1), as a percentage of the disc’s true area. These are the lab’s own numbers on its own toy scene, not those of the chapter’s scene.