2D to 3D conversion into account that more distant objects, besides being hazy, should be more desaturated and more bluish because of a thick air layer. The idea of the method is based on the fact that parallel lines, such as railroad tracks and roadsides, appear to converge with distance, eventually reaching a vanishing point at the horizon. Finding this vanishing point gives the farthest point of the whole image. The more the lines converge, the farther away they appear to be. So, for depth map, the area between two neighboring vanishing lines can be approximated with a gradient plane. 2D to 3D conversion
Distance from a point to a line the perpendicular "R". Draw the vertical line through "P" and label its intersection with the given line "S". At any point "T" on the line, draw a right triangle "TVU" whose sides are horizontal and vertical line segments with hypotenuse "TU" on the given line and horizontal side of length |"B"| (see diagram). The vertical side of ∆"TVU" will have length |"A"| since the line has slope -"A"/"B". ∆"PRS" and ∆"TVU" are similar triangles, since they are both right triangles and ∠"PSR" ≅ ∠"TUV" since they are corresponding angles of a transversal to the parallel lines "PS" and "UV" (both