diff --git a/css/main.css b/css/main.css index c45349853596ac8a0874ea08a35b5be5695cea8e..9c004ab42b0c2965554fe7694c96853a1b5e79b0 100644 --- a/css/main.css +++ b/css/main.css @@ -1,5 +1,5 @@ img { - width: 60%; + width: 80%; display: block; margin-left: auto; margin-right: auto; diff --git a/topics/01_cameras/index.md b/topics/01_cameras/index.md index d3b2fc4d22a6fad3d9454444393726aef89067bf..4a805fc2dff1cacce951b4191847f8c6e350a9e6 100644 --- a/topics/01_cameras/index.md +++ b/topics/01_cameras/index.md @@ -14,24 +14,139 @@ mathjax: true 1. TOC {:toc} -# Camera geometry +# What is a camera? + +A modern definition of a camera is any device capable of collecting light rays coming from a scene, and recording an image of it. The sensor used for the recording can be either digital (e.g. CMOS, CCD), or analog (film). + +## The pinhole camera + +The term camera is derived from the Latin term *camera obscura*, literally translating to "dark room". Earliest examples of cameras were just that; a hole in a room/box, projecting an image onto a flat surface.  - +Using only a small hole (pinhole) blocks off most of the light, but also constraints the geometry of rays, leading to a 1-to-1 relationship between a point on the sensor (or wall!) and a direction. Given a 3D point $(x,y,z)$ in space, the point on the sensor $(u, v)$ is given by: - +$$\begin{cases} +u = f \frac{x}{z}\\ +v = f \frac{y}{z} +\end{cases}$$ + +in which $f$ is the focal length: the distance from the pinhole to the sensor. Multiple 3D coordinates fall onto the same sensor point; cameras turn the 3D world into a flat, 2D image. + +Let's make the sensor coordinate system more general, by introducing an origin $(u_0,v_0)$ and non-isotropy in the $x$ and $y$ focal lengths, which is necessary to describe non-rectilinear sensors. The complete pinhole camera model can be summarized by a single affine matrix multiplication: + +$$ +\begin{bmatrix} +uw\\ +vw\\ +w +\end{bmatrix} += +\begin{bmatrix} +f_x & 0 & u_0\\ +0 & f_y & u_0\\ +0 & 0 & 1 +\end{bmatrix} +\begin{bmatrix} +x\\ +y\\ +z +\end{bmatrix} +:= K +\begin{bmatrix} +x\\ +y\\ +z +\end{bmatrix} +$$ + +The matrix $K$ is known as the **intrinsic** parameters matrix. Let's complete our model by adding an arbitrary rotation/translation to the world coordinate system. A single matrix multiplication can relate world coordinates $(x_w,y_w,z_w)$ to camera-centric coordinates $(x,y,z)$: + +$$ +\begin{bmatrix} +x\\ +y\\ +z +\end{bmatrix} += +\begin{bmatrix} +R_{11} & R_{12} & R_{13} & t_x\\ +R_{21} & R_{22} & R_{23} & t_y\\ +R_{31} & R_{32} & R_{33} & t_z\\ +\end{bmatrix} +\begin{bmatrix} +x_w\\ +y_w\\ +z_w\\ +1 +\end{bmatrix} +:= +\begin{bmatrix} +R | t +\end{bmatrix} +\begin{bmatrix} +x_w\\ +y_w\\ +z_w\\ +1 +\end{bmatrix} +$$ + +where $R$ is an orthogonal rotation matrix, and $t$ a translation vector. The $\begin{bmatrix}R\|t \end{bmatrix}$ matrix is known as the **extrinsic** parameters matrix. We can combine intrinsic and extrinsic parameters in a single equation: + +$$ +\begin{bmatrix} +uw\\ +vw\\ +w +\end{bmatrix} += +K +\begin{bmatrix} +R|t +\end{bmatrix} +\begin{bmatrix} +x\\ +y\\ +z\\ +1 +\end{bmatrix} +$$ + +When using more than one camera, it is useful to have a single world coordinate system while letting each camera have its own sensor coordinate. As explained in the next section, if intrinsic and extrinsic parameters are known for every camera looking at the scene, 3D reconstruction can be achieved through **triangulation**. # Sensor +## Coordinates + +Continuous sensor coordinates make sense when simply projecting an image or recording it with a film. If using a digital sensor, a natural choice for the sensor coordinate system is the pixel indices. Those discrete, unitless values can be related to the physical sensor by defining an equivalent focal length in pixel units: + + + +The image plane is an imaginary construct sitting in front of the sensor, at one focal length (in pixels) away from the camera's coordinate system. Because it sits in front of the camera, the image is upright again. + +It is common to choose the $z$ axis to point **toward** the scene, and the $y$ axis to point downward. This matches the conventional downward-pointing vertical coordinates in pixel coordinates, with $(u,v)=(0,0)$ in the top-left corner. + ## CCD ## CMOS +## Bayer pattern + # Lens + + ## Distortion # Aperture # Shutter + +## Mechanical shutter + +## Electronic shutter + +# Photography basics + +## The 3 parameters: shutter speed, aperture, ISO diff --git a/topics/03_active/index.md b/topics/03_active/index.md index 2862b8590a0d6bd704bcc9e8363f33494004695b..0e6b30e94aed16a0a1f8013f34dfd325857b003f 100644 --- a/topics/03_active/index.md +++ b/topics/03_active/index.md @@ -16,7 +16,15 @@ mathjax: true # Structured light -# Laser scanning +## Laser line + +<!-- Makerbot digitizer --> + +## Pattern projection + +<!-- Kinect V1 --> + +<!-- CR Ferret pro: infrared binocular stereo --> # Time-of-Flight @@ -24,4 +32,6 @@ mathjax: true ## ToF cameras +<!-- Kinect V2 --> + # Light dome diff --git a/topics/05_processing/img/conv.gif b/topics/05_processing/img/conv.gif new file mode 100644 index 0000000000000000000000000000000000000000..a96670a5475d26b5bb1fa14bff862a54e6c4b18d Binary files /dev/null and b/topics/05_processing/img/conv.gif differ diff --git a/topics/05_processing/index.md b/topics/05_processing/index.md index 940fdfc99d2d05cc0133c9e3a50c97dbe8a491cc..c9ae017a0a403015eeb04cd4f165726399a001b2 100644 --- a/topics/05_processing/index.md +++ b/topics/05_processing/index.md @@ -18,6 +18,8 @@ mathjax: true ## Convolution + + ## Edge detection ## Fourier transform