Image mosaicing (20 points)Ĭomposite your images together into a mosaic to form the final output panorama. For a full specification of the expected behavior, see the function comment for warp_image() and its corresponding unit tests. In addition to warping the image, you should add an alpha channel so that pixels not covered by the warped input image are "clear" before compositing. This process is also referred to as "image rectification." A good place to start is ( warpPerspective(InputArray src, OutputArray dst, InputArray M, Size dsize, int flags, int borderMode, const Scalar& borderValue)), but be aware that out-of-the-box, it may map images outside the target image coordinates. Once you've found homographies mapping all images into a common frame, you'll need to actually warp them according to these homographys before you can composite them together. I expect you'll need to delve into the details of feature matching and robust fitting to achieve the highest possible accuracy. The second most accurate will receive 16, the third 12, the fourth 8, and the fifth 4. The most accurate implementation in class will recieve 20 bonus points. I will evaluate your homography computation with a broad selection of input images and ground-truth homographies, and measure the distribution of error norms. You'll lose points as the accuracy of your homography declines. If your homography is close enough to ground truth for this test to pass, you'll receive full credit. The unit tests include test_homography, which will evaluate the difference between your computed homography and a "ground truth" known homography. You'll likely need to tweak the robustifiers' parameters to get the best results. It also offers robustified computation using RANSAC or the Least-Median methods. Again, you're welcome to do this any way you like, but I suggest you consider looking at cv2.findHomography, which can compute the least-squares-best-fit homography given a set of corresponding points. Once you've established correspondences between two images, you'll use them to find a "best" homography mapping one image into the frame of another. The fewer there are, the better the fit of your homography will be, although you'll never be able to eliminate all of them. You can experiment with different feature extraction and matching techniques to try to reduce the number of outliers. It's a good bet that you'll have some incorrect matches, or "outliers". You'll probably find it useful to visualize the matched features between two images to see how many of them look correct. I would recommend you consider extracting keypoints and descriptors using the cv2.SIFT interface to compute interest points and descriptors, and using one of the descriptor matchers OpenCV provides under a common interface. You're welcome to establish correspondences any way you like. One common way of doing this is to identify "interest points" or "key points" in both images, summarize their appearances using descriptors, and then establish matches between these "features" (interest points combined with their descriptors) by choosing features with similar descriptors from each image. To establish a homography between two images, you'll first need to find a set of correspondences between them. Find a homography between two images (40 points + up to 20 bonus points)Ī homography is a 2D projective transformation, represented by a 3x3 matrix, that maps points in one image frame to another, assuming both images are captured with an ideal pinhole camera. While I encourage you to make use of OpenCV's powerful libraries, for this project you must not use any of the functions in the stitcher package (although you're welcome to read its documentation and code for inspiration). composite several images in a common frame into a panorama.use the homography to warp images into a common target frame, resizing and cropping as necessary.use the corresponding points to fit a homography (2D projective transform) that maps one image into the space of the other.locate corresponding points between a pair of images.Your image stitcher will, at a minimum, do the following: A panorama is a composite image that has a wider field of view than a single image, and can combine images taken at different times for interesting effects. In this project, you'll write software that stitches multiple images of a scene together into a panorama automatically. Project 1: Panorama stitching Due: 23 Sept 2014, 11:59pm
0 Comments
Leave a Reply. |