Image Processing

Edge Detection

Reconstruction

Classification


RANSAC

Suppose we have a dataset $D = \{p_1, \dots, p_N\}$. Each $p_i$ is an ordered pair. Our objective is to fit a line with parameters $\theta = (m, b)$. For a homography, our parameters are $\theta = H, \|h\| = 1$. This is a least squares problem of the form $\|y - (mx+ b)\|^2$.

Stereo

Binocular stereo

If the two cameras are on the same $x$-axis, then we can simplify our model.

Special case: cameras are parallel to each other. Both cameras have the same $Y$ coordinates, but different $X$ coordinates. Without loss of generality, suppose the origin is at the pinhole of the first camera.

$$ x_1 = \frac{X}{Z}, x_2 = \frac{X + t_x}{Z}\\ y_1 = \frac{Y}{Z}, y_2 = \frac{Y}Z{} $$

Notice that the $X$ coordinates differ by $t_x / Z$, which is proportional to the depth of the object. We call $t_x$ the baseline, and $t_x / Z$ the disparity.

Normalized Cross Correlation (NCC)

Our correspondence problem is also much easier because we only have to search along a particular row. This approach is called plane sweep stereo.

Computing NCC volume

  1. For every pixel $(x,y)$
    1. For every disparity $d$
      1. Get normalized patch form image 1 at $(x,y)$
      2. Get normalized patch from image 2 at $(x+d, y)$
      3. Compute NCC

Rectifying Cameras

Now suppose we have two cameras that are not parallel. How do we align the images form the cameras? Then we can relate the images as