SoC2007 project Feature Matching
This is a Google Summer of Code project. Its goal is to develop a robust and efficient matching method of local image features. The image features detection is treated by another project Feature Detection.
Image stitching is the process of combining multiple images to produce a panorama or a larger image. Computer software is often used to interpolate the final image where the component images are not in precise alignment. Image stitching can be performed in two steps. The first step refers to detecting the features which do not depend on scale, rotation and other parameters (invariant features) in the images that are going to be stitched. The second step is finding the correspondence between detected features in different pictures. The correspondence problem is to find a set of attributes in two images which can be identified as being the same. For panoramic images the proposed solution must be adapted to the problem. Using heuristic methods, such as EXIF timestamps or previously known approximate orientation of the images, results can be improved. The suggested solution needs to be robust and efficient.
Required knowledge or interest
- signal or image processing background
- C or C++ development skills.
The project title is "Automatic feature matching for panoramic images". It is a logical follow-up of the "Automatic feature detection for panoramic images". The output of the first phase will be part of the input of the second set. The results of the first phase are the extracted image features. These features are presumed to be invariant. Using this features, the second step will stitch the images together by matching the points between the images.
Standard algorithms and data structures combined with heuristic methods will form the core of the suggested project solution.
The Recognizing panoramas paperwork written by M. Brown and D.G. Lowe  describes the process of panorama creation from the algorithms' perspective. The first step implies that the RANSAC algorithm is used to compute the matches between the images. The following step is to compute if the matches are really correct by using a probabilistic model, also described in the above mentioned document. The third step is to join the images one by one. The result image that is going to be joined is the one with the most matches available.
The method described in Brown's paper refers to noise-proof images and it avoids working with images that don't belong to panoramas. Brown's paper is the starting point of the project.
Project parts short description
The first part of the matching will use a nearest matching algorithm, more precisely cover trees. A cover tree is a data structure helpful in calculating the nearest neighbor of points given only a measure. There are papers documenting this data structure and the code implementation . To implement this algorithm represents an advantage.It is saving time for implemetation and testing.
Another part of the project is RANSAC (Random Sample Consensus Algorithm). This is an algorithm used for robust fitting the models in the presence of many data outliers. The wikipedia article describing this algorithm is offering its pseudo code. There is also a paper describing this algorithm which offers a helpful and proper understanding and implementation
Cover trees together with RANSAC can return good results, these results however can be improved by using heuristics. Image stitching can be improved by using information that is associated with the images. This information can be found in the EXIF structure that many cameras can append to the shots taken. There are some habits involved with taking panorama images. Panoramas can be built out of multiple images that are organized in one or multiple rows. Still some panoramas are difficult to automatically stitch because of the similarity between the feature points. That is why, knowing or assuming the order the images were taken can improve the results of this final and important stitching step. Determining the habits of photographers and introducing it in an algorithm is an important part of this project.
There may be images that do not contain the EXIF information. If the EXIF data is present, the heuristics based on it can be applied. If it's not present, the application must neglect the heuristics step. Autopano Pro is making a normalization of the EXIF data between camera formats. Since these cameras use different sensor types and lenses, their EXIF data cannot directly be compared. As an example, while the Canon G3’s focal length of its zoom lens is 7.2 – 28.8mm, its equivalent in 35mm terms is 35-140mm, so a 28.8mm shot on a Canon G3 is not a wide-angle, but a tele shot. If available, the EXIF data must be normalized. For the normalization, a text file containing a list with camera parameters can be used. The generated image, after the stitching process is finished, should also contain a relevant EXIF information, based on the information gathered from the stitched images.
Heuristics can be improved by:
- Panorama shooting - this can be done using methods that, when the process is completed, return images that contain overlapping fields. This represents a feature that heuristics can benefit from;
- Using the focal distance and the camera orientation;
- Knowing the time a picture was shot;
Using heuristic methods has its own advantages:
- Speed of the feature/image matching;
- False matches can be better avoided.
The project is going to be implemented in a modular manor. It will be developed as a library and, due to this particular aspect, there will be two methods to pass the input parameters to the project:
- a text file (maybe XML) containing a list;
- an object list, passed as a parameter to the corresponding project method.
Both lists will contain the features detected by the feature detector project.
Describing the parts of the project leads to the implementation schedule. The schedule I have in mind is based on the SoC schedule. There are 3 parts that need to be done:
- Research of the needed algorithms
- Test and improvement
- April 9th - Start the research part
- May 14th - The implementation of the algorithms should start
- July 9th - Students upload code to code.google.com/hosting; mentors begin mid-term evaluations
- July 10th - Main testing and fine tuning the solution period.
- August 20th - Final report (Google Deadline for all student work)
The total amount of time allocated for project completion is about 20 weeks. This period of time will be divided corresponding to the three major parts of the project.
Also there will be some time left for unexepected things (2 weeks), meaning that 18 weeks will be reserved for the parts presented below. Also a weekly status report will be presented to the mentor. The day of the week must be settled together with him.
start date: April 9th duration: 6 weeks end date: May 13th
- Getting used to panorama making and finding the associated problems in a practical way
- Reading scientific papers describing the problems encountered by other people and the way they solved them;
- Discussions with the mentor about the already existing code and ways to use or improve it;
- Interactions with the person responsible for the feature detection in order to make the projects work seamlessly together;
- Analyzing for a very detailed understanding of all the algorithms' implementations and ways of working with them. This stage represents the starting point of the part where the algorithms must be combined.
start date: May 14th duration: 9 weeks end date: July 9th
- Phase A - Existing algorithms:
- Using the existing RANSAC implementation available in hugin;
- Using the existing cover tree implementation;
- Adapting the existing algorithms for the project.
- Phase B - Heuristic algorithm:
- Autopano and autopano-sift describe the way they use the EXIF information. This can be viewed as hints in the developing of the heuristic part.
- For the beginning, the heuristic part must work on a low level. It must be a integral part of the project. This part must be modular built to allow future improvements.
- Phase C - Preparing the deliverables
start date: July 10th duration: 4 weeks end date: August 5th
- Using the existing SIFT and SURF test data. The project must work independently from the feature detection algorithm and must return valid output.
- Testing by using a large number of images and by offering the code for public review. It would be really helpful for us if people could try to use the existing application and could report whatever problems they might encounter. Working in an open-source environment: this represents a great advantage because more people can view the source codes and identify a larger number of errors (if the errors exist).
- Improving the code and the results.
All the dates are less exact, but the time frames allowed should indicate the way the project is about to be completed.
By the end of the project, August 20th, the deliverables implementation and testing should be completed.
The deliverables will contain the following items:
- a library like application that will use the matching feature method developed during the project development time;
- a standalone application that will use the library;
- the source control of the hugin application that is going to use the library;
- all the source code will be commented and a documentation will be created using the doxygen tool, the hugin documentation tool of choice
- Pablo d'Angelo
Being a graduate student of University of Applied Sciences Wiesbaden, Prof. Dr. D. Richter can also assist me in succesfully developing this project.