[Music] we will continue our discussion on single view camera geometry and there in the last lecture we started discussing on retrieving various information from the projective camera matrix by exploiting its properties so we have already considered that how a projective matrix would be represented so there are various forms by which we represent a projective matrix for the convenience of our discussion all these relations can be expressed in one of these forms so the first from which you should note that a projective matrix which is a 3 cross 4 matrix it is represented by its sub-matrix
components so one of the representations in this form is that it has a 3 cross 3 sub matrix which is denoted here by the symbol capital M and there is a column vector which is the fourth column vector so we use this notation P 4 just to show that it's a column vector at the port position of the column vector and it's a 3 cross one its side is 3 cross 1 we can represent also projection matrices by their column vectors only so since there are 4 column vectors so these representations like first second third
fourth column vectors they are denoted by these symbols and otherwise also we can represent them as a stack of rows or where you have the first row and since our in your convention we are representing a vector in the column from so we use transpose operation to denote that it's a row and so r1 r2 and r3 these are the three rows in this datian so let us see how with this representations we can express various relations with no different different parameters in the camera geometry there are different information related to camera geometry we will
discuss those issues the camera centered that can be obtained as we also know discuss these things in the previous lecture that in the camera centered is that the it has a property of becoming a zero vector right zero vector of the projection matrix because there is a singularity a camera Center in the projection all the image points they are formed as a as an intersection of a ray which is connected to the centre of camera and with this intersection is with the image plane but if the point itself is a camera Center so you cannot
form a ray so that is the problem and that's why no there is no such definition of image of a camera Center and this expression mathematically can be translated in this form so if I multiply the camera centre coordinate in the homogeneous coordinate system well with the projection matrix P in this form then I should get a 0 vector so you understand this 0 is not a single or scalar 0 value it's a vector because no it said its dimension should be 0 0 0 so it's 3 cross 4 and 4 cross 1 so it's
dimension should be 0 0 0 okay so that is a 0 vector so if I solve this problem if so how do you how can we express this camera Center I will I will consider this form suppose the originals the center in the non homogeneous coordinate system is denoted as C tilde as we use this convention in our earlier lectures also so see tilde and if I use a scaling coordinate as one in the additional dimension of homogeneous coordinate system so this is representing the camera center so I can write this relation as mp4 into
C tilde 1 equals 0 so which will be expressed if I perform the sub matrix multiplication with respect to this and you should note that when you are doing sub matrix multiplication the first check should be dimensionality matching between the corresponding matrix multiplication for example M is a sub matrix of dimension 3 cross 3 and C tilde is a column vector of dimension 3 cross 1 so I can multiply M C tilde which will give me a column vector of 3 cross 1 and then I will multiply 3 4 & 1 so it is the
same matrix multiplication rules I am applying so I will be multiplying aim with C tilde plus multiplying with p4 with 1 so before as you understand before is a it's dimension is 3 cross 1 and 1 is a scalar value it's dimension is 1 Cross 1 so I can simply write before because see before so it would be simply 3 cross 1 matrix so it's a matrix multiplication is valid so this should be equal to 0 which is also a 3 cross 1 column vector so again I can reduce this equation so MC tilde is
equal to minus P 4 and then C tilde equal to minus M inverse P 4 so you so you can see that you can get the camera Center very easily by using this expression from the projection camera matrix but note that aim should be invertible then only you can get this expression so there are camera matrices where m is a singular matrix which is not invertible so in that case camera center is also it is not lying at any no physical you cannot capture it in physical dimension but you can represent it mathematically which is
lying at a plane at infinity that's a concept we will discuss once again but its representation any point in the plane at infinity is represented in this form you see that it's a point once again in the homogeneous coordinate representation the scale time scale time this value of the scale dimension should be zero so that it's a point in the infinity so if I divide by zero everything becomes infinity but as I discussed earlier also the interpretation of any point at in this form which is at infinity is that it's a direction so it is
just showing a direction so it is a point lying in that direction at infinity so this this is the form of the camera Center in that case and this point can be computed once again by computing the right 0 of M because M is singular there is a again a zero vector so we can compute that value so in that case we'll have MC tilde should be equal to D so that is how we can compute it we can find out from the expression itself so when your Center is in the form of D 0
so this P 4 becomes 0 so we will find mc2 sorry MC tilde equals 0 and there by finding out the zero vector we can obtain this zero point so let me drop this value because this is wrong so it should be MC t equal to 0 that we have to know son so these are the things related to the camera Center similarly from the column vectors we can get some interesting informations so one of the information that we can get is the vanishing points of certain directions as we discussed earlier also say when we
consider a point at infinity we should our YouTube you can choose any direction and a point at infinity can be represented in that directions by simply using the corresponding Direction cosines as a vector and putting an additional informational no dimension that homogeneous scaling dimension is zero so if I consider for example x axis so x axis did action is given by say 1 0-0 and a point which is at at infinity along that direction should be expressed by adding another zero on ketamine another zero in the homogenous coordinate dimension so if I one if I
would like to get the image of this particular point so I should multiply with the projection matrix then whatever no value I would get in the homogenous coordinate system that is the image point to the corresponding point at infinity so we call this kind of points has vanishing point so if you move towards that direction all the projects projections of the point images of points all lying on this particular direct straight line or will be converging to that vanishing point so in this case since P can be represented in the form of column vector so
we can check that this operation will simply give me p1 so that's why p1 is the vanishing point of x axis similarly P 2 is also vanishing point of y-axis and p3 is vanishing point of z axis so this is one relation I just have shown here the other interesting fact here as you can see that what about people so p4 you can get when you consider a point say zero zero zero one if you multiply with the projection matrix P then you will get people so what is this point this is this is not
a point at infinity because it's scale value is one and this is a physical point in the space itself and what is this point in the three dimensional space it's simply the origin so which means p4 is a image coordinate of the origin so this is is the other property so this is this is about the people so next we'll be considering some of the some of the geometric concepts related to this projection geometry led to this imaging we have discs we have defined all these snow concepts earlier also they are principal plane principal axis
and principal point so in our notation as you can see that this is a very simple representation of the of the projection in a camera centric coordinate space where small p is image of say a point in the scene represented by capital P but no externally you have another coordinate system where we are observing the positions of these points and we call it world coordinate system and the relationship between wall coordinate and camera centric coordinate system can be established by applying simple rigid body transformation where R capital R denotes the rotation of axis which can
be represented by a 3 cross 3 rotational matrix and T denotes the translation of origin to the camera Center which is represented by a column vector R a just a three-dimensional vector so this representation we have already discussed while deriving the projection matrix now we will be considering that know how to drive the relationships or information related to principal planes principal axis and principal points so let me redefine once again so a principal point as you can see so a principal points a principal axis and principal plane so here principal plane is the plane where
first let me define principal axis so principal axis is the z-axis in the camera centric coordinate system which is incidentally the optical axis of the lens in the optical camera so we have considered that is a z-axis in our coordinate convention that is a canonical form so in that way the z axis is denoting the principal axis so intersection and principal plane is the XY plane of the camera centric coordinate system so XY plane is is a plane parallel to image plane and that plane contains the image contains the center of the camera so geometrically
that is the definition independent of any coordinate convention so it is the plane which is parallel to image plane and containing the center of projection that is what is the principal plane in this case incidentally in our canonical notations of no coordinate system of camera centric coordinate system principal plane is the XY plane and principal point is the point of intersection of principal axis with the image plane so these are the few kind of you know definitions which we discussed earlier also and that I am providing here and now let us consider that know what
are the informations that we can get so related to this principal plane others once again we will be considering the representation of the projection matrix in this form and here I have shown those relationships so one of the fact what is shown here that first how we can compute the principal plane so in this case you can see that since the principal plane is parallel to image plane so any any point in the principal plane for any point you don't have any physical image point in that plane in the image plane because the Ray forming
from that point to the camera Center does not intersect image plane it intersects at infinity in that sense so which means that the scaling dimension in the holiness coordinate representation for the image point should be always equal to 0 so if I consider any point say Q which lies on a principal plane if I multiply that point with these prediction matrix you will get an image point you do not know what these two things are there but surely in the third place in the scaling dimension you will get it zero so which means I can
simply write in this case I have represented the point by X so let me use this symbol instead of Q let me use the point as X representation so if I consider multiplication with respect to the row vectors so we will get our three transpose X that should be equal to zero now you can see that this is nothing but the equation of a plane and that is the principal plane you should note that this is what how do you should get a principal plane but it is in the wall coordinate system that you should
know similarly if you consider this Q there would be also image point where say for example the first coordinate position would be 0 and rest rather you don't care which means if I multiply R 1 transpose X that should be equal to 0 and that's a point that's a plane where all the points which are lying on that plane they are projected in this form their image is in this form so what is this plane that would be no interesting to understand because in this case since your this coordinate which is x coordinate that is
always equal to 0 which means no you are considering only y axis in the image plane so if i consider your image coordinates convention and in image coordinate convention you have x axis and you have y axis whereas in your camera centric coordinate system or if I say camera centric axis representation say this is a center so if I if I consider this three-dimensional configuration and draw planes like this let me have it one second just to make it clear say you consider the image plane and this is y-axis and this is x-axis and then
you have a camera centric coordinate representation where C is represented so it is the plane formed by this axis y axis and the camera centered in that plane whatever points are lying so they will be projected on y axis so this is the where the x coordinate will be equal to 0 so this is this is this this plane is given by r 1 transpose X equal to 0 similarly if I can consider the x axis this plane should be given by r 2 transpose X equal to 0 so these planes are called axis plane
as it is noted here R 1 transpose x equals 0 which is imaged at Y axis of the image coordinate and no plane containing camera centered and Y axis similarly R 2 transpose X equal to 0 is plane defined by camera centered and x axis of the image what about the principal point now the third row the third row itself is showing you the principal plane so as we have mentioned this is a plane so in the principal plane so this is a principal plane so this direction now R 3 if I consider the R
3 representation in this form it's a column vector R 3 transpose so let us consider that there is the it is it's it's represented as a 3 cross 1 column vector and some scale value so this mr 3 is a 3 cross 1 column vector so as you understand from the equation of plane so if I write the equation of plane in the form of say X plus B y plus cz Plus D equals 0 so the normal of the direction of the normal of that plane is given by a is 2 B is to
C by this vector so mr3 is actually given in giving you this direction so what is the principal point principal point is the image of that point which is lying in that direction and as I mentioned any point lying in at infinity in that direction can be should be represented in this problem so in this case mr 3 is that direction and the point lying at infinity in that direction is 0 and then the image of that point is a principal point it is nothing but the intersection of the normal of the of the principal
plane with the image plane so if I take the projection of this if I take the image point so this is represented as m dot mr 3 that is what is shown here then you will get the corresponding principal point so this is how this three important information you can get from the know camera matrix we have discussed this principle point and here it is just explained once again how this computations can be no it is it is elaborated with respect to this projection matrix the M R 3 is further elaborated by the elements of
the projection matrix in this form you note that P 3 1 P 3 2 P 3 3 this these are the elements of the third row and and that you need to know multiply with M then you will get the corresponding principle point similarly the principle ray it is nothing but the direction cosine given by M R 3 that is the direction vector so it should be proportional to P 3 1 P 3 2 P 3 3 I can consider it as P 3 1 P 3 2 and P 3 3 so this vector this
direction is providing you the corresponding direction of the principal ray and now in the in the in the projective geometry in the projective sense direction could be towards no it could be in the along the along the Tamara centric coordinates z-axis or it could be in the opposite direction also so from there we exploit a property of the transformation matrix so if you take the determinant of the transformation matrix and consider its sign so that sign will show the actual direction of this this ray so so this vector should be represented by the sign of
the determinant and then the directions are given by M R 3 instead of sign we can since it could be scaled I can simply multiply the vector with determinant of the matrix same that is also personally so let me then discuss another interesting fact that how the the points which are there in the image plane how they are back projected to form a ray first let us understand the mapping of vanishing points on the plane at infinity this we have discussed earlier also it's respect to with respect to the vanishing points of principal axis like
x axis y axis and Jade axis so here if I consider any particular directions D similarly we can multiply simply projection matrix with this vector D 0 and that would give me that would give simply multiplication of the matrix aim with T so that is the vanishing point of the of the directions are the points at infinity lying in that direction City so we should note that vanishing point is only affected by M so the back projection can be defined as the Ray formed by the camera Center with the image plane and you can express
that Ray in the world coordinate system that is how the back projection is expressed so if I consider a point say m inverse X 0 which means it is a point which is lying in the direction of M inverse X so this is the directional component in that direction and it is a point which is lying at infinity this 0 is showing then the image of that point is X which means this is actually the Ray projection ray the direction of the projection rate is expressing that particular tract so finally we can form a ray
which passes through a center say tilde in the homogeneous coordinate system is to dis represented in this form and at that at an in fine at infinity the point is expressed as M inverse X 0 because the direction is M inverse X so this can be easily expressed by a parametric form of equation of straight line in a three dimensional space where a mean versus X is the direction and a point in in there on that line is defined by C tilde so this is how the parametric form is expressed as you can see that
it's a linear combination of the the point in the homogeneous coordinate system the point at infinity in that direction D in that direction inverse X and C tilde and this is the expanded from in fact this is the form which is more convenient to express this M inverse move X minus B for 1 so these are the points which are lying on the projection ray connecting to the cameras Center how do you compute the depth of points so once again depth of point is nothing but the projection of a projection ray connecting connecting to the
same point and on the principal axis so you consider any particular scene point say X X tilde here in the three-dimensional case so it's projection so this vector it's projection on the principal axis which is no z axis of the canonical form a rod in the camera centric system so this distance is the Z disk this is distance to the depth information so this is a depth so this could be easily expressed by this form so a month three is the corresponding direction so you tilde on top of em are three denotes that it's a
unit vector along that direction so if you take the projection means you have to take the dot product along the unit vector of that direction so this vector is defined by X tilde minus C tilde so this vector is XE X - and then you get the corresponding depth information so this is what it's a net vector there is another easier representation of camera Center by solving the set of equations expressed in this form as we discussed earlier also you can see that in fact there are three equations because camera Center is represented by three
coordinates so you need to find out three coordinates so this could be easily expressed by using Cramer's rule and the representation of game in terms of column vectors so let me show you the solution so XC that is a x-coordinate of the camera center is given in this form by using the cameras rule so this is a determinant formed by the matrices of the column vectors determinant of the column vectors similarly YC is given by this and zc is given by this so you apply simply camels rule and then you can get this expression so
next we'll be discussing how you can get the camera parameters from the projection matrix P so here in this case we are again representing projection matrix in different form like you have a mp4 or a m-- - MC tilde which is also representing before or you consider the decompose decomposed form of M where you have the camera calibration matrix and the rotation matrix has kr equal to M then this part is minus RC tilde all these representations have been discussed in previous lectures so one of the one of the easiest way to get the you
know camera parameters is by using matrix decomposition because you know the aim in general this representation is a it can be is formed by the multiplication of these two matrixes K into R so K is the camera calibration matrix and R is the rotation matrix of the transformation from wall coordinate system to camera coordinate system and the property of K it's an upper triangular matrix and R is an orthogonal matrix so if I apply our Q decomposition where R is a upper triangular matrix and Q is an orthogonal orthogonal matrix if I perform this don't
know the composition then I will get two matrices which satisfies this property now there may be this solution may not be unique in that sense but still we considered that this is one plausible solutions through matrix decomposition so we consider update decomposition this R is equated with K and it is an upper triangular matrix and this Q is equated with our note the you know notational little ambiguity here but in this case this is a standard term of decomposition so this is the form we are using so from there now you can get the parameters
of calibration matrix from the upper triangular matrices similarly from the rotation matrices you can get the parameter of rotations and by operating cameras Center as we discussed earlier you can get the corresponding translation parameters also so this is how you get know all the parameters of the camera matrix so here we will stop our lecture at this point and we'll continue this discussion in the next lecture thank you very much for your listen