Closed xialang2012 closed 8 years ago
Using a modern memory allocator (e.g. tcmalloc) can help a lot in reducing total memory used. Default allocator is known to have issues under parallel environment. And please note that your images are very large. And simply storing them in the original size would require: M = 4608 * 3456 * 9 * 3 * 4 (bytes) = 1.6 G memory. The peak memory could be about: 2 * M * (number of threads)
Btw, your images doesn't look panorama even to me, and they are quite feature-less. I guess it won't work well with my program.
It used 6.1G memory to process the images, but it failed to get the panorama images.
[init_config@main.cc:184] Run with camera estimation mode. [calc_feature@stitcher.cc:73] Image 3 has 443507 features [calc_feature@stitcher.cc:73] Image 4 has 480034 features [calc_feature@stitcher.cc:73] Image 5 has 560969 features [calc_feature@stitcher.cc:73] Image 2 has 427705 features [calc_feature@stitcher.cc:73] Image 1 has 448812 features [calc_feature@stitcher.cc:73] Image 0 has 435534 features [calc_feature@stitcher.cc:73] Image 6 has 613574 features [calc_feature@stitcher.cc:73] Image 7 has 607284 features calc_feature(): 299885 milliseconds. BuildTrees: 65681.6 milliseconds. [pairwise_match@stitcher.cc:103] Connection between image 0 and 6, ninliers=8889, conf=2.071786 [pairwise_match@stitcher.cc:103] Connection between image 1 and 2, ninliers=63572, conf=2.665135 [pairwise_match@stitcher.cc:103] Connection between image 1 and 3, ninliers=13284, conf=1.999488 [pairwise_match@stitcher.cc:103] Connection between image 0 and 7, ninliers=31757, conf=2.736398 [pairwise_match@stitcher.cc:103] Connection between image 2 and 4, ninliers=10987, conf=2.002406 [pairwise_match@stitcher.cc:103] Connection between image 2 and 3, ninliers=65417, conf=2.675257 [pairwise_match@stitcher.cc:103] Connection between image 3 and 4, ninliers=49299, conf=2.678842 [pairwise_match@stitcher.cc:103] Connection between image 5 and 6, ninliers=90342, conf=2.829102 [pairwise_match@stitcher.cc:103] Connection between image 5 and 7, ninliers=17354, conf=2.167787 [pairwise_match@stitcher.cc:103] Connection between image 6 and 7, ninliers=87977, conf=2.867344 pairwise_match() with transform: 2.4179e+06 milliseconds. [estimate@camera_estimator.cc:29] Cannot estimate focal. Will use a naive one.[max_spanning_tree@camera_estimator.cc:100] MST: Best edge from 6 to 7 [max_spanning_tree@camera_estimator.cc:100] MST: Best edge from 5 to 6 [max_spanning_tree@camera_estimator.cc:100] MST: Best edge from 0 to 7 error: Found a tree of size 3!=7, images are not connected well! Aborted (core dumped) xl@ubuntu:~/modis/panorama-master/src$
Right, because your images doesn't look like panoramas. Panoramas should be taken by a rotation-only camera. You'd better look for SfM code for unconstrainted camera movement. Also, your images are feature-less, so I don't think they'll work well with matching-based vision algorithms.
This project can also deal with translation-only camera movement. Your first 4 images look translational, and, after I manually rotate them, I can stitch them with the TRANSLATION mode
(see README
).
Yes, those images were obtained by UAV with a roundtrip flight, the first 4 images, the fifth image and the end 4 images represent the images took at first fly, the turning point and the second fly.
I have tried the OpenCV stitching module, but it often failed with bundle adjustment operation, but by using the ICE whcih provided by Microsoft I can get the reasonable mosaic image, as show bellow
But, ICE is not an open source software.
ICE seems like a much more general purpose image stitcher. However this project right now only focuses on rotation-only panorama: the CAMERA_ESTIMATE
mode assumes fixed-center camera, and the TRANSLATION
mode only try to simply stitch input one by one. Neither of them are good for stitching translation-only unordered photos for now.
Yes, Could you give me some suggestions about how to study the images stitch, such as, the prime books et al.
Start with Wikipedia items and some classical papers, about SIFT, ransac, homography estimation, and so on. Also the book "Multiple View Geometry in Computer Vision" contains most of the basic theory behind image stitching.
I test the panorama to get my UAV images stitch, but the panorama seems memory guzzler. Bellow are the jpg files I used in the test