Computer stereo vision

Uses your system voice; voice and rate in settings.

Snapshot

≈ 4 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

Computer stereo vision is the extraction of three-dimensional information from digital images, such as those obtained by a CCD camera. By comparing information about a scene from two vantage points, 3D information can be extracted by examining the relative positions of objects in the two panels. This is similar to the biological process of stereopsis.

Computer stereo vision is the extraction of three-dimensional information from digital images, such as those obtained by a CCD camera. By comparing information about a scene from two vantage points, 3D information can be extracted by examining the relative positions of objects in the two panels. This is similar to the biological process of stereopsis. In the attached diagram the distance between the centers of the two camera lens is BD = BC + CD.

The triangles are similar, ACB and BFE ACD and DGH \begin{align} \text{Therefore displacement }d &= EF + GH \\ &= BF (\frac{EF}{BF} + \frac{GH}{BF}) \\ &= BF (\frac{EF}{BF} + \frac{GH}{DG}) \\ &= BF (\frac{BC + CD}{AC}) \\ &= BF \frac{BD}{AC} \\ &= \frac{k}{z} \text{, where}\\ \end{align} k = BD BF z = AC is the distance from the camera plane to the object.

So assuming the cameras are level, and image planes are flat on the same plane, the displacement in the y axis between the same pixel in the two images is, d = \frac{k}{z} Where k is the distance between the two cameras times the distance from the lens to the image.

The depth component in the two images are z_1 and z_2 , given by, z_2(x, y) = \min \left \{v : v = z_1(x, y - \frac{k}{z_1(x, y)})\right \} z_1(x, y) = \min \left \{v : v = z_2(x, y + \frac{k}{z_2(x, y)}) \right \} These formulas allow for the occlusion of voxels, seen in one image on the surface of the object, by closer voxels seen in the other image, on the surface of the object.

Image rectification

Where the image planes are not co-planar, image rectification is required to adjust the images as if they were co-planar. This may be achieved by a linear transformation. The images may also need rectification to make each image equivalent to the image taken from a pinhole camera projecting to a flat plane.

P(x, \mu, \sigma) = \frac{1}{\sigma\sqrt{2\pi}} e^{ -\frac{(x-\mu)^2}{2\sigma^2} } Probability is related to information content described by message length L, P(x) = 2^{-L(x)} L(x) = -\log_2{P(x)} so, L(x, \mu, \sigma) = \log_2(\sigma\sqrt{2\pi}) + \frac{(x-\mu)^2}{2\sigma^2} \log_2 e For the purposes of comparing stereoscopic images, only the relative message length matters.

Based on this, the information measure I, called the Sum of Squares of Differences (SSD) is, I(x, \mu, \sigma) = \frac{(x-\mu)^2}{\sigma^2} where, L(x, \mu, \sigma) = \log_2(\sigma\sqrt{2\pi}) + I(x, \mu, \sigma) \frac{\log_2 e}{2} Because of the cost in processing time of squaring numbers in SSD, many implementations use Sum of Absolute Difference (SAD) as the basis for computing the information measure. Other methods use normalized cross correlation (NCC).

I_m(z_1, z_2) = \frac{1}{\sigma_m^2} \sum_{x, y}\operatorname{cd}(\operatorname{color}_1(x, y + \frac{k}{z_1(x, y)}), \operatorname{color}_2(x, y))^2 An assumption is made about the smoothness of the image. Assume that two pixels are more likely to be the same color, the closer the voxels they represent are. This measure is intended to favor colors that are similar being grouped at the same depth.

For example, if an object in front occludes an area of sky behind, the measure of smoothness favors the blue pixels all being grouped together at the same depth.

The total measure of smoothness uses the distance between voxels as an estimate of the expected standard deviation of the color difference, I_s(z_1, z_2) = \frac{1}{2 \sigma_h^2} \sum_{i : \{1, 2\}} \sum_{x_1, y_1} \sum_{x_2, y_2} \frac{\operatorname{cd}(\operatorname{color}_i(x_1, y_1), \operatorname{color}_i(x_2, y_2))^2}{(x_1 - x_2)^2 + (y_1 - y_2)^2 + (z_i(x_1, y_1) - z_i(x_2, y_2))^2} The total information content is then the sum, I_t(z_1, z_2) = I_m(z_1, z_2) + I_s(z_1, z_2) The z component of each pixel must be chosen to give the minimum value for the information content.

This will give the most likely depths at each pixel. The minimum total information measure is, I_{\operatorname{min}} = \min{\{i : i = I_t(z_1, z_2)\}} The depth functions for the left and right images are the pair, (z_1, z_2) \in \{(z_1, z_2) : I_t(z_1, z_2) = I_{\operatorname{min}} \}

Text derived from https://en.wikipedia.org/w/index.php?oldid=1377833849 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

3 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.