Restating the question: If I were flying over a 2 dimensional world, at a constant altitude, how would I patch those images together?

I'm using some tools right now that assume I'm doing a panorama ("AutoStitch", works for 2 images sort of) or am taking real aerial photos ("MapTiler") and thus somehow screw this up for me. That "somehow" is, I think, the coordinate reference system (CRS) being used by those programs as the model for patching those images together.

The algorithms that use image recognition to patch the photos together are being misinformed in these latter two programs. The first one, AutoStitch works wonderfully for 2-3 images compared with other programs I've used. I can't actually get MapTiler to work, but it appears to be for real aerial mosaic patching. I need one for a 2D world at constant zoom ("altitude").


BOUNTY UPDATE: StackExchange is only allowing me to keep this bounty offer up for 2 more days as of Monday night. I do not have a workable answer yet.

EDIT: To imagine what exactly it is I'm trying to do, consider this. You have a very high resolution image that takes up multiple monitors, you take screenshots of the the different areas of the photo and then want to stitch them together. Its purely rectilinear, no curvature. all 90 degrees down same zoom/distance.

  • Sounds like you need something that will do affine transformations of photos. There's no such thing as a flat world, and even on a flat, local spatial rectangular coordinate system the images have to be transformed.
    – Wes
    Commented Jul 29, 2014 at 17:39
  • Also, is this the kind of thing you're talking about? I happened to stumble across it just now: designobserver.com/feature/…
    – Wes
    Commented Jul 29, 2014 at 18:05
  • @Wes, I'm not sure if you're trying to help me or not, but yes, a transformation would occur. I'd prefer EPSG:2264 but any rectilinear projection would work. In the US these interactive GIS maps typically use feet as units and the NAD Stateplane projection. Either than or WGS, but I think the rectilinear is more common. Commented Jul 30, 2014 at 17:22
  • 2
    The "flat world at constant elevation" bit is confusing to me. Can you say what the actual data source is (e.g. some kind of simulation, real data)?
    – BradHards
    Commented Mar 19, 2015 at 7:56
  • As radouxju's answer starts to get into, the problem is there's two different things going on. Your assumptions in the question might take care of the ground part of things, but software like AutoStitch you're looking at focuses on the other part - the camera/perspective distortion. From a camera distortion point of view, there is no coordinate reference system (besides the local pixel grid). There are all kinds of considerations about overlap and such to get a 'flat' image. Relating that to the earth is ortho-rectification. With that done, 'stitching' or mosaicking is a lot easier.
    – Chris W
    Commented Mar 20, 2015 at 22:30

6 Answers 6


Have you tried looking at a software package like pix4dmapper? There is a free trial available with a fair amount of functionality called pix4dmapper discovery: https://pix4d.com/download/

I use this software a lot for mosaicing UAV acquired imagery and it may be worth your while to give it a shot.

For images without georeferencing, you could look at Microsoft ICE (Image Composite Editor): http://research.microsoft.com/en-us/um/redmond/projects/ice/

There are 32 and 64-bit versions available. I have used it to successfully stich aerial images from visual and thermal sensors. Perhaps this may be an option for your project.

  • I've used Microsoft's ICE program before I think. Its only for panoramic images in real life, does work for small image areas but once it gets to big it makes some assumptions that are just wrong and ends up very distorted. Maybe its been updated though, I'll try it out thanks Commented Mar 23, 2015 at 20:24
  • The ICE program only works with panoramas (3D radial/concave single POV perspectives versus 2D 90 degree straight down snapshots). I haven't been able to get the pix4dmapper program running because I don't have an internet connected windows pc but I'll try to do that soon. Commented Mar 24, 2015 at 3:44
  • I'm sorry that didn't work for you. I had used it successfully with imagery acquired close to nadir, but that was also real-world imagery. Pix4dmapper is very powerful software, but it works best with geolocated images and is more on the orthorectification / photogrammetric side of image processing. I fear that it may not be as suited to your project as I had hoped. Good luck. Commented Mar 25, 2015 at 4:19

This sounds like an image registration followed by a mosaicing procedure to me. There are a few ways but here's 2 that I'll do:

1) Use Ground control points (same location across different photos) and then link them together. This linking can be done in a GIS software or MATLAB(imregister). This is somewhat a manual approach of doing things.

2) Use an image processing method to identify similar features on multiple photos, such as intensity/contrast based detection. This is more automated.

Following these, perform the mosaicing either on GIS or MATLAB or software with similar functions.

Also search, Image Mosaic using SURF features to combine both into one.

  • First I need to merge the photos into one (the subject of this question). Then I'd use GCP's to georeference it yes (something I'm already capable of doing). Commented Mar 23, 2015 at 20:45
  • This looks like a matlab plugin? Are there any GUI &/or automated tools built on top of this that would make it easier to use? Commented Mar 24, 2015 at 3:41
  • @boulder are you referring to image registration or mosaicing?
    – Corse
    Commented Mar 24, 2015 at 4:14
  • mosaic-ing --- not sure what image registration is Commented Mar 24, 2015 at 23:07
  • @boulder_ruby if you are taking multiple photos of a similar location, you would need the register them together. Typically, if they are georeferenced, they can be mosaic straightaway. Or else, you would need to either georeference them first, or do the registration via a image registration method. if you would like, you could send me a couple of photos and I'll illustrate what i mean
    – Corse
    Commented Mar 25, 2015 at 2:49

The conditions that you describe would be a special case of the usual problem (slightly more simple because some of the parameter are known), but it will not remove the distortions of the image itself (in a ideal case, central projection, note the larger angle yield larger distortions).

If you want to create mosaics the fast way, you could also assume that your plane is perfectly parallel to the soil and that your camera yields a perfect central projection (but these are additional strong assumptions...). You then know the position of each image center, which is equal to the position of the plane, and it is straightforward to compute the scale factor of your image based on the focal length and the height of the plane above ground.

As you can see, the quick stitching is making a lot of assumptions. I therefore rather suggest that you first rigourously orthorectify your images, then you can stitch then more easily. There are many software for this, from (expensive) professionnal solution (Leica Photogrammetry Suite) to more affordable (black box) commercial software (Agisoft photoscan) or Open source (complex) solutions (IGN Micmac).

EDIT (from the new information, you are not actually flying, so the above solutions are not useful):

In the case of a screenshot, which is not the same as taking photos, you will not have any distortion. What you need to do then is georeference your images first, then create a mosaic. The second step can be done easily using gdal_merge.py (for a new image) or gdalbuildvrt (which does not write a new image on the disk).

The first step is more difficult. I guess that your image is online and you are panning on it. If your panning is automated, you should know by how much you are panning and the size of your image, so you can find the coordinates and the pixel size. Based on this, you can create a world file with georeferencing information in it (see here for info about world file) or write it in the header using gdal_edit.py . If you are doing this manually, you should take note of the upper left corner coordinates of your screen and use it to write a world file. If it is too late to get the coordinates of your images, then you can either collect gcp's or use automated registration algorithms.

  • The CRS of the imagery is to be assumed to be rectilinear, i.e. flat. Commented Mar 23, 2015 at 20:22
  • Assume the image is already orthorectified. Commented Mar 24, 2015 at 3:36
  • I've tried Agisoft Photoscan Pro and it doesn't appear to work with rectilinear projections. The IGN Micmac won't compile on my mac, the cmake operation doesn't work because some .txt file is missing. I looked up the Leica Photogrammetry Suite but could find anything specific about it...how much do they charge? Anyway, couldn't get any of these programs to do the job yet. Commented Mar 24, 2015 at 3:39
  • from your updated question photogrammetry softwares will not help. You should try automated image registion software. You need to give more details if you want a more precise answer, because at this stage this is a very broad issue which could have simple or complex answers depending on your input.
    – radouxju
    Commented Mar 25, 2015 at 14:33
  • I'm running out of time and someone deserves the points because I can't get them back. This isn't what I was hoping for but its the best answer in the stack. Commented Mar 26, 2015 at 2:56

If all you are looking to do is stitch your images together and save them off to a single image, then Irfanview (excellent freeware image mgr) does that. Go to Image > Create Panorama Image... and set up your grid. Apologies if I am over-simplifying your issue, but it seems a straight image manipulation thing, rather than a GIS thing.


Have you heard of OpenDroneMap? I was at the FOSS4GNA 2015 Conference and saw a very impressive session regarding the tool. From the Session: OpenDroneMap is fully Open Source postprocessing tool for highly overlapping unreferenced imagery, turning the unstructured data (simple photos) into structured data: colorized point clouds, digital surface models, textured digital surface models, and orthophotography.

It sounds promising for your use. The Session Slides can be found here: ODM Slides

The tool project can be found here: OpenDroneMap

  • Doesn't appear to work with the rectilinear photos (screenshots) case Commented Mar 26, 2015 at 17:49

No "world" but a Cartesian co-ordinate system. The Cartesian co-ordinates can be run to generate any projection or convert to any reference system you like. Mapping data is not round, it's flat That is because you will view it ultimately on a flat surface. Even if Google Earth is "round" it's really flat because your viewing it on the flat surface or you screen. So all you are accounting for are the distortions by various math formula for flat projecting data. The X and Y geographic data columns that represent longitude and latitude are the X axis and Y axis of the Cartesian co-ordinate system.

  • To see how incorrect the claim is that the shape of world does not matter, consider a round world in which the images are taken from out in space: it should be obvious that the curvature will distort the images and that a routine rectilinear "stitching" will not handle the mosaicing. Even having common ground reference points near the overlaps will not solve the problem. Radouxju's answer discusses some of these issues further.
    – whuber
    Commented Mar 24, 2015 at 20:31
  • I'm not sure you understood what I said. My answer is not related the the problem of projections but of planar geometry and running an algorithm therein. The rectification, if needed, was already assumed to have processed the data. So a problem of semantics at this point, no?
    – lewis
    Commented Apr 15, 2015 at 21:27
  • Whether you believe I understood or not, your claims are mathematically wrong whenever the world is not flat. In fact, the errors that your method will produce can be used to measure curvature.
    – whuber
    Commented Apr 16, 2015 at 15:03
  • If you don't understand it does not follow that you then do. You either understand me or you don't.
    – lewis
    Commented Apr 21, 2015 at 19:33
  • Yes, that's true, but you have to consider it likely that other readers will (mis)understand your post in the same way that I do and will therefore consider it to be in error. Please do them--and yourself--a service by taking that seriously and seeing what you can do to clarify what you have written.
    – whuber
    Commented Apr 21, 2015 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.