So today when I continue on camera projection, if you forget everything it can be summarized in this picture of camera, which is color coded in three parts. The first part is the camera body itself in pink. And that encodes the camera orientation and position in the world, and the second part, the concept I want you to go through is colored in blue, which is inside the camera itself, what it does is it transforms the optical measurements of the light coming through the camera into pixels. And the pictures we'll be working on. And the last part of this camera projection had to do with the focal lens of the lens itself, which is color coded in red. So the three pieces of the camera together allow us to form pictures from a 3D world to a 2D world. Recall, that if an artist drawing a picture of the world, we have a camera scene in front of us, and we'll be standing behind the canvas, and we'll be looking into the world. What we do is then form a ray between your eye to the point in the image, a particular points, you can pick any points you want and that array between your eye and the 2D points on the camera, form array. And that array will go traveling the world, hit the 3D dimensional point, intersect that points, and bounce that object into the canvas and paint the color of the 3D object, into the 2D plane. That's a process of forming a three dimensional picture in a two dimensional world, the transformation from 3D to 2D. And we talked about last time, if we take that ray and extend to infinite, that ray in fact, represents several lines in 3D or in the same orientation. And that orientation will be useful for us to analyze how the camera is rotated in a space. The camera we use in our daily life however, is not a canvas. In fact it's the reverse canvas where the image playing is sent back to us rather than in front of us. And this is what we call a simplified pinhole model, where the eye is located in the location called a pinhole, and the image plane is no longer in front of us but behind us. Well, mathematically, we can think of there's a virtual canvas plane in front of the eye and the geometrical relationship forming a picture behind us is the same as a canvas in front of us. And this is the model we will be using. So, lets start, I will define world called the 1st Person Camera World. I call this 1st Person Camera World because, I the cameraman, or my eyeball is located at the center of the universe. I am the 0, 0 origin of the universe and everything is measured in three-dimensional space relative to me. I will be having an x-axis or in the horizontal direction, I will point in x-axis direction in the horizontal to the right. And imagine you have a y-axis defined as vertically down from me. And if you use the right hand rule where you have x cross y which is pointing down and the thumb is pointing in the direction of a z. So it has defined a 1st Person Camera World coordinate system where I am the origin and to the right is x-axis, to down direction is the y-axis and forward is the z-axis. Every points in the world is measured in that x, y, z coordinate system. And I will then place a canvas in front of me, exactly at focal distance z ahead of it which is saying, the z equal to f, the focal length. So you imagine you have points in the 3D, that object or that point is shrunk into my camera world. And that shrinking had to do to how far the object is. The further the object is, the further we shrink it. And once we shrink the camera, we move forward and provide it by a multiplication factor of focal lens f onto the canvas. And this process is written down in this equation where any points x, y, z is formed into the image x prime by taking x divide it by z, shrinking it and then further magnified it at f, onto the camera plane. As we can see, an object that's further away from this in the z direction will be shrinking down, will appear smaller compared to the same object a little bit closer to us. Further more if I were taking the focal plane further out, the objects will get magnified more and more. So another way to say it is if I change the focal lens of the camera the object will appear to be magnified. Another fact we can derive from this is the fact that the image plain of the cameras we have are a fixed size, therefore if I were to take the image plane further out by increase the focal lengths, our field of view will get smaller. So again, as you take the image plane closer to us, decrease the focal length, the field of view will get larger. Change the focal lengths to larger distance away from us, decrease the field of view. So there are three characters that we can derive from this very simple equation that form a three-dimensional coordinates into a two-dimensional world. Now, two important questions we need to know about this camera projection in the first person camera world. The first, is where exactly is the optical center of this universe, where am I? Where am I oriented, if I give you a camera can you figure out where optical center is. The second, how far is the focal play to the origin in the center. Where is my focal length of the camera? Any ideas? Well, the first solution is always to look on the Internet. You can look up your camera, and you look at spec and the camera manufacturer, usually it tells you the focus length is in terms such and such milimeters. What if you don't have the Internet? How to you estimate the focal length of the camera? Well, some of you might already know that we will use a calibration toolbox with a checkerboard and the checkerboard through calculations can, tells you the focal length as well as the camera center, how it is oriented in space. Well what if you don't have a checkerboard? How else can we infer the focal lens, or how else can we infer the center of image projection. Here we have a very simple method to estimate the center of a camera projection. Let's take your cell phone out. And we only need your cell phone and a piece of paper and a ruler. So this exercise, what you need to do is draw a set of radiating lines on this piece of paper. So fix one point as the center and draw a set of radiating lines out. And then what you do is you place the camera, which is your cell phone vertical to the paper. And what we want is the paper to look like this from the top,those are radiating lines. The horizontal line I draw will become evident in a few slides. What you need to do is look through a live viewing of the image on the camera and what you want to do is look at images, look at image forward on screen, again you can see if you were to move the camera back and forth along the radiating line direction, at certain point magic will happens. You will start seeing those lines which are verging into the radiating point will start looking parallel to each other, vertical parallel to each other on the screen itself. And this is the moment where I want you to stop the camera movements and draw a line in front of it. And this concept can be illustrated in this diagram but we see a set of radiating lines on ground planes and these ground planes can be images in certain points. It depends on how the camera is located such that image of those radiating lines looks perfectly vertical and perfectly parallel to each other. And this is the concept that we can think about by reversing the camera. And think of a camera as a inverse projector where the optical center is a light source and the image planes in fact is a picture. And we project the image on the image plane onto the ground plane. If we placed a light source exactly the optical center, we would imagine if I have vertical lines in front of us, they in fact will form radiating lines. And those radiating lines, on the ground plane will converge to exactly the point where, if I draw a straight vertical line from the optical center to the ground and that point will intersect with all the radiating lines. So repeat this exercise until you are convinced. This is a simple solution which allow you to, given any camera, very quickly and roughly estimate where the location of the optical center, relative to parts of the camera. For example, relative to front of my iPhone. Why would be important? Well, this is important we'll see later that when we create a paramic images. We like to have a camera to rotate about it's optical center and we need to know where optical center is.