Quantcast
Channel: solem's vision blog
Viewing all articles
Browse latest Browse all 31

Simple Panoramas with OpenCV

$
0
0
The latest 2.4 release of OpenCV contains some good stuff. The stitching module is really useful. In the OpenCV sample folder there is a great script called stitching_detailed.cpp. This does the whole pipeline for creating panoramas including feature extraction, matching, warping and blending. If you have OpenCV properly installed you can compile the file for your platform and try it out from your command line like this:

$ ./stitching_detailed Univ*.jpg

This will use the default parameters and settings and create a file result.jpg with your panorama created from all jpeg images starting with "Univ". To see the defaults and what options you can set:

$ ./stitching_detailed --help

For example, you can change the projection used (default is spherical). This will use a Mercator projection:

$ ./stitching_detailed Univ*.jpg --warp mercator

Here are some sample results using these images of the University building in Lund. This is the same example used in Chapter 3.3 of my book.


Cylindrical projection.

Planar projection.

Mercator projection.

Viewing all articles
Browse latest Browse all 31

Trending Articles