Now that we have loaded two images (self.img1 and self.img2) of the same scene, such as two examples from the fountain dataset, we find ourselves in a similar situation as in the previous chapter. We are given two images that supposedly show the same rigid object or static scene but from different viewpoints.
However, this time we want to go a step further—if the only thing that changes between taking the two pictures is the location of the camera, can we infer the relative camera motion by looking at the matching features?
Well, of course we can. Otherwise, this chapter would not make much sense, would it? We will take the location and orientation of the camera in the first image as a given and then find out how much we have to reorient and relocate the camera so that its viewpoint matches that from the second image.
In...